Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp152342ybz; Wed, 15 Apr 2020 06:17:31 -0700 (PDT) X-Google-Smtp-Source: APiQypKL0gtttjZIsxlrjUByekJGabWt9ylIKywd5cbH+8yw5Uwb4cXfbmMSPmgSM2VdPyxAj8LJ X-Received: by 2002:a17:906:7f13:: with SMTP id d19mr4987877ejr.57.1586956650924; Wed, 15 Apr 2020 06:17:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586956650; cv=none; d=google.com; s=arc-20160816; b=0r49pNjnV36QLAx9qPEO/YSYDUM4n1OyQuxZRPxBt5kAkQVWT9rgIiubZwMoSRlddc DU+VIY8n7fDklQxxUuHSPLy+a4UlmB7XjcgYDMgaCOAdhAd99axXVoYimUBQLGs5vm9Q qc8y/mqddmZ1wXYIS+vklwIf2wEGZ1evJB4pqc3JGVWReR30UxBjeGke9V3QvvZq12LQ Yao+kdrax73iPw9i//OEwqeAYmmEmQaWjgCmI5m/fBbGlan/8kS2C5WuY58D3wts1fpu S+rTjx9yiwleywntZBVXNvPZMvpq34R/bLvHzxnZSBD34Wl6IpgTqfKTjKfZQSIb41Kf 1Xtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=nKxfY1sNM06Qj2LRp79pbJ7gbs/6NkJruAO3pIjGF8A=; b=kofit1lJpV4JJ6hgfZT7Bf6zxhKDclyG4uioIm/om860eXf9xYlZfiiROHERjIAru9 ydncMEQaQ83NRzl0BvDRtAK4EImzD8a3kU7re+hqayscaXsskBGQgBM/l0T04UdOGOnN vqLVuBkI9Q5LWJPIyrcBNX1l+CvBuyekMcG5CDqAJ5ScnSA2LJlaudb9BF7YMvC2FNds n5o757C8807PiPLgiNMOoi9zMTSQF1YEEG3Uz93E5asR2E+m0Qi8ft9f6Yqm9BlAbgHZ AmnSuNflcUTG9w8Uksnmx/5gSKd9STcigWe9rapJctPmhxMDij9DHzeC+PxhnwSnrlPm TfYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v12si9889095edw.72.2020.04.15.06.17.07; Wed, 15 Apr 2020 06:17:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for 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: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505329AbgDNT6Z (ORCPT + 99 others); Tue, 14 Apr 2020 15:58:25 -0400 Received: from mga06.intel.com ([134.134.136.31]:50661 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731053AbgDNT6X (ORCPT ); Tue, 14 Apr 2020 15:58:23 -0400 IronPort-SDR: zG49AjFpBKZzOYozt6qw0qRxLrAwTeHJRkf5oMZ3sKXXW0zQ8laTZxP00sdnlAfm5BzLZoOgpH UpofhJOL1Qbg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2020 12:58:21 -0700 IronPort-SDR: luUCkfmnkOthQB7k3FD7/z/f2Fe1nIR7IEbxbAwxqumnSiD6m4Mt1g/3ZUThB9XL6JznlC7Edb HDHa/uV1OXMg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,384,1580803200"; d="scan'208";a="454674819" Received: from iweiny-desk2.sc.intel.com ([10.3.52.147]) by fmsmga006.fm.intel.com with ESMTP; 14 Apr 2020 12:58:21 -0700 Date: Tue, 14 Apr 2020 12:58:21 -0700 From: Ira Weiny To: Dan Williams Cc: "Darrick J. Wong" , Linux Kernel Mailing List , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , Jan Kara , Jeff Moyer , linux-ext4 , linux-xfs , linux-fsdevel Subject: Re: [PATCH V7 9/9] Documentation/dax: Update Usage section Message-ID: <20200414195820.GE1853609@iweiny-DESK2.sc.intel.com> References: <20200413054046.1560106-1-ira.weiny@intel.com> <20200413054046.1560106-10-ira.weiny@intel.com> <20200414161509.GF6742@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Apr 14, 2020 at 12:04:57PM -0700, Dan Williams wrote: > On Tue, Apr 14, 2020 at 9:15 AM Darrick J. Wong wrote: > > > > On Mon, Apr 13, 2020 at 10:21:26PM -0700, Dan Williams wrote: > > > On Sun, Apr 12, 2020 at 10:41 PM wrote: > > > > > > > > From: Ira Weiny > > > > > > > > Update the Usage section to reflect the new individual dax selection > > > > functionality. > > > > > > > > Signed-off-by: Ira Weiny > > > > > > > > --- > > > > Changes from V6: > > > > Update to allow setting FS_XFLAG_DAX any time. > > > > Update with list of behaviors from Darrick > > > > https://lore.kernel.org/lkml/20200409165927.GD6741@magnolia/ > > > > > > > > Changes from V5: > > > > Update to reflect the agreed upon semantics > > > > https://lore.kernel.org/lkml/20200405061945.GA94792@iweiny-DESK2.sc.intel.com/ > > > > --- > > > > Documentation/filesystems/dax.txt | 166 +++++++++++++++++++++++++++++- > > > > 1 file changed, 163 insertions(+), 3 deletions(-) > > > > > > > > diff --git a/Documentation/filesystems/dax.txt b/Documentation/filesystems/dax.txt > > > > index 679729442fd2..af14c1b330a9 100644 > > > > --- a/Documentation/filesystems/dax.txt > > > > +++ b/Documentation/filesystems/dax.txt > > > > @@ -17,11 +17,171 @@ For file mappings, the storage device is mapped directly into userspace. > > > > Usage > > > > ----- > > > > > > > > -If you have a block device which supports DAX, you can make a filesystem > > > > +If you have a block device which supports DAX, you can make a file system > > > > on it as usual. The DAX code currently only supports files with a block > > > > size equal to your kernel's PAGE_SIZE, so you may need to specify a block > > > > -size when creating the filesystem. When mounting it, use the "-o dax" > > > > -option on the command line or add 'dax' to the options in /etc/fstab. > > > > +size when creating the file system. > > > > + > > > > +Currently 2 filesystems support DAX, ext4 and xfs. Enabling DAX on them is > > > > +different at this time. > > > > + > > > > +Enabling DAX on ext4 > > > > +-------------------- > > > > + > > > > +When mounting the filesystem, use the "-o dax" option on the command line or > > > > +add 'dax' to the options in /etc/fstab. > > > > + > > > > + > > > > +Enabling DAX on xfs > > > > +------------------- > > > > + > > > > +Summary > > > > +------- > > > > + > > > > + 1. There exists an in-kernel access mode flag S_DAX that is set when > > > > + file accesses go directly to persistent memory, bypassing the page > > > > + cache. > > > > > > I had reserved some quibbling with this wording, but now that this is > > > being proposed as documentation I'll let my quibbling fly. "dax" may > > > imply, but does not require persistent memory nor does it necessarily > > > "bypass page cache". For example on configurations that support dax, > > > but turn off MAP_SYNC (like virtio-pmem), a software flush is > > > required. Instead, if we're going to define "dax" here I'd prefer it > > > be a #include of the man page definition that is careful (IIRC) to > > > only talk about semantics and not backend implementation details. In > > > other words, dax is to page-cache as direct-io is to page cache, > > > effectively not there, but dig a bit deeper and you may find it. > > > > Uh, which manpage? Are you talking about the MAP_SYNC documentation? > > No, I was referring to the proposed wording for STATX_ATTR_DAX. > There's no reason for this description to say anything divergent from > that description. Ok I think the best text would be to simply refer to the STATX_ATTR_DAX man page here. Something like: 1. There exists an in-kernel access mode flag S_DAX that is set when file accesses is enabled for 'DAX'. Applications must call statx to discover the current S_DAX state (STATX_ATTR_DAX). See the man page for statx for more details. Ira