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 B61A7C433EF for ; Fri, 21 Jan 2022 02:22:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E2DCA6B0082; Thu, 20 Jan 2022 21:22:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DB6CA6B0083; Thu, 20 Jan 2022 21:22:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C7E166B0085; Thu, 20 Jan 2022 21:22:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay037.a.hostedemail.com [64.99.140.37]) by kanga.kvack.org (Postfix) with ESMTP id BAADB6B0082 for ; Thu, 20 Jan 2022 21:22:06 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id D5DB460A38 for ; Fri, 21 Jan 2022 02:22:03 +0000 (UTC) X-FDA: 79052694126.02.2532A23 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf13.hostedemail.com (Postfix) with ESMTP id 766CE20003 for ; Fri, 21 Jan 2022 02:22:03 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 93B42604EF; Fri, 21 Jan 2022 02:22:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA1A6C340E0; Fri, 21 Jan 2022 02:22:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642731722; bh=Ib+VTbQ6ifDdK93Yrsa7iKnj1Orhw5IdSp6Qa3JMJnQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UWQID3dOoEeuy/VyEJaIPm8nXOCwL1j8Uyqea1A4WJZSjpeCvnAhqI5nhA2hNwhdX EKGl8xibiNh7CFEtwRqEk7oE7SqIVG79JVcULOvzMavGBwnh0CMHlSE4/FYVNNsv9g lQ9Jono3igXtvjZeou7BfVW597dRTyUTKIWUwXRHwRQic5kgpMLlGNZ1H899LMFR0q 78Fwuv2NRT+SlfeGeaTdYbRYt99giFZzWIrVKaXq1c1w7iBESemP2mYURrjWZOjFS9 s2ocsZKkPjjbZGCEP49TtcdoHsfYPs8jiqw9YrA06lAZoqeCu13+m5Lqf/G8jret3l +ISlNdqZspUKQ== Date: Thu, 20 Jan 2022 18:22:00 -0800 From: "Darrick J. Wong" To: Shiyang Ruan Cc: Christoph Hellwig , Dan Williams , Linux Kernel Mailing List , linux-xfs , Linux NVDIMM , Linux MM , linux-fsdevel , david , Jane Chu Subject: Re: [PATCH v9 02/10] dax: Introduce holder for dax_device Message-ID: <20220121022200.GG13563@magnolia> References: <20220105181230.GC398655@magnolia> <20220105185626.GE398655@magnolia> <20220105224727.GG398655@magnolia> <20220105235407.GN656707@magnolia> <76f5ed28-2df9-890e-0674-3ef2f18e2c2f@fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <76f5ed28-2df9-890e-0674-3ef2f18e2c2f@fujitsu.com> X-Rspamd-Queue-Id: 766CE20003 X-Stat-Signature: 3iffn79boyjczb36h5ya45eee9tuxqri Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=UWQID3dO; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf13.hostedemail.com: domain of djwong@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=djwong@kernel.org X-Rspamd-Server: rspam06 X-HE-Tag: 1642731723-487233 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 Fri, Jan 21, 2022 at 09:26:52AM +0800, Shiyang Ruan wrote: > > > 在 2022/1/20 16:46, Christoph Hellwig 写道: > > On Wed, Jan 05, 2022 at 04:12:04PM -0800, Dan Williams wrote: > > > We ended up with explicit callbacks after hch balked at a notifier > > > call-chain, but I think we're back to that now. The partition mistake > > > might be unfixable, but at least bdev_dax_pgoff() is dead. Notifier > > > call chains have their own locking so, Ruan, this still does not need > > > to touch dax_read_lock(). > > > > I think we have a few options here: > > > > (1) don't allow error notifications on partitions. And error return from > > the holder registration with proper error handling in the file > > system would give us that Hm, so that means XFS can only support dax+pmem when there aren't partitions in use? Ew. > > (2) extent the holder mechanism to cover a rangeo I don't think I was around for the part where "hch balked at a notifier call chain" -- what were the objections there, specifically? I would hope that pmem problems would be infrequent enough that the locking contention (or rcu expiration) wouldn't be an issue...? > > (3) bite the bullet and create a new stacked dax_device for each > > partition > > > > I think (1) is the best option for now. If people really do need > > partitions we'll have to go for (3) > > Yes, I agree. I'm doing it the first way right now. > > I think that since we can use namespace to divide a big NVDIMM into multiple > pmems, partition on a pmem seems not so meaningful. I'll try to find out what will happen if pmem suddenly stops supporting partitions... --D > > -- > Thanks, > Ruan. > >