[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFw14cHWfcqi_4HpMserCDLX97kbnV2X+L+fio3wRHpkig@mail.gmail.com>
Date: Thu, 28 Sep 2017 14:44:15 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Jens Axboe <axboe@...nel.dk>,
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 Thu, Sep 28, 2017 at 2:41 PM, Andrew Morton
<akpm@...ux-foundation.org> wrote:
>
> test_and_set_bit()?
If there aren't any atomicity concerns (either because of higher-level
locking, or because racing and having two people set the bit is fine),
it can be better to do them separately if the test_bit() is the common
case and you can avoid dirtying a cacheline that way.
But yeah, if that is the case, it might be worth documenting, because
test_and_set_bit() is the more obviously appropriate "there can be
only one" model.
Linus
Powered by blists - more mailing lists