Messages in this thread | | | Subject | Re: CFS Scheduler : Period : for NCPUs : Code Suggestion Change | From | Peter Zijlstra <> | Date | Mon, 06 Jul 2009 14:46:20 +0200 |
| |
On Tue, 2009-06-30 at 18:36 -0700, Mitchell Erblich wrote: > This is NOT A PATCH. > > PLEASE include my email in the reply as I am not currently on > the linux kernel mail alias. > > This code snap is grabbed from what is believed to be a semi-current > OS source (fxr.watson.org) comparison webpage. > > Upon a quick CFS scheduler code walk, increasing the period > should ALSO be dependent on the number of online/active CPUs. > > The period should be adjusted based on the number of > online CPUs. This change allows NCPUs * tasks without > changing/increasing the period. > > On first thought NR_CPUS should give the number of cpu on > the system, however, this may be different from the number of > CPUs online, thus.. > > Change #1: place after line 425 > int cpu, ncpu; > > > Change #2: place before line 427 > for_each_online_cpu(cpu) { > ncpu++; > } > nr_running /= ncpu; >
Ah, but the nr_running number used is _per_ cpu already, so would that address your concern?
| |