lkml.org 
[lkml]   [2000]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: GCC proposal for "@" asm constraint
On Fri, Sep 22, 2000 at 11:08:21AM -0700, Linus Torvalds wrote:
> The same is true in the filesystems - many of them want to change block or
> inode allocation bitmap bits, but they have to hold a lock anyway (usually
> the kernel lock in addition to the superblock lock.

The patch addresses the filesystems case introducing __set_bit,
__test_and_clear_bit and __test_and_set_bit and it infact starts the split
of the bitops.

In the patch the __*_bit non atomic API isn't fully implemented though
(__clear_bit, __test_and_change_bit are missing for example) and no common code
is using the current __*_bit nonatomic variant of the bitops directly anyway.
The fs happens to use it because of the minix_* ext2_* macros in the arch
specific part). Finishing implementing the nonatomic bitops is very easy and I
agree it's good idea (I'll soon upload an incremental patch to implement the
few missing __*_bit calls) and then the common code (like the alloc/free as you
pointed out) can start using the __ variant to allow the compiler not to trash
registers and to skip SMP locks when not necessary.

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.111 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site