From: Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>,
Suresh B Siddha <suresh.b.siddha@intel.com>,
Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] Don't export sched_mc_power_savings in laptops
Date: Sat, 29 Nov 2008 17:00:36 +0530 [thread overview]
Message-ID: <493127DC.4020202@linux.vnet.ibm.com> (raw)
In-Reply-To: <1227957612-7000-1-git-send-email-mahesh@linux.vnet.ibm.com>
Mahesh Salgaonkar 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)
> #define smt_capable() (smp_num_siblings > 1)
> #endif
>
>
The sched_mc_power_savings in sysfs does not help on single socket
multicore laptops.
The above patch has been tested on dual core laptop and dual socket quad
core intel processor based server.
Thanks,
-Mahesh.
next prev parent reply other threads:[~2008-11-29 11:37 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 [this message]
2008-11-30 17:40 ` Ingo Molnar
2008-12-01 6:50 ` Mahesh Jagannath Salgaonkar
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=493127DC.4020202@linux.vnet.ibm.com \
--to=mahesh@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=suresh.b.siddha@intel.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