[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4e839278-fadb-24da-3a4e-50e58a0e7cc6@huaweicloud.com>
Date: Thu, 12 Jan 2023 09:05:22 +0800
From: Hou Tao <houtao@...weicloud.com>
To: David Howells <dhowells@...hat.com>
Cc: linux-cachefs@...hat.com, Jeff Layton <jlayton@...nel.org>,
linux-erofs@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
Jingbo Xu <jefflexu@...ux.alibaba.com>, houtao1@...wei.com
Subject: Re: [PATCH v2 1/2] fscache: Use wait_on_bit() to wait for the freeing
of relinquished volume
Hi,
On 1/12/2023 12:06 AM, David Howells wrote:
> Hou Tao <houtao@...weicloud.com> wrote:
>
>> clear_bit(FSCACHE_VOLUME_ACQUIRE_PENDING, &cursor->flags);
>> + /*
>> + * Paired with barrier in wait_on_bit(). Check
>> + * wake_up_bit() and waitqueue_active() for details.
>> + */
>> + smp_mb__after_atomic();
>> wake_up_bit(&cursor->flags, FSCACHE_VOLUME_ACQUIRE_PENDING);
> What two values are you applying a partial ordering to?
cursor->flags and wq->head. fscache_wake_pending_volume() will write
cursor->flags and read wq->head through waitqueue_active(), and the wait will
write wq->head then read cursor->flags.
>
> David
>
Powered by blists - more mailing lists