From: Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
Suresh B Siddha <suresh.b.siddha@intel.com>,
Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
svaidy@linux.vnet.ibm.com
Subject: Re: [PATCH] Don't export sched_mc_power_savings in laptops
Date: Mon, 01 Dec 2008 12:20:27 +0530 [thread overview]
Message-ID: <49338933.1030401@linux.vnet.ibm.com> (raw)
In-Reply-To: <20081130174034.GA28614@elte.hu>
Ingo Molnar wrote:
> * Mahesh Salgaonkar <mahesh@linux.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@linux.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.
next prev parent reply other threads:[~2008-12-01 6:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-29 11:20 [PATCH] Don't export sched_mc_power_savings in laptops Mahesh Salgaonkar
2008-11-29 11:30 ` Mahesh Jagannath Salgaonkar
2008-11-30 17:40 ` Ingo Molnar
2008-12-01 6:50 ` Mahesh Jagannath Salgaonkar [this message]
2008-12-01 7:44 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49338933.1030401@linux.vnet.ibm.com \
--to=mahesh@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=suresh.b.siddha@intel.com \
--cc=svaidy@linux.vnet.ibm.com \
--cc=venkatesh.pallipadi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox