[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87txpxu9cx.fsf@sejong.aot.lge.com>
Date: Thu, 31 Jan 2013 15:58:38 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Michael Wang <wangyun@...ux.vnet.ibm.com>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
linux-kernel@...r.kernel.org,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>, tglx@...utronix.de
Subject: Re: [RFC 2/2] sched/fair: prefer a CPU in the "lowest" idle state
On Thu, 31 Jan 2013 14:39:20 +0800, Michael Wang wrote:
> On 01/31/2013 01:16 PM, Namhyung Kim wrote:
>> Anyway, I have an idea with this in mind. It's like adding a new "idle
>> load" to each idle cpu rather than special casing the idle cpus like
>> above. IOW an idle cpu will get very small load weight depends on how
>> deep it's slept so that it can be compared to other cpus in a same way
>> but we can find prefered (lowest load) cpu among the idle cpus.
>>
>> The simple way I can think of is adding idle_level to a rq load in
>> weighted_cpuload():
>>
>> static unsigned long weighted_cpuload(const int cpu)
>> {
>> return cpu_rq(cpu)->load.weight + cpuidle_get_state(cpu);
>> }
>
> Hmm... then we don't need changes in find_idlest_cpu(), just compare the
> load as before, but it works only when the appendix state value is
> smaller than the lowest load of one task, which is 15 currently, I'm not
> sure whether we have the promise...
You said about a nice 19 process, right? But I found that SCHED_IDLE
task will have weight of 3. :(
#define WEIGHT_IDLEPRIO 3
But AFAIK the number of states in cpuidle is usually less than 10 so maybe
we can change the weight then, but there's no promise...
Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists