Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp452699pxb; Thu, 26 Aug 2021 06:58:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwric9J9IC4p8Ni3DdNJG2udvxJ7rF6OPNvHgwe6tiOj1IMcNb44OQUIDXOtFEcYom7YiIP X-Received: by 2002:a05:6e02:174a:: with SMTP id y10mr2910329ill.121.1629986314353; Thu, 26 Aug 2021 06:58:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629986314; cv=none; d=google.com; s=arc-20160816; b=WaUrkuxpc5h49vAZcCILwYa8qQ5LV4aChBvv+VxGFXGwCsP7ksl4fBrBSSSZWmDmBi NFmOB3PrbrdMGOlfw32VJUgOK5rdmqCPssOV/8E2kEfDsbqUiIAUD38C6LlZjbwdkyX0 XBm4WgnXzz+wP4icdDNdh4awCzD/ai27WrRYx/IefywYDaYvahWPWGyFxfcNJnsakN+N dE3jgMMBUYizAn3OFnBxPN7rcGmPBE4cP9YPIFR7PqPWyT7A+/Uo6Nn3TE6rT6lE8MI1 bXCHR75Ni9IJgd0EY/TrKO35Hz3qVSMZJBeX4v85xSq5SMAqn0gRfrvSRQkwGtsx6DCn CRow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gkQP9uUaGfS5wkgQnCeApEQiDrXMIWuavFG8HhovtVM=; b=rNCTD9HDoyediowcDlGV8bjOzSJScx5ooyHn4R2belzldgV1Olrp8bevXv0UjLWhKl sKntXtKv2r7qIMmwVNJcfoq6fUIJEncW3aHtOcdrvpoVwWFrXY2zjO8I/z9LoYAPWYKX KzcRZUJ9RjmOS0mS4yRD+PIIckWSD81QSCCzQbhw4D0ZhYUfoJEyv4nUvt7tHNKoNSkc 1AudSB3/j7Td56GlmgsfJuRueTtRKSM2QkwNnsgcYGyjbOtumHgFNJRWOp/f0JFFoobO rzvAgc63WEMMaiHAdpA5LzeT5u4DwjSYFgsNZcP9DJ4ibqGwfk+A6B+ntc2OcxnSa/6C YeZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=YELdD3Ri; 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 n45si2833903jac.76.2021.08.26.06.58.22; Thu, 26 Aug 2021 06:58:34 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=YELdD3Ri; 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 S242824AbhHZN6b (ORCPT + 99 others); Thu, 26 Aug 2021 09:58:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242815AbhHZN63 (ORCPT ); Thu, 26 Aug 2021 09:58:29 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 988D9C0613C1; Thu, 26 Aug 2021 06:57:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=gkQP9uUaGfS5wkgQnCeApEQiDrXMIWuavFG8HhovtVM=; b=YELdD3RiXQmIZRDAWJG6StBpiW 8V8yP1Pv4+xmDpG2E0lNxgeQVUcF8r1bZUK3PKxOMkl+JoG7pViWpazRfEWyh1Dd8Alcl5lu3eFxK omCf4HTx5zmokNJEEJBiMLTzY8S1h7HjYcGxDlURxr9dXmrwM76ga0XO064FxQsJZg1uU858pPrkf ZKFur1VoreyfW3nGnHuCvCxW3SXVmbRiDrHrjwNUZUsrDRVsklWvmaUI/OuChxfvRbQ/xrsohUEB4 eHoSSlPMjpIjQZDE6kAzD+aUk2EdEvW8xW31RVMNr6h3Z6NXZvlzgCfsP1HeksIyxiUTwnEKjHJ0i Owm2hheg==; Received: from [2001:4bb8:193:fd10:d9d9:6c15:481b:99c4] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mJFra-00DM3M-3A; Thu, 26 Aug 2021 13:56:26 +0000 From: Christoph Hellwig To: Dan Williams , Vishal Verma , Dave Jiang Cc: Mike Snitzer , Matthew Wilcox , linux-xfs@vger.kernel.org, nvdimm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org Subject: [PATCH 1/9] fsdax: improve the FS_DAX Kconfig description and help text Date: Thu, 26 Aug 2021 15:55:02 +0200 Message-Id: <20210826135510.6293-2-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210826135510.6293-1-hch@lst.de> References: <20210826135510.6293-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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