Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7374456ybl; Wed, 15 Jan 2020 21:41:42 -0800 (PST) X-Google-Smtp-Source: APXvYqxa4TFumh97zcQwlx/9fMKHlpZdilB83fXe6N8JuV9nUSmyZyr1O+UnvC+5epo5MBiogmMs X-Received: by 2002:aca:45c1:: with SMTP id s184mr2934927oia.158.1579153302620; Wed, 15 Jan 2020 21:41:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579153302; cv=none; d=google.com; s=arc-20160816; b=nAkw/mp9FX0NkQttUwJvHF3dS3o0EQ6t/bvy7TyTlBs+Ut/KL/09CKmiExcnKKbBow 7AJAOaGmTs4A5FSALClDoVUyQCzJGddiBXdpdcuRYY6HsOnbTwX7EkHTNPoSxzN0JGHr 0xCH5oX6/JVd6mQXtlBZUpMx4WkpIvDpvYxRYRf3PJBUZ6gxvK3xOIXWkCHlRpK42/Zy rhyJRpGAS6+tqjyIy39NQxdkiJQV77NsWMeFwXHwZ+LvEzd8MDycqgZyNW8oiUsSBZPb mMMtWaIAUw0q/hznr0FXhfEUPPvlVCz8eDDcxzKw+L4RyXH2Zvhxr20Is4Seb3PI8sTL GQVQ== 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:dkim-signature; bh=ZvhUMad29Q7lSqgVCA5o0Rvkn84v5bmJgkpac83lhOw=; b=DD5eMmTzyxobhF6GlQpWWzgzP2TamDylHy1GIr8Gyt77I77hofak+xeJ7oRYUs+8uN mSFHfoHz3R2y0jZm6Nve6LUM7Vmbpg+rIJFpl6ndS4COb3Qw4YpqAqvt07xrmnD5EEpB 9SDPMKRugwrWAWcTfP1Z5RJKKeGpEvOR7kiEFkzKkuBcnWyk3GY1Icc30+nQwzKGsK54 qMXsp1QMvL2i5nIRj74j894MQYxYzB4RS5P3Hn5800PgotD0LEDjZJ91wEixGnly7E4I UBxDy+l7gV/xGf97zDcTeeugcx7wc0KlkpTB5WvnhucnA+qi+PvGfbjeQZcWqlu8Cz5H U6hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=Xwz8WLjs; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10si11167799oid.84.2020.01.15.21.41.24; Wed, 15 Jan 2020 21:41:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=Xwz8WLjs; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726535AbgAPFkE (ORCPT + 99 others); Thu, 16 Jan 2020 00:40:04 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:37862 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726082AbgAPFkE (ORCPT ); Thu, 16 Jan 2020 00:40:04 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00G5d5VM174531; Thu, 16 Jan 2020 05:39:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2019-08-05; bh=ZvhUMad29Q7lSqgVCA5o0Rvkn84v5bmJgkpac83lhOw=; b=Xwz8WLjsjRYhW7x+YlXoHgXJ1rLTWNix812/W9nXlfXTwm/gMJoMyfoO0hO0pe+sOQea 3yjMk2iw+MVORoBxt30KWwzlMr7bqH0hmoo9vyvC1SWnRbW9pB3kXcAiEgbix1Yu65HR xLLd+Z30bDonOev13PvgbLHzqy9/Iwv5nSTcCpVVo/QAX/oGRPyvHsbYu0daPGI+/9su PzAWtRJ/bGr9Pt77spupAQ5FjBYqtPyyI82xZ2FS8H47+mmo6l5zRJq+mklQ/o9b3J4k F06qGYgtdT8PquY+zR3x4S3qluI9Lv1BJQg2Z5Q9vrdRq1FeDuVhz7tysitrbgo9i/AU rQ== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 2xf73u0706-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Jan 2020 05:39:42 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00G5d1te153489; Thu, 16 Jan 2020 05:39:42 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 2xhy22nqg1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Jan 2020 05:39:41 +0000 Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 00G5dbMg027086; Thu, 16 Jan 2020 05:39:37 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 15 Jan 2020 21:39:37 -0800 Date: Wed, 15 Jan 2020 21:39:35 -0800 From: "Darrick J. Wong" To: Ira Weiny Cc: Dan Williams , Jan Kara , Linux Kernel Mailing List , Alexander Viro , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , linux-ext4 , linux-xfs , linux-fsdevel Subject: Re: [RFC PATCH V2 01/12] fs/stat: Define DAX statx attribute Message-ID: <20200116053935.GB8235@magnolia> References: <20200110192942.25021-1-ira.weiny@intel.com> <20200110192942.25021-2-ira.weiny@intel.com> <20200115113715.GB2595@quack2.suse.cz> <20200115173834.GD8247@magnolia> <20200115194512.GF23311@iweiny-DESK2.sc.intel.com> <20200115223821.GG23311@iweiny-DESK2.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200115223821.GG23311@iweiny-DESK2.sc.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9501 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001160047 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9501 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001160047 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Jan 15, 2020 at 02:38:21PM -0800, Ira Weiny wrote: > On Wed, Jan 15, 2020 at 12:10:50PM -0800, Dan Williams wrote: > > On Wed, Jan 15, 2020 at 11:45 AM Ira Weiny wrote: > > > > > > On Wed, Jan 15, 2020 at 09:38:34AM -0800, Darrick J. Wong wrote: > > > > On Wed, Jan 15, 2020 at 12:37:15PM +0100, Jan Kara wrote: > > > > > On Fri 10-01-20 11:29:31, ira.weiny@intel.com wrote: > > > > > > From: Ira Weiny > > > > > > > > [snip] > > > > Ok I changed a couple of things as well. How does this sound? > > > > > > > > > STATX_ATTR_DAX > > > > > > DAX (cpu direct access) is a file mode that attempts to minimize > > > > s/mode/state/? > > DOH! yes state... ;-) > > > > > > software cache effects for both I/O and memory mappings of this > > > file. It requires a block device and file system which have > > > been configured to support DAX. > > > > It may not require a block device in the future. > > Ok: > > "It requires a file system which has been configured to support DAX." ? > > I'm trying to separate the user of the individual STATX DAX flag from the Admin > details of configuring the file system and/or devices which supports it. > > Also, I just realized that we should follow the format of the other STATX_* > attributes. They all read something like "the file is..." > > So I'm adding that text as well. > > > > > > > > > DAX generally assumes all accesses are via cpu load / store > > > instructions which can minimize overhead for small accesses, but > > > may adversely affect cpu utilization for large transfers. > > > > > > File I/O is done directly to/from user-space buffers and memory > > > mapped I/O may be performed with direct memory mappings that > > > bypass kernel page cache. > > > > > > While the DAX property tends to result in data being transferred > > > synchronously, it does not give the same guarantees of > > > synchronous I/O where data and the necessary metadata are > > > > Maybe use "O_SYNC I/O" explicitly to further differentiate the 2 > > meanings of "synchronous" in this sentence? > > Done. > > > > > > transferred together. > > > > > > A DAX file may support being mapped with the MAP_SYNC flag, > > > which enables a program to use CPU cache flush operations to > > > > s/operations/instructions/ > > Done. > > > > > > persist CPU store operations without an explicit fsync(2). See > > > mmap(2) for more information. > > > > I think this also wants a reference to the Linux interpretation of > > platform "persistence domains" we were discussing that here [1], but > > maybe it should be part of a "pmem" manpage that can be referenced > > from this man page. > > Sure, but for now I think referencing mmap for details on MAP_SYNC works. > > I suspect that we may have some word smithing once I get this series in and we > submit a change to the statx man page itself. Can I move forward with the > following for this patch? > > > STATX_ATTR_DAX > > The file is in the DAX (cpu direct access) state. DAX state Hmm, now that I see it written out, I kind of like "DAX mode" better now. :/ "The file is in DAX (CPU direct access) mode. DAX mode attempts..." > attempts to minimize software cache effects for both I/O and > memory mappings of this file. It requires a file system which > has been configured to support DAX. > > DAX generally assumes all accesses are via cpu load / store > instructions which can minimize overhead for small accesses, but > may adversely affect cpu utilization for large transfers. > > File I/O is done directly to/from user-space buffers and memory > mapped I/O may be performed with direct memory mappings that > bypass kernel page cache. > > While the DAX property tends to result in data being transferred > synchronously, it does not give the same guarantees of > synchronous I/O where data and the necessary metadata are > transferred together. (I'm frankly not sure that synchronous I/O actually guarantees that the metadata has hit stable storage...) --D > A DAX file may support being mapped with the MAP_SYNC flag, > which enables a program to use CPU cache flush instructions to > persist CPU store operations without an explicit fsync(2). See > mmap(2) for more information. > > > Ira > > > > > [1]: http://lore.kernel.org/r/20200108064905.170394-1-aneesh.kumar@linux.ibm.com