Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp153282ybz; Wed, 15 Apr 2020 06:18:31 -0700 (PDT) X-Google-Smtp-Source: APiQypJeUTdXyBHrNeMfzRoScJIA1GkEhYdgMjyV0yjgovn8LFHyVoy6STz2WIGIdXVvjpNb/dxg X-Received: by 2002:a17:906:1199:: with SMTP id n25mr5175174eja.30.1586956711810; Wed, 15 Apr 2020 06:18:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586956711; cv=none; d=google.com; s=arc-20160816; b=scyLK+HMhkOAOGIUvBuz5svwwLF/3p676OptNNUWMehnHgXgYVgu5xv96vlPY5qnai wcfKTMx5aTKYbxdUI+hERsDiQfJgjgVyCRFGskMQhrNCkO1GeLYcN8W8S2b0pyqz0JyY 41B9TD6nTYtwXNiGQ9GaVI4TNCsC1GjDFSdfsL4+hscuZtNsNsw6VyrMqAqe04kHg5rx 8sXRlyKVM5uhS6D3thc1dOfvpL+QFDTmgteijexPjWATP7cGcI3tEJy1FjlYtzN9DqT/ kkDubw2Lpv+JWFGNPw7HiGWq9Ipd6cY0MIu1FZHlixsZdbEan6P1TRoUdapdPSuJaNog jYfg== 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=2j+Omve3Vv1KQP8pF6jnTgNsvsYWFcgoVcbTEQawXxg=; b=QuqdnsSfwedtwL3Ii8MrE6RrMjwytIFZjvl2frJr/UJ/DYy5+ojkAHR61gGUs56ku9 +l7s+9lw3QON9UAgk3ArxSjMUWtdZE/huZeQhLInFUeoj6pAyiYtZzuBRw4Sj/Ep3pj8 r2OJpqE42ZV3eCwP7gmMTPkrs9rKxsZ+USruyysEVtNwcNuPP2rxLd9OlsJ4tTv/4aao TwtqWcuFEm0NkQ43r/rCWmnQcrWOfAyEDzlsrocmHH0h66x6Sa+LcRHkdjYayKJRRbpb A+WoOfsqA0CiyDO137i2j3H4u/vEiuklbb+jjk2Z6S42drOsCG4zePi2JpuZdvWNTzl5 2KJA== 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 g22si2292921ejw.60.2020.04.15.06.18.01; Wed, 15 Apr 2020 06:18:31 -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 S2505360AbgDNUAX (ORCPT + 99 others); Tue, 14 Apr 2020 16:00:23 -0400 Received: from mga14.intel.com ([192.55.52.115]:10312 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2505359AbgDNUAV (ORCPT ); Tue, 14 Apr 2020 16:00:21 -0400 IronPort-SDR: Adh2bSGjpAj5C5lb+kuGh7dFOpnidmodv17mXdXnZ8tvgWLcRe0IoTJPbR3XdIFvKyY4MNgZz4 7ZwPp4l1EWpg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2020 13:00:17 -0700 IronPort-SDR: lhbGUOmvotbhMVvY0OCmgMZTQi0sG5VUHFqwvb87jAD3F8K/dEr9Zz6Qqi7g2um/4m6S5r9ckW Ni0dXCw+E5ew== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,384,1580803200"; d="scan'208";a="242092945" Received: from iweiny-desk2.sc.intel.com ([10.3.52.147]) by orsmga007.jf.intel.com with ESMTP; 14 Apr 2020 13:00:15 -0700 Date: Tue, 14 Apr 2020 13:00:15 -0700 From: Ira Weiny To: "Darrick J. Wong" Cc: Dan Williams , 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: <20200414200015.GF1853609@iweiny-DESK2.sc.intel.com> References: <20200413054046.1560106-1-ira.weiny@intel.com> <20200413054046.1560106-10-ira.weiny@intel.com> <20200414161509.GF6742@magnolia> <20200414195754.GH6742@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200414195754.GH6742@magnolia> 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:57:54PM -0700, Darrick J. Wong wrote: > 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: [snip] > > > > > + > > > > > +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. > > Ahh, ok. Something like this, then: > > 1. There exists an in-kernel access mode flag S_DAX. When set, the > file is in the DAX (cpu direct access) state. DAX state attempts to > minimize software cache effects for both I/O and memory mappings of > this file. The S_DAX state is exposed to userspace via the > STATX_ATTR_DAX statx flag. > > See the STATX_ATTR_DAX in the statx(2) manpage for more information. We crossed in the ether!!! I propose even less details here... Leave all the details to the man page. 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