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
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171003170314.GB32309@bombadil.infradead.org>
Date:   Tue, 3 Oct 2017 10:03:14 -0700
From:   Matthew Wilcox <willy@...radead.org>
To:     Jens Axboe <axboe@...nel.dk>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        Johannes Weiner <hannes@...xchg.org>, Jan Kara <jack@...e.cz>
Subject: Re: [PATCH 10/12] writeback: only allow one inflight and pending
 full flush

On Tue, Oct 03, 2017 at 10:11:20AM -0600, Jens Axboe wrote:
> On 10/03/2017 10:06 AM, Matthew Wilcox wrote:
> > test_and_test_and_set_bit()?  It's an unusual name, so when either
> > reading it or writing it, people are going to say "something unusual
> > here", rather than "That Jens Axboe is such a n00b, he doesn't know how
> > to use test_and_set_bit()".  There are a few references out on the web
> > to test-and-test-and-set already, so it's not entirely unique to Linux.
> 
> I like that suggestion, but would suggest we make it
> test_then_test_and_set_bit() since the 'then' naming would work for
> having similar test_then_clear_bit() and not clash with
> test_and_set_bit().

'test-then-test-and-set' has the disadvantage of not being readily
searchable ... if you search for 'test-and-test-and-set', you find
discussions about why you might want to use this technique.  Also, I
don't like having set use a different name from clear; either we want
'test_and_test_and_(set|clear)_bit()' or 'test_then_(set|clear)_bit()'.

Usually I'd be in favour of the shorter name, but this should be a rare
thing for people to use, and if you search for test-then-clear you get
a lot of results about pregnancy tests ...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ