Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(829)

Issue 2807063007: Remove SchedulerWorkerPoolImpl::ReEnqueueSequenceCallback. (Closed)

Created:
3 years, 8 months ago by fdoray
Modified:
3 years, 8 months ago
Reviewers:
robliao, gab
CC:
chromium-reviews, gab+watch_chromium.org, robliao+watch_chromium.org, fdoray+watch_chromium.org, danakj+watch_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove SchedulerWorkerPoolImpl::ReEnqueueSequenceCallback. This was useful when we thought that sequences could contain tasks with different traits and be enqueued in different priority queues during their lifetime. This is no longer a supported use case. BUG=553459

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -112 lines) Patch
M base/task_scheduler/scheduler_worker_pool.h View 2 chunks +0 lines, -10 lines 0 comments Download
M base/task_scheduler/scheduler_worker_pool_impl.h View 5 chunks +2 lines, -12 lines 0 comments Download
M base/task_scheduler/scheduler_worker_pool_impl.cc View 7 chunks +9 lines, -37 lines 0 comments Download
M base/task_scheduler/scheduler_worker_pool_impl_unittest.cc View 4 chunks +2 lines, -23 lines 0 comments Download
M base/task_scheduler/task_scheduler_impl.h View 1 chunk +0 lines, -4 lines 0 comments Download
M base/task_scheduler/task_scheduler_impl.cc View 4 chunks +1 line, -26 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 17 (6 generated)
fdoray
PTAL
3 years, 8 months ago (2017-04-11 17:54:22 UTC) #4
robliao
On 2017/04/11 17:54:22, fdoray wrote: > PTAL Hrm... it might be safer to work out ...
3 years, 8 months ago (2017-04-12 01:10:26 UTC) #7
fdoray
On 2017/04/12 01:10:26, robliao wrote: > On 2017/04/11 17:54:22, fdoray wrote: > > PTAL > ...
3 years, 8 months ago (2017-04-12 12:28:24 UTC) #8
gab
On 2017/04/12 12:28:24, fdoray wrote: > On 2017/04/12 01:10:26, robliao wrote: > > On 2017/04/11 ...
3 years, 8 months ago (2017-04-12 18:55:34 UTC) #9
robliao
On 2017/04/12 18:55:34, gab wrote: > On 2017/04/12 12:28:24, fdoray wrote: > > On 2017/04/12 ...
3 years, 8 months ago (2017-04-12 19:01:21 UTC) #10
gab
On 2017/04/12 19:01:21, robliao wrote: > On 2017/04/12 18:55:34, gab wrote: > > On 2017/04/12 ...
3 years, 8 months ago (2017-04-12 19:21:48 UTC) #11
robliao
On 2017/04/12 19:21:48, gab wrote: > On 2017/04/12 19:01:21, robliao wrote: > > On 2017/04/12 ...
3 years, 8 months ago (2017-04-12 19:27:49 UTC) #12
fdoray
On 2017/04/12 19:27:49, robliao wrote: > On 2017/04/12 19:21:48, gab wrote: > > On 2017/04/12 ...
3 years, 8 months ago (2017-04-12 19:41:29 UTC) #13
robliao
On 2017/04/12 19:41:29, fdoray wrote: > On 2017/04/12 19:27:49, robliao wrote: > > On 2017/04/12 ...
3 years, 8 months ago (2017-04-12 19:43:35 UTC) #14
chromium-reviews
Sequence funneling IMO would be driven towards a single thread or single pool. Anyways we ...
3 years, 8 months ago (2017-04-13 14:07:55 UTC) #15
robliao
3 years, 8 months ago (2017-04-13 16:51:51 UTC) #16
On 2017/04/13 14:07:55, chromium-reviews wrote:
> Sequence funneling IMO would be driven towards a single thread or single
> pool. Anyways we don't need to figure that out now, the point is merely not
> to keep dead code around because it might be useful later, that's never the
> right choice IMO.
> 
> Le mer. 12 avr. 2017 15:43, <mailto:robliao@chromium.org> a écrit :
> 
> > On 2017/04/12 19:41:29, fdoray wrote:
> > > On 2017/04/12 19:27:49, robliao wrote:
> > > > On 2017/04/12 19:21:48, gab wrote:
> > > > > On 2017/04/12 19:01:21, robliao wrote:
> > > > > > On 2017/04/12 18:55:34, gab wrote:
> > > > > > > On 2017/04/12 12:28:24, fdoray wrote:
> > > > > > > > On 2017/04/12 01:10:26, robliao wrote:
> > > > > > > > > On 2017/04/11 17:54:22, fdoray wrote:
> > > > > > > > > > PTAL
> > > > > > > > >
> > > > > > > > > Hrm... it might be safer to work out the branched sequence
> > work
> > > > > (funnels)
> > > > > > > and
> > > > > > > > > then do this. Thoughts?
> > > > > > > >
> > > > > > > > In my opinion, we should never allow sequences (including
> > sequences
> > of
> > > > > > > > sequences) to move between pools.
> > > > > > > >
> > > > > > > > A sequence that contains background *and* foreground sequences
> > should
> > > > live
> > > > > > in
> > > > > > > a
> > > > > > > > foreground pool. Background sequences are last in a foreground
> > PQ,
> > so
> > > > they
> > > > > > > have
> > > > > > > > a high latency. However, they're scheduled on foreground
> > threads so
> > > > their
> > > > > > > > execution time is normal. That means that the latency of
> > foreground
> > > > > > sequences
> > > > > > > is
> > > > > > > > never affected by background tasks taking a long time to run
> > on a
> > > > > background
> > > > > > > > thread.
> > > > > > > >
> > > > > > > > Also, I secretly hope to get rid of blocking pools and instead
> > rely
> > on
> > > > > > > > ScopedMayBlock.
> > > > > > > >
> > > > > > > > Since we don't have a clear plan for sequence funneling yet,
> > we can
> > > > delay
> > > > > > the
> > > > > > > > review of this CL.
> > > > > > >
> > > > > > > Agreed that sequences moving between pools is unlikely to ever
> > be a
> > good
> > > > > idea
> > > > > > > (maybe blocking wise, never priority wise?). Let's not keep this
> > code
> > > > around
> > > > > > > just in case we need it IMO (we can revert later if need be).
> > We're
> > more
> > > > > > likely
> > > > > > > to get rid of separate pools than we are to bounce sequences
> > between
> > > > pools?
> > > > > > >
> > > > > > > LGTM
> > > > > >
> > > > > > Reverting it later is costlier than just keeping this CL here and
> > > committing
> > > > > it
> > > > > > later. It basically amounts to a hand re-merge of the code.
> > > > > > Given that this plumbing isn't costing us too much and there's no
> > urgent
> > > > need,
> > > > > > I'd rather do it then.
> > > > >
> > > > > I disagree, dead code is always eventually detrimental. i.e. if the
> > revert
> > > > > eventually conflicts it's likely because this dead code was
> > unnecessarily
> > > > moved
> > > > > around in a prior refactoring...
> > > > >
> > > > > When do you think we'd need to bounce pools?
> > > >
> > > > With sequence branching, it's reasonable for a component to do both
> > background
> > > > and foreground work that feeds to the same sequence. If that sequence
> > is
> > tied
> > > to
> > > > a SchedulerWorkerPoolImpl, it is no longer possible to reschedule that
> > > sequence
> > > > for other priority work should we decide to do it.
> > > >
> > > > How we decide to handle sequence branching will determine if we need
> > to keep
> > > > this.
> > >
> > > Background and foreground work will definitely be supported. But the
> > background
> > > tasks shouldn't run in a pool with background thread priority.
> > Otherwise, a
> > > single background task could delay the execution of foreground tasks by
> > a lot.
> >
> > It would also be unexpected for a component that generated a lot of
> > background
> > work to run at user blocking priority :-).
> > Hence, there's a lot of nuance with this.
> >
> > https://codereview.chromium.org/2807063007/
> >
> 
> -- 
> You received this message because you are subscribed to the Google Groups
> "Chromium-reviews" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email
> to mailto:chromium-reviews+unsubscribe@chromium.org.

In principle I agree, but given that we're going to be figuring this out
reasonably soon, the code is actively called today, we've lived with this for
many months, one more month isn't going to adversely impact the code.

Powered by Google App Engine
This is Rietveld 408576698