From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB8BEC433F5 for ; Thu, 16 Dec 2021 07:46:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7930D6B0073; Thu, 16 Dec 2021 02:46:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 71B6F6B0074; Thu, 16 Dec 2021 02:46:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5E3A76B0075; Thu, 16 Dec 2021 02:46:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0193.hostedemail.com [216.40.44.193]) by kanga.kvack.org (Postfix) with ESMTP id 4F9A26B0073 for ; Thu, 16 Dec 2021 02:46:25 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 00B8A181AC9CC for ; Thu, 16 Dec 2021 07:46:14 +0000 (UTC) X-FDA: 78922874268.28.5C60403 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf04.hostedemail.com (Postfix) with ESMTP id 170D140014 for ; Thu, 16 Dec 2021 07:46:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=/KAkd7ayUP/AjC9UKcxkNCC72YBc5E46xyfAFBsG3Kc=; b=cRRVbigsH/pXmcZncjRPpkoNw7 iGkWGZMDkG8n4ABIh6CyZadqnPfVHz07VFFy2U7nKJmcK6yoU3llI51NTXnqEHj6sS3YoYJFvey72 OGTESfvUTllzClgAbjF4tOV03NkTVCyBYsG4SyeWLhYKO5DypgApwuXgq5vDfaXUoDnkwS9QemGeS wII7rRfJSeJ7wuRDa6e/Sp4X+zllP4ZUWi8UxFn9QpBKl904UjObggEC2KCYENPHsfsKvt/Kz+XXF AcKNdmCagQbpXHZtg7NVu3q9J1hS9aQyHTZkHu6Ge4WQ12S5ky7XbTtI4VyyipzREqe7zLMaC3ltV 0aVQWvTw==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxlSn-0040NQ-W8; Thu, 16 Dec 2021 07:46:05 +0000 Date: Wed, 15 Dec 2021 23:46:05 -0800 From: Christoph Hellwig To: Shiyang Ruan Cc: Christoph Hellwig , linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, nvdimm@lists.linux.dev, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, djwong@kernel.org, dan.j.williams@intel.com, david@fromorbit.com, jane.chu@oracle.com Subject: Re: [PATCH v8 1/9] dax: Use percpu rwsem for dax_{read,write}_lock() Message-ID: References: <20211202084856.1285285-1-ruansy.fnst@fujitsu.com> <20211202084856.1285285-2-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Rspamd-Queue-Id: 170D140014 X-Stat-Signature: sn6s3jxknyinn91wwmf3skr8t3rk95xd Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=cRRVbigs; dmarc=none; spf=none (imf04.hostedemail.com: domain of BATV+371907e433806b178f45+6689+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+371907e433806b178f45+6689+infradead.org+hch@bombadil.srs.infradead.org X-Rspamd-Server: rspam02 X-HE-Tag: 1639640773-725746 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Dec 15, 2021 at 10:06:29AM +0800, Shiyang Ruan wrote: >=20 >=20 > =E5=9C=A8 2021/12/14 23:40, Christoph Hellwig =E5=86=99=E9=81=93: > > On Thu, Dec 02, 2021 at 04:48:48PM +0800, Shiyang Ruan wrote: > > > In order to introduce dax holder registration, we need a write lock= for > > > dax. Change the current lock to percpu_rw_semaphore and introduce = a > > > write lock for registration. > >=20 > > Why do we need to change the existing, global locking for that? >=20 > I think we have talked about this in the previous v7 patchset: >=20 >=20 > https://lore.kernel.org/nvdimm/20210924130959.2695749-1-ruansy.fnst@fuj= itsu.com/T/#m4031bc3dc49dcbaac6f8d99877f910fa9a6f998a Any kind of rationale needs to go into the patch description. > I didn't test in benchmarks for now. Could you show me which one I sho= uld > test this code on? I am not familiar with this... Just normal read/write I/O on a DAX device.