From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751296AbdJCRDR (ORCPT ); Tue, 3 Oct 2017 13:03:17 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:48544 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750767AbdJCRDP (ORCPT ); Tue, 3 Oct 2017 13:03:15 -0400 Date: Tue, 3 Oct 2017 10:03:14 -0700 From: Matthew Wilcox To: Jens Axboe Cc: Linus Torvalds , Andrew Morton , Linux Kernel Mailing List , linux-fsdevel , Johannes Weiner , Jan Kara Subject: Re: [PATCH 10/12] writeback: only allow one inflight and pending full flush Message-ID: <20171003170314.GB32309@bombadil.infradead.org> References: <1506543239-31470-1-git-send-email-axboe@kernel.dk> <1506543239-31470-11-git-send-email-axboe@kernel.dk> <20170928144100.e11801ef742521e0e3f4b8df@linux-foundation.org> <552d4502-0b0a-87fc-7b16-6b322c3af3ed@kernel.dk> <20171003160610.GA32309@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ...