lkml.org 
[lkml]   [2008]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Don't export sched_mc_power_savings in laptops

* 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


\
 
 \ /
  Last update: 2008-11-30 18:43    [W:0.407 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site