mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com>
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, 1 Dec 2008 08:44:47 +0100	[thread overview]
Message-ID: <20081201074447.GB27768@elte.hu> (raw)
In-Reply-To: <49338933.1030401@linux.vnet.ibm.com>


* Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com> wrote:

> 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.

okay, makes sense - i've applied it to tip/sched/urgent (for v2.6.28 
merge), thanks Mahesh!

	Ingo

      reply	other threads:[~2008-12-01  7:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-29 11:20 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
2008-12-01  7:44     ` Ingo Molnar [this message]

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=20081201074447.GB27768@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mahesh@linux.vnet.ibm.com \
    --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

Powered by JetHome