[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2308529.1670585211@warthog.procyon.org.uk>
Date: Fri, 09 Dec 2022 11:26:51 +0000
From: David Howells <dhowells@...hat.com>
To: Hou Tao <houtao@...weicloud.com>
Cc: dhowells@...hat.com, linux-cachefs@...hat.com,
Jeff Layton <jlayton@...nel.org>, linux-erofs@...ts.ozlabs.org,
linux-kernel@...r.kernel.org,
"houtao1@...wei.com" <houtao1@...wei.com>
Subject: Re: [PATCH] fscache: Use wake_up_var() to wake up pending volume acquisition
Hou Tao <houtao@...weicloud.com> wrote:
> > clear_bit(FSCACHE_VOLUME_ACQUIRE_PENDING, &cursor->flags);
Maybe this should be clear_bit_unlock() instead.
And I wonder if:
set_bit(FSCACHE_VOLUME_ACQUIRE_PENDING, &candidate->flags);
in fscache_hash_volume() needs a barrier before it.
> > - wake_up_bit(&cursor->flags, FSCACHE_VOLUME_ACQUIRE_PENDING);
> > + /*
> > + * Paired with barrier in wait_var_event(). Check
> > + * waitqueue_active() and wake_up_var() for details.
> > + */
> > + smp_mb__after_atomic();
> > + wake_up_var(&cursor->flags);
That doesn't seem right.
wake_up_bit() is more selective, so should be preferred to wake_up_var().
David
Powered by blists - more mailing lists