From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Jiri Kosina <jkosina@suse.cz>,
Jeremy Fitzhardinge <jeremy@xensource.com>,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] x86: remove byte locks
Date: Tue, 13 Jan 2009 15:10:12 -0800 [thread overview]
Message-ID: <496D1F54.7070104@goop.org> (raw)
In-Reply-To: <20090112124401.GA31939@elte.hu>
Ingo Molnar wrote:
> * Jiri Kosina <jkosina@suse.cz> wrote:
>
>
>> On Mon, 12 Jan 2009, Ingo Molnar wrote:
>>
>>
>>>> Remove byte locks implementation, which was introduced by Jeremy in
>>>> 8efcbab6 ("paravirt: introduce a "lock-byte" spinlock implementation"),
>>>> but turned out to be dead code that is not used by any in-kernel
>>>> virtualization guest (Xen uses its own variant of spinlocks implementation
>>>> and KVM is not planning to move to byte locks).
>>>>
>>>> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
>>>> ---
>>>> arch/x86/include/asm/paravirt.h | 2 -
>>>> arch/x86/include/asm/spinlock.h | 66 +--------------------------------
>>>> arch/x86/kernel/paravirt-spinlocks.c | 10 -----
>>>> 3 files changed, 2 insertions(+), 76 deletions(-)
>>>>
>>> didnt you send a patch in this lkml thread:
>>>
>>> Subject: Re: Is 386 processor still supported?
>>>
>>> that makes use of byte-locks on i386 ?
>>>
>> I did, but that patch was bogus, as we indeed don't support smp on M386.
>>
>> This is totally independent -- it just removes dead code (byte locks) that
>> has no in-tree user at all.
>>
>>
>>> But i guess we should solve M386 and M486 by only allowing it on !SMP,
>>> hence spinlock support is moot there, right?
>>>
>> Agreed. But that's a different issue.
>>
>
> ok. Jeremy, can we apply Jiri's patch or do you still have plans with that
> code?
My intention for that code was always that it be a simplest-possible
reference implementation for the spinlock pvops, and perhaps a basis for
a more specialized version (the Xen version is based on byte locks, for
example).
The code is "dead" in the sense that it has no users, but it also
results in no generated code, and should be easy to maintain if the
spinlock API is changed (as it is a canary to show that the other
implementations will need changing too). In particular, the "paravirt
spinlock" mechanism relies on all implementations using the same static
initializer, and I wanted there to be an obvious second implementation
so that if someone decided to change the ticketlock initializer, they'd
be forced to consider what happens with the bytelock initializer (and by
extension, any other implementation).
It's also useful as a baseline for benchmarking.
J
next prev parent reply other threads:[~2009-01-13 23:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-12 11:53 [PATCH] x86: remove byte locks Jiri Kosina
2009-01-12 12:07 ` Ingo Molnar
2009-01-12 12:36 ` Jiri Kosina
2009-01-12 12:44 ` Ingo Molnar
2009-01-13 23:10 ` Jeremy Fitzhardinge [this message]
2009-01-13 23:22 ` Jiri Kosina
2009-01-13 23:52 ` Jeremy Fitzhardinge
2009-01-15 10:55 ` Jiri Kosina
2009-01-15 10:58 ` Ingo Molnar
2009-01-20 16:12 ` Jiri Kosina
2009-01-20 16:14 ` Ingo Molnar
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=496D1F54.7070104@goop.org \
--to=jeremy@goop.org \
--cc=hpa@zytor.com \
--cc=jeremy@xensource.com \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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