[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49338933.1030401@linux.vnet.ibm.com>
Date: Mon, 01 Dec 2008 12:20:27 +0530
From: Mahesh Jagannath Salgaonkar <mahesh@...ux.vnet.ibm.com>
To: Ingo Molnar <mingo@...e.hu>
CC: Linux Kernel <linux-kernel@...r.kernel.org>,
Suresh B Siddha <suresh.b.siddha@...el.com>,
Venkatesh Pallipadi <venkatesh.pallipadi@...el.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
svaidy@...ux.vnet.ibm.com
Subject: Re: [PATCH] Don't export sched_mc_power_savings in laptops
Ingo Molnar wrote:
> * Mahesh Salgaonkar <mahesh@...ux.vnet.ibm.com> wrote:
>
>
>> Fix to prevent sched_mc_power_saving from being exported through sysfs
>> for multicore single socket (Laptop).
>>
>> CPU core map of the boot cpu should be equal to possible number
>> of cpus for single socket system.
>>
>> This fix has been developed at FOSS.in kernel workout.
>>
>> Signed-off-by: Mahesh Salgaonkar <mahesh@...ux.vnet.ibm.com>
>>
>> diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
>> index 4850e4b..4adc830 100644
>> --- a/arch/x86/include/asm/topology.h
>> +++ b/arch/x86/include/asm/topology.h
>> @@ -239,7 +239,7 @@ struct pci_bus;
>> void set_pci_bus_resources_arch_default(struct pci_bus *b);
>>
>> #ifdef CONFIG_SMP
>> -#define mc_capable() (boot_cpu_data.x86_max_cores > 1)
>> +#define mc_capable() (cpus_weight(per_cpu(cpu_core_map,0)) != nr_cpu_ids)
>>
>
> hm, dunno. sched_mc_power_savings should have no effect on single-socket
> systems, right? So the knob should have no effect.
>
> Ingo
>
Hi Ingo,
Yes, it will not have any effect but it enables additional code path
leading to an
overhead in case of single-socket system. This overhead is only if
"sched_mc_power_savings = 1", however we are still leaving it to zero
(default) and
preventing user space from turning it on by mistake.
Thanks,
-Mahesh.
--
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