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]
Message-ID: <4F44C7E9.6000303@linux.vnet.ibm.com>
Date:	Wed, 22 Feb 2012 16:18:09 +0530
From:	Raghavendra K T <raghavendra.kt@...ux.vnet.ibm.com>
To:	Gleb Natapov <gleb@...hat.com>
CC:	Jeremy Fitzhardinge <jeremy@...p.org>, Tejun Heo <tj@...nel.org>,
	John Stultz <johnstul@...ibm.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>,
	Peter Zijlstra <peterz@...radead.org>,
	David Howells <dhowells@...hat.com>,
	Andrew Jones <drjones@...hat.com>
Subject: Re: [PATCH 1/1] linux headers: header file(s) changes to enable spinlock
 use jumplabel

On 02/20/2012 03:03 PM, Gleb Natapov wrote:
> On Mon, Feb 20, 2012 at 11:44:25AM +0530, Raghavendra K T wrote:
>> On 02/20/2012 10:46 AM, Jeremy Fitzhardinge wrote:
[...]
>> But does pvlock have to use jump
>>>> label? I looked at the code and it is used like paravirt patching. Meaning
>>>> it is patched only once on a boot up when XEN is detected. May be use
>>>> paravirt patching instead of jump label? What if jump label will want
>>>> to use spinlock for some reason in the future (it uses mutex currently)?
>>>
>>> The point of the pv ticketlocks is to avoid any pvop calls on the
>>> lock/unlock fastpath, relegating them to only the slow path.
>>> Unfortunately, the pv unlock case can't be identical with the non-pv
>>> unlock, and jump_labels are lighter weight and more efficient than pvops.
>>>
>>> It doesn't matter if jump_labels start using spinlocks; all we need the
>>> jump_label machinery to do is patch the jump sites in the code so that
>>> one of two execution paths can be selected.  Since all the ticketlock
>>> jump_label patching happens before SMP is enabled, there's no problem
>>> with changing a lock while a cpu is executing the code.
>>>
>>
>> I also felt agreeing with Jeremy. seemed to me that latter is more
>> performance friendly. no?.
>>
>
> I thought not about pvop, but about alternative().  jump_labels is used
> by spinlock to patch out jump into nops It can be done via alternative()
> too I think.

I had remembered that this discussion already happened with Jeremy's V5
of ticketlock patches. pulling out link :

https://lkml.org/lkml/2011/10/13/384

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