Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp147443ybz; Wed, 15 Apr 2020 06:12:26 -0700 (PDT) X-Google-Smtp-Source: APiQypKUcWtkJJzQIYja4qLLIVNmSJqrehKOaxQibJQbkur/GpNEeTtLpXhhM5b6ZiSH4b+99yb2 X-Received: by 2002:a17:907:20a2:: with SMTP id pw2mr5055119ejb.252.1586956345643; Wed, 15 Apr 2020 06:12:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586956345; cv=none; d=google.com; s=arc-20160816; b=yT9fFRrWJnYNLbP8YmCsDGFxgtEiYbddEYh/zp0s5VnE4KtZ71DPmmiD8ZBdfiR2T4 4ExwB6fB6Tuwex469Gy2F1wdi9E4emIj4VPhM8Wb4CpvtU1JehcZtvQlLeYEPCeH841+ w6VAJdOPKUYEErLYJzeG+JFCNFG45Pws3VP7ZQNGVpH9Vm1en3z4WQVoBoN+w9lNxAXW NMoHDEHQLL9Bq3XEXyXR/CmJADjRnvhxaywdNbHmP1xhALxBrxpVrTjEN28j5vnOR5eS qEfjfeWukcOJafvtNWZjyliBVrymPVehuUdZGZQwYxfmh4aiXgIrdJn5P4eaMz5IOaDu 8bMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=gF1rMGZ/eX8G89eh4/hnEQhUj+jW1CwhhogtzydCw04=; b=0ngZ7yRyFzf22oyrAUuV+5ssNkPF4QpaJSMEDJVofLCszbM6k2QIJdVmzLQBSKLy1H 1I/1HXVnoQbX4ZRXkN9b9ZqL+ScbGOvYRZe7WrZvJnAIIpBMO7vi5Ykg15USsU9i10Em 1EyRVNpyQcdiFS6pijBjXe5e5RHvVdbQUbEgE0JDDwr60Bu1m4kXw6a87htH2cfVfazi wqB64HWl2lYXW9yQ2GKpWZkS9IvnuArkBVs1ytQKHqrms8JUmzL92NwME/Jahlwdmnok jP3zYfzn9I75SyNVJAVetpofSEMyfOVLGQnKyirhFBc4drMZ3sC1RUbXOCpOaoki/41P yrDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=kAbO6h8r; 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 qh13si9760341ejb.438.2020.04.15.06.11.57; Wed, 15 Apr 2020 06:12:25 -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; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=kAbO6h8r; 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 S2504658AbgDNTZA (ORCPT + 99 others); Tue, 14 Apr 2020 15:25:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730052AbgDNTYp (ORCPT ); Tue, 14 Apr 2020 15:24:45 -0400 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0E8EC0610D5 for ; Tue, 14 Apr 2020 12:05:10 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id p6so1053921edu.10 for ; Tue, 14 Apr 2020 12:05:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gF1rMGZ/eX8G89eh4/hnEQhUj+jW1CwhhogtzydCw04=; b=kAbO6h8rAxnlPUj6sdwoV8am8x/5ArQ2M8OJsFa+YkS1RIfmPHFKEJY18CRNoAGtm7 awWWFVONlQPnHlvqkUjg6uL/MDQOGsx73UodjlQ1LEI0blS67rdDe0rfMMkhcyVx59ng /XjBMPm1bEnSuvBdmJaEN8SDQVmOBc6oxlJBCWE3HubVS7g9ZrscxOtIty/JnbdfmKQ5 T021eyBs86pI9j73PbTEpEKqK98Liv0/ZE8EBU1YSxeJUST3sasbCURvuo+AU4INgn1d Z99+Dd7JvRBaMHTq2mCVKu5owgzwgF89ly3P04mHKtUgm30djmmPXt0J2awvZLZa4rpe w97w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gF1rMGZ/eX8G89eh4/hnEQhUj+jW1CwhhogtzydCw04=; b=R97VL6LdsM+0Wz23CzBnNb3cZ1dzYZSqQJiNErLQVnKYFZAbjWXULfLC6BgusjncKh 8NJmcczTlrXntyraej5FMaFfUx+xAN4A0Ls5MoPNhdZSqYDpiiz1Gfj+m18Ue1T0ZQM1 DF6AyUU72SNUYEATKasZE/GxTUIkDg4yKPi9dlHQp8vac9vuyZA3mZ1y7Clc1G7+lWDC LCUsYbo/WlC3C92xaFeFXfx2OwTu44VYhjEF0G7C4JKO1iyGyOJ3Jif1cE5q7mGbjFjY pNaO4eul09h9vNp4mbjt3QxC5RY5LfRruSJxv1otE1VmEm2UDboKaLMj9+e2O0R1I9kN Zbcw== X-Gm-Message-State: AGi0Pua42jTycckmKSPXc/6hlAGAZV9DRu2UpJs5uIbAHXSpGaU8emn/ jhtwf75CNOgzyc03q9U67vLSiFiDjEMBN0PwUb4M1A== X-Received: by 2002:aa7:d711:: with SMTP id t17mr9242415edq.296.1586891109388; Tue, 14 Apr 2020 12:05:09 -0700 (PDT) MIME-Version: 1.0 References: <20200413054046.1560106-1-ira.weiny@intel.com> <20200413054046.1560106-10-ira.weiny@intel.com> <20200414161509.GF6742@magnolia> In-Reply-To: <20200414161509.GF6742@magnolia> From: Dan Williams Date: Tue, 14 Apr 2020 12:04:57 -0700 Message-ID: Subject: Re: [PATCH V7 9/9] Documentation/dax: Update Usage section To: "Darrick J. Wong" Cc: "Weiny, Ira" , Linux Kernel Mailing List , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , Jan Kara , Jeff Moyer , linux-ext4 , linux-xfs , linux-fsdevel Content-Type: text/plain; charset="UTF-8" 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 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.