[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 11 Oct 2010 00:07:26 +0900
From: Akinobu Mita <akinobu.mita@...il.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
Arnd Bergmann <arnd@...db.de>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 1/5] bitops: add generic implementation of ext2 atomic
bitops by test_and_{set,clear}_bit
2010/10/8 Christoph Hellwig <hch@...radead.org>:
> On Fri, Oct 08, 2010 at 07:03:09PM +0900, Akinobu Mita wrote:
>> This introduces asm-generic header file for generic implementation of
>> ext2 atomic bit operations by test_and_set_bit() and test_and_clear_bit().
>>
>> alpha, arm, cris, frv, ia64, m68k, mn10300, parisc, powerpc, s390,
>> sparc64, x86, xtensa can use this header file in its asm/bitops.h.
>
> Care to rename the functions to le_* instead of ext2_* while you're at
> it and documenting their semantics?
OK, as several people requested in another threads, I'll introduce
little endian bit operations for all architectures and rename ext2
bitops to le bitops.
BTW, I have a question about ext2 atomic bit operations.
Some architectures use spinlock to implement it
(asm-generic/bitops/ext2-atomic.h). Most other architectures use
test_and_set_bit() and test_and_clear_bit() as this patch shows.
Why are there two implementations? test_and_{set,clear}_bit() are more
costly operations than spinlock for some architectures?
--
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