[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87h8upxrvy.fsf@linux.intel.com>
Date: Mon, 23 Oct 2017 18:21:21 -0700
From: Andi Kleen <ak@...ux.intel.com>
To: kemi <kemi.wang@...el.com>
Cc: Jens Axboe <axboe@...nel.dk>, Jan Kara <jack@...e.cz>,
Darrick J Wong <darrick.wong@...cle.com>,
Eric Biggers <ebiggers@...gle.com>,
Andreas Gruenbacher <agruenba@...hat.com>,
Jeff Layton <jlayton@...hat.com>,
Dave <dave.hansen@...ux.intel.com>,
Andi Kleen <andi.kleen@...el.com>,
Tim Chen <tim.c.chen@...el.com>,
Ying Huang <ying.huang@...el.com>,
Aaron Lu <aaron.lu@...el.com>,
Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] buffer: Avoid setting buffer bits that are already set
kemi <kemi.wang@...el.com> writes:
>
> I'll see if I can find some
>> time to implement the above in a nice way.
>
> Agree. Maybe something like test_and_set_bit() would be more suitable.
test_and_set_bit is a very different operation for the CPU because
it is atomic for both. But we want the initial read to not
be atomic.
If you add special functions use a different variant that is only
atomic for the set.
-Andi
Powered by blists - more mailing lists