[lkml]   [2008]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/5] sched: pull only one task during NEWIDLE balancing to limit critical section
Nick Piggin wrote:
> On Tuesday 26 August 2008 06:15, Gregory Haskins wrote:
>> git-id c4acb2c0669c5c5c9b28e9d02a34b5c67edf7092 attempted to limit
>> newidle critical section length by stopping after at least one task
>> was moved. Further investigation has shown that there are other
>> paths nested further inside the algorithm which still remain that allow
>> long latencies to occur with newidle balancing. This patch applies
>> the same technique inside balance_tasks() to limit the duration of
>> this optional balancing operation.
>> Signed-off-by: Gregory Haskins <>
>> CC: Nick Piggin <>
> Hmm, this (andc4acb2c0669c5c5c9b28e9d02a34b5c67edf7092) still could
> increase the amount of work to do significantly for workloads where
> the CPU is going idle and pulling tasks over frequently. I don't
> really like either of them too much.

I had a feeling you may object to this patch based on your comments on
the first one. Thats why I CC'd you so you wouldnt think I was trying
to sneak something past ;)

> Maybe increasing the limit would effectively amortize most of the
> problem (say, limit to move 16 tasks at most).

The problem I was seeing was that even moving 2 was too many in the
ftraces traces I looked at. I think the idea of making a variable limit
(set via a sysctl, etc) here is a good one, but I would recommend we
have the default be "1" for CONFIG_PREEMPT (or at least
CONFIG_PREEMPT_RT) based on what I know right now. I know last time
you objected to any kind of special cases for the preemptible kernels,
but I think this is a good compromise. Would this be acceptable?

Thanks Nick,


[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2008-08-26 13:41    [W:0.085 / U:41.000 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site