lkml.org 
[lkml]   [2013]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: false nr_running check in load balance?
On Tue, Aug 13, 2013 at 01:08:17AM -0700, Paul Turner wrote:
> On Tue, Aug 13, 2013 at 12:38 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> > On Tue, Aug 13, 2013 at 12:45:12PM +0800, Lei Wen wrote:
> >> > Not quite right; I think you need busiest->cfs.h_nr_running.
> >> > cfs.nr_running is the number of entries running in this 'group'. If
> >> > you've got nested groups like:
> >> >
> >> > 'root'
> >> > \
> >> > 'A'
> >> > / \
> >> > t1 t2
> >> >
> >> > root.nr_running := 1 'A', even though you've got multiple running tasks.

One thing though; doesn't h_nr_running over count the number of tasks?
That is, doesn't it count the runnable entities so the above case would
give root.h_nr_running := 3, where we would only have 2 runnable tasks.

Double check this and be careful when doing the conversion.


\
 
 \ /
  Last update: 2013-08-15 20:01    [W:0.107 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site