Messages in this thread | | | Date | Wed, 14 Jan 2009 00:22:15 +0100 (CET) | From | Jiri Kosina <> | Subject | Re: [PATCH] x86: remove byte locks |
| |
On Tue, 13 Jan 2009, Jeremy Fitzhardinge wrote:
> 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).
Why can't this just be somewhere in documentation? (possibly even with the byte locks code as a reference).
It is IMHO just totally confusing to have a spinlock implementation that is not used at all in the tree. It took me quite some time to go through this until I finally figured out that this code is actually never used. Currently, on first sight it might seem that byte locks are used whenever CONFIG_PARAVIRT is set, which is not true.
And apparently even Linus got confused by this, which also tells us something by itself, see [1].
[1] http://marc.info/?l=linux-kernel&m=123144211719754&w=2
-- Jiri Kosina SUSE Labs
| |