lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 12 Oct 2010 12:39:37 +0900 From: Akinobu Mita <akinobu.mita@...il.com> To: Arnd Bergmann <arnd@...db.de> Cc: Christoph Hellwig <hch@...radead.org>, linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org, 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/11 Arnd Bergmann <arnd@...db.de>: > On Sunday 10 October 2010 17:07:26 Akinobu Mita wrote: >> 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? > > I would guess that is only true on architectures that implement all atomics > using a hashed spinlock like cris, sparc32 or parisc. This way the user > can decide which spinlock to use rather than have the arch code calculate > a hash on the pointer. Thanks. It looks quite right. > This is an ext2 specific micro-optimization that I don't think makes > sense in the generic le bitops code. OK, I'll only rename ext2 non-atomic bitops to le bitops and keep ext2 atomic bitops for now. -- 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