[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YWkf63g44Puobxrp@infradead.org>
Date: Thu, 14 Oct 2021 23:30:03 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Shiyang Ruan <ruansy.fnst@...itsu.com>
Cc: linux-kernel@...r.kernel.org, linux-xfs@...r.kernel.org,
nvdimm@...ts.linux.dev, linux-mm@...ck.org,
linux-fsdevel@...r.kernel.org, djwong@...nel.org,
dan.j.williams@...el.com, david@...morbit.com, hch@...radead.org,
jane.chu@...cle.com
Subject: Re: [PATCH v7 1/8] dax: Use rwsem for dax_{read,write}_lock()
On Fri, Sep 24, 2021 at 09:09:52PM +0800, Shiyang Ruan wrote:
> In order to introduce dax holder registration, we need a write lock for
> dax. Because of the rarity of notification failures and the infrequency
> of registration events, it would be better to be a global lock rather
> than per-device. So, change the current lock to rwsem and introduce a
> write lock for registration.
I don't think taking the rw_semaphore everywhere will scale, as
basically any DAX based I/O will take it (in read mode).
So at a minimum we'd need a per-device percpu_rw_semaphore if we want
to go there.
Powered by blists - more mailing lists