[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F212DFF.8060802@kernel.dk>
Date: Thu, 26 Jan 2012 11:42:07 +0100
From: Jens Axboe <axboe@...nel.dk>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
CC: Vaidyanathan Srinivasan <svaidy@...ux.vnet.ibm.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Indan Zupancic <indan@....nu>,
Youquan Song <youquan.song@...el.com>,
Ingo Molnar <mingo@...e.hu>,
Arjan van de Ven <arjan@...ux.intel.com>,
Suresh Siddha <suresh.b.siddha@...el.com>,
Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v1 1/2] sched: unified sched_powersavings sysfs tunable
On 01/25/2012 03:53 PM, Peter Zijlstra wrote:
> On Mon, 2012-01-16 at 21:52 +0530, Vaidyanathan Srinivasan wrote:
>> +++ b/block/blk.h
>> @@ -167,14 +167,15 @@ static inline int queue_congestion_off_threshold(struct request_queue *q)
>> static inline int blk_cpu_to_group(int cpu)
>> {
>> int group = NR_CPUS;
>> -#ifdef CONFIG_SCHED_MC
>> - const struct cpumask *mask = cpu_coregroup_mask(cpu);
>> - group = cpumask_first(mask);
>> -#elif defined(CONFIG_SCHED_SMT)
>> - group = cpumask_first(topology_thread_cpumask(cpu));
>> +#ifdef CONFIG_SCHED_POWERSAVE
>> + if (smt_capable())
>> + group = cpumask_first(topology_thread_cpumask(cpu));
>> + else
>> + group = cpumask_first(cpu_coregroup_mask(cpu));
>> #else
>> return cpu;
>> #endif
>> + /* Possible dead code?? */
>> if (likely(group < NR_CPUS))
>> return group;
>> return cpu;
>
> After going, WTF is block doing! I had a closer look and this doesn't
> seem right at all. The old code would use coregroup_mask when SCHED_MC
> && SCHED_SMT, the new code does something else.
>
> Jens, what is this thing trying to do?
Not surprised that it's broken for some configs. The intent of the code
is to return the first CPU in the "group" that the passed in core/thread
belongs to. This is used to decide whether to perform a completion
locally, or to send it off to a different "group".
--
Jens Axboe
--
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