Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp326332ybl; Sat, 18 Jan 2020 01:11:44 -0800 (PST) X-Google-Smtp-Source: APXvYqzcAvhu7itUSiiB6s+WJko9wllvyNTERLVNGHGOFrtyLkR6V8/tGlkmlwZlio3Fle/2tawT X-Received: by 2002:a9d:6f85:: with SMTP id h5mr9196073otq.19.1579338704076; Sat, 18 Jan 2020 01:11:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579338704; cv=none; d=google.com; s=arc-20160816; b=rBWEDxiJTjDsbXfQr29czicsAt2nbyZ2ohKYIBEE4LsDek8sm50qijhw9SckVeEn9y R0SSaJ+Mfg3r22CM1/Pxt8ANNA8s8mYSUXfq6hW2t1kATGnuNqRY04NYkI3rxx12QPpB v/IcwJRlP5dsTKDtwYPHtMls44NhYc5sCVud0LzE78evOZ7pvy8zPI4KIcLZW2hJtSj4 4fH6QIT3tjKSnRrAldgxCKpCxXQEONiIaRq4gsgYDag+qw5aQtVFv+nTDtteiGTLA2dF HDydsi+VD3MGUDT0/caFsZN/OKeeX21uL/599zfHt9yQH74qsj+s8bHWJ9PoV+d8q5zn 3HgQ== 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; bh=pzZIPAEYe6pHyqw4AtlTOiXz6sn/c5WIH++qG6TwFZ4=; b=erIKstVO47AZvCGt3hGUFtPX8Yl9l1IkizSp3Twcz80VMjfryOogzu2X/5d9Pc3VXL ZfGhIbgtlJDJcFV9Hn9tjwAZakelC6qYTHKeIvxd5hoRtX6lan6oraOqnrNrV0OwWOfh 1iNYIrpvanki0+X7Q34/WZyRels1E1DEdaKHkWGhFFM2ZMCZXWpC/upWJNHKJ7cGK5la OQ3ZJAWlNSMJprK6ubM2U69ZtkHW8WUFjKvV/Abd5/9wqKOCgdWkRRL0Zn3GikYNTJih 4ilM3nqYjvqqW8/fqF02ONeGnS425K87CmVEGzP/uKOLVYa04SaF4aumhuxdD7pR/LJ6 IuDA== 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 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z65si14541805oia.33.2020.01.18.01.11.12; Sat, 18 Jan 2020 01:11:44 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726673AbgARJLM (ORCPT + 99 others); Sat, 18 Jan 2020 04:11:12 -0500 Received: from mail104.syd.optusnet.com.au ([211.29.132.246]:41699 "EHLO mail104.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726628AbgARJLM (ORCPT ); Sat, 18 Jan 2020 04:11:12 -0500 Received: from dread.disaster.area (pa49-181-172-170.pa.nsw.optusnet.com.au [49.181.172.170]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 17D1F7EB72C; Sat, 18 Jan 2020 20:11:07 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1isk8H-0003Ey-Eq; Sat, 18 Jan 2020 20:11:05 +1100 Date: Sat, 18 Jan 2020 20:11:05 +1100 From: Dave Chinner To: Dan Williams Cc: "Darrick J. Wong" , Ira Weiny , Jan Kara , Linux Kernel Mailing List , Alexander Viro , 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: <20200118091105.GA9407@dread.disaster.area> 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> <20200116053935.GB8235@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=W5xGqiek c=1 sm=1 tr=0 a=IIEU8dkfCNxGYurWsojP/w==:117 a=IIEU8dkfCNxGYurWsojP/w==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=Jdjhy38mL1oA:10 a=yPCof4ZbAAAA:8 a=7-415B0cAAAA:8 a=Ei6hhWl3_lwP0hYN7Z4A:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 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 10:05:00PM -0800, Dan Williams wrote: > On Wed, Jan 15, 2020 at 9:39 PM Darrick J. Wong wrote: > [..] > > > 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...) > > Oh? That text was motivated by the open(2) man page description of O_SYNC. Ugh. "synchronous I/O" means two different things, depending on context. In the AIO context, it means "process context waits for operation completion direct", but in the O_SYNC context, it means "we guarantee data integrity for each I/O submitted". Indeed, O_SYNC AIO is a thing. i.e. we can do an "async sync write" to guarantee data integrity without directly waiting for it. Now try describing that only using the words "synchronous write" to describe both behaviours. :) IOWs, if you are talking about data integrity, you need to explicitly say "O_SYNC semantics", not "synchronous write", because "synchronous write" is totally ambiguous without the O_SYNC context of the open(2) man page... Cheers, Dave. -- Dave Chinner david@fromorbit.com