Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2493419pxb; Mon, 23 Aug 2021 23:57:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwR5Z3IdjDAzfa6r7rQ73R7gg9wZZCP0QhkX5DNvsLQvKl1fKzygNlGUIBrUB2ZYyERgkXE X-Received: by 2002:aa7:cc0b:: with SMTP id q11mr20304319edt.251.1629788257780; Mon, 23 Aug 2021 23:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629788257; cv=none; d=google.com; s=arc-20160816; b=lydcnuMWHLCQRgoKZr1P4fTEOIgmF7G7QX1OgmUpJCxjqemeqrvSi9eZo+vy4HJKvY lGJUotOf1inxSyciTxPbFBjyEgZXhdke12EQN7a1xYASmlbtrUExdjal9a+zWQeqM5bm HHxWFaA+sV3lrbT/f2xO/ib97uTSQYwY+e2l9KsJCWnPVb14l3txPbnWZtaPTACDVb9J EWgUvGEZlhnv4+8mWLD3lfQ8M115Rm0q1HdPERS0QNquKbOB3Gyasl1OwHqrm6xyuYY6 HVSdCt76NsxCNt9eWI3K6/0HZJysrgzPbHamTCigpoEhN2Qv0enyzWzMJgGRKQQBknN3 LVfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=IOCDrOwmVJVoN0/JSldCDwhYnjSI0pDeFFcilQE9NzA=; b=k8O6+J52fP1xipVqPHCHp9caNEp8bcQnB2Uk0cW9XVxAJ7vATT/f2o3oiRwXmtPQcg 64LZnCtXEf8OG9q0WHpITYU2uPwmt1kCggHI442rgFoQzjw1R3Rnc2JWw0m2dQAWbOJL VczsySSybQdqV6JamjSdRFfTTt0+TkAgPnLruDbEiHag3DhUBHn9CFprRc+A9oVDY547 iZcKkzDyd1v8pHW8scbzybuD76B421RPY/63ohznbgc8Vu0+ZqDNiAVz6p1U42L5/dJH Q834zKFxPMli+pOdypK4C7JuL2t7Xcb9+v+9bd8f7XNV8xshUbaAAO+vh2RWA04+Mc3D EZpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z17si7919958edc.582.2021.08.23.23.57.09; Mon, 23 Aug 2021 23:57:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233294AbhHXG4f (ORCPT + 99 others); Tue, 24 Aug 2021 02:56:35 -0400 Received: from verein.lst.de ([213.95.11.211]:50400 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234015AbhHXG4e (ORCPT ); Tue, 24 Aug 2021 02:56:34 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 77C0D68AFE; Tue, 24 Aug 2021 08:55:46 +0200 (CEST) Date: Tue, 24 Aug 2021 08:55:46 +0200 From: Christoph Hellwig To: Dan Williams Cc: Christoph Hellwig , Vishal Verma , Dave Jiang , Mike Snitzer , Matthew Wilcox , linux-xfs , Linux NVDIMM , linux-fsdevel , linux-ext4 Subject: Re: [PATCH 1/9] fsdax: improve the FS_DAX Kconfig description and help text Message-ID: <20210824065546.GA24465@lst.de> References: <20210823123516.969486-1-hch@lst.de> <20210823123516.969486-2-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Aug 23, 2021 at 11:45:52AM -0700, Dan Williams wrote: > On Mon, Aug 23, 2021 at 5:37 AM Christoph Hellwig wrote: > > > > Rename the main option text to clarify it is for file system access, > > and add a bit of text that explains how to actually switch a nvdimm > > to a fsdax capable state. > > > > Looks good, nice improvement. A couple suggestions below. Does this looks ok? --- From c69617137a1e6b67122c871c946e7aa00b03978b Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 23 Aug 2021 10:57:37 +0200 Subject: fsdax: improve the FS_DAX Kconfig description and help text Rename the main option text to clarify it is for file system access, and add a bit of text that explains how to actually switch a nvdimm to a fsdax capable state. Signed-off-by: Christoph Hellwig --- fs/Kconfig | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/fs/Kconfig b/fs/Kconfig index a7749c126b8e..bd21535a7620 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -43,7 +43,7 @@ source "fs/f2fs/Kconfig" source "fs/zonefs/Kconfig" config FS_DAX - bool "Direct Access (DAX) support" + bool "File system based Direct Access (DAX) support" depends on MMU depends on !(ARM || MIPS || SPARC) select DEV_PAGEMAP_OPS if (ZONE_DEVICE && !FS_DAX_LIMITED) @@ -53,8 +53,23 @@ config FS_DAX Direct Access (DAX) can be used on memory-backed block devices. If the block device supports DAX and the filesystem supports DAX, then you can avoid using the pagecache to buffer I/Os. Turning - on this option will compile in support for DAX; you will need to - mount the filesystem using the -o dax option. + on this option will compile in support for DAX. + + For a DAX device to support file system access it needs to have + struct pages. For the nfit based NVDIMMs this can be enabled + using the ndctl utility: + + # ndctl create-namespace --force --reconfig=namespace0.0 \ + --mode=fsdax --map=mem + + See the 'create-namespace' man page for details on the overhead of + --map=mem: + https://docs.pmem.io/ndctl-user-guide/ndctl-man-pages/ndctl-create-namespace + + For ndctl to work CONFIG_DEV_DAX needs to be enabled as well. For most + file systems DAX support needs to be manually enabled globally or + per-inode using a mount option as well. See the file documentation in + Documentation/filesystems/dax.rst for details. If you do not have a block device that is capable of using this, or if unsure, say N. Saying Y will increase the size of the kernel -- 2.30.2