From: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>, Tejun Heo <tj@kernel.org>,
John Stultz <johnstul@us.ibm.com>,
LKML <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
David Howells <dhowells@redhat.com>,
Andrew Jones <drjones@redhat.com>
Subject: Re: [PATCH 1/1] linux headers: header file(s) changes to enable spinlock use jumplabel
Date: Wed, 22 Feb 2012 16:18:09 +0530 [thread overview]
Message-ID: <4F44C7E9.6000303@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120220093350.GF10038@redhat.com>
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
prev parent reply other threads:[~2012-02-22 10:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-17 8:25 [PATCH 1/1] linux headers: header file(s) changes to enable spinlock use jumplabel Raghavendra K T
2012-02-18 23:21 ` Jeremy Fitzhardinge
2012-02-19 9:24 ` Gleb Natapov
2012-02-20 5:16 ` Jeremy Fitzhardinge
2012-02-20 6:14 ` Raghavendra K T
2012-02-20 9:33 ` Gleb Natapov
2012-02-20 15:00 ` Andrew Jones
2012-02-20 17:51 ` Raghavendra K T
2012-02-21 15:23 ` Andrew Jones
2012-02-22 11:55 ` Raghavendra K T
2012-02-22 10:48 ` Raghavendra K T [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=4F44C7E9.6000303@linux.vnet.ibm.com \
--to=raghavendra.kt@linux.vnet.ibm.com \
--cc=dhowells@redhat.com \
--cc=drjones@redhat.com \
--cc=gleb@redhat.com \
--cc=jeremy@goop.org \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=vatsa@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).