New issue
Advanced search Search tips

Issue 906079 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 891653



Sign in to add a comment

TaskScheduler shouldn't create an idle thread while Posting tasks.

Project Member Reported by etiennep@chromium.org, Nov 16

Issue description

MaintainAtLeastOneIdleWorkerLockRequired() is called from 
WakeUpOneWorkerLockRequired(), which happens when posting a new task.
This causes creation of (idle) threads on the main thread, and potentially jank.

Here's a common stackframe causing jank:

base::`anonymous namespace'::CreateThreadInternal
base::internal::SchedulerWorker::Start(base::SchedulerWorkerObserver *)
base::internal::SchedulerWorkerPoolImpl::CreateRegisterAndStartSchedulerWorkerLockRequired()
base::internal::SchedulerWorkerPoolImpl::WakeUpOneWorkerLockRequired()
base::internal::SchedulerWorkerPoolImpl::OnCanScheduleSequence(scoped_refptr<base::internal::Sequence>)
base::internal::SchedulerWorkerPool::PostTaskWithSequenceNow(base::internal::Task,scoped_refptr<base::internal::Sequence>)

and a few traces:
76e57cff0d51fc1a (jank for 29.7 sec, ouch!)
442a59c740fc6047
2d1832505e43bb9d
2d1832505e43bb9d
72983fabaf55ff86
2f687934f93fdb97

An alternative is to move MaintainAtLeastOneIdleWorkerLockRequired() to GetWork(),
which is called from a SchedulerWorker and never from the main thread.
 
Blocking: 891653
Labels: Hotlist-Jank
Labels: Hotlist-SamplingProfilerInField Performance-Browser
Status: Assigned (was: Untriaged)
This issue has an owner, a component and a priority, but is still listed as untriaged or unconfirmed. By definition, this bug is triaged. Changing status to "assigned". Please reach out to me if you disagree with how I've done this.

Sign in to add a comment