Messages in this thread | | | Date | Sun, 09 Nov 2003 09:10:52 -0800 | From | "Martin J. Bligh" <> | Subject | Re: [PATCH] Fix find busiest queue 2.6.0-test9 |
| |
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 ;-)
Later, we do "*imbalance = (max_load - nr_running) / 2;" ... to "fend off statistical fluctuations", we want to reduce imbalance, which would mean a larger nr_running .... so to my mind, it's the comment that's wrong?
M.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |