[lkml]   [2003]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Fix find busiest queue 2.6.0-test9

Martin J. Bligh wrote:

>On the same vein ... this looks odd:
> * We fend off statistical fluctuations in runqueue lengths by
> * saving the runqueue length during the previous load-balancing
> * operation and using the smaller one the current and saved lengths.
> * If a runqueue is long enough for a longer amount of time then
> * we recognize it and pull tasks from it.
> if (idle || (this_rq->nr_running > this_rq->prev_cpu_load[this_cpu]))
> nr_running = this_rq->nr_running;
> else
> nr_running = this_rq->prev_cpu_load[this_cpu];
>It says we uses the smaller of the two in the comment, but then it seems to
>use the > of the two in the code? Unless I'm losing it, which is likely ;-)

You want the larger of the two values to be taken for the destination
queue, and the smaller to be taken for the source queue. This way you
get a minimal imbalance.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:58    [W:0.047 / U:14.248 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site