lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 06 Feb 2012 17:34:43 -0800
From:	David Daney <ddaney.cavm@...il.com>
To:	"H. Peter Anvin" <hpa@...or.com>
CC:	Venkatesh Pallipadi <venki@...gle.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	Suresh Siddha <suresh.b.siddha@...el.com>,
	Aaron Durbin <adurbin@...gle.com>,
	Paul Turner <pjt@...gle.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] Extend mwait idle to optimize away IPIs when possible

On 02/06/2012 05:24 PM, H. Peter Anvin wrote:
> On 02/06/2012 04:26 PM, David Daney wrote:
>> On 02/06/2012 12:42 PM, Venkatesh Pallipadi wrote:
>> [...]
>>> index 5bed94e..6a56cb0 100644
>>> --- a/arch/x86/Kconfig
>>> +++ b/arch/x86/Kconfig
>>> @@ -170,6 +170,11 @@ config GENERIC_TIME_VSYSCALL
>>>        bool
>>>        default X86_64
>>>
>>> +config AVOID_IPI_ON_IDLE
>>> +    bool
>>> +    depends on X86_64
>>> +    default X86_64
>>> +
>>
>> Can you get rid of this part...
>>
>>>    config ARCH_HAS_CPU_RELAX
>>>        def_bool y
>>>
>> [...]
>>> diff --git a/arch/x86/kernel/acpi/cstate.c
>>> b/arch/x86/kernel/acpi/cstate.c
>>> index f50e7fb..340c4e9 100644
>>> --- a/arch/x86/kernel/acpi/cstate.c
>>> +++ b/arch/x86/kernel/acpi/cstate.c
>>> @@ -161,6 +161,14 @@ EXPORT_SYMBOL_GPL(acpi_processor_ffh_cstate_probe);
>>>     */
>>>    void mwait_idle_with_hints(unsigned long ax, unsigned long cx)
>>>    {
>>> +#ifdef CONFIG_AVOID_IPI_ON_IDLE
>>
>>
>> ... and change all of these to #ifdef CONFIG_64BIT
>>
>>> +    int oldval, cpu = smp_processor_id();
>>> +
>
> Why should this be 64-bit specific??
>

Well I don't know that part.  The gist of my comment was to get rid of 
an unneeded new config variable.

If this works just as well for 32-bit, then by all means do it there too.

In any event, I think you want the kernel to automatically do it if the 
CPU is capable, and not have a manual config setting you have to fiddle 
with.

David Daney
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ