Messages in this thread | | | Date | Sat, 20 Jul 2002 14:15:39 -0700 | From | William Lee Irwin III <> | Subject | Re: [PATCH] generalized spin_lock_bit |
| |
On 20 Jul 2002, Robert Love wrote: >> The attached patch implements bit-sized spinlocks via the following >> interfaces:
On Sat, Jul 20, 2002 at 01:40:22PM -0700, Linus Torvalds wrote: > In particular, with the current pte_chain_lock() interface, it will be > _trivial_ to turn that bit in page->flags to be instead a hash based on > the page address into an array of spinlocks. Which is a lot more portable > than the current code. > (The current code works, but look at what it generates on old sparcs, for > example).
I was hoping to devolve the issue of the implementation of it to arch maintainers by asking for this. I was vaguely aware that the atomic bit operations are implemented via hashed spinlocks on PA-RISC and some others, so by asking for the right primitives to come back up from arch code I hoped those who spin elsewhere might take advantage of their window of exclusive ownership.
Would saying "Here is an address, please lock it, and if you must flip a bit, use this bit" suffice? I thought it might give arch code enough room to wiggle, but is it enough?
Thanks, Bill - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |