lkml.org 
[lkml]   [2011]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 4/4] sched: Distangle worker accounting from rq->lock
On Thu, 23 Jun 2011, Tejun Heo wrote:

> Hello, Thomas.
>
> The hooking place doesn't have anything to do with rq->lock. The
> problem with Peter's patch was preemption, not the lock.

And we can do it w/o preemption disabled as I have shown.

> > There is also no harm from updating nr_running when the task returns
> > from scheduling instead of accounting it in the wakeup code.
>
> Well, not exactly. If CPU is being thrashed, we don't want to try to
> fire up new workers or calling in rescuers. If nr_running is bumped
> up from ttwu(), a woken up but not yet running worker already counts
> as running. With the suggested change, when we hit such heavy CPU
> thrashing, workqueue code will add things on top of it.

That's the whole problem with that self forking workqueue stuff and
I'm not accepting that ttwu() is the only solution to that. Following
that logic would just invite more abusers of callbacks into ttwu() and
if you think it through then the logical consequence is to have an
upcall hook into userspace so a threading/forking server knows how
many instances are on the fly to avoid creating new ones under
pressure.

Thanks,

tglx


\
 
 \ /
  Last update: 2011-06-23 12:01    [W:0.118 / U:1.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site