Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3209543ybg; Sun, 20 Oct 2019 09:00:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyA+ha2a3FZBVKv1vB8VqwzWtOqbL8XIytTeQ8ljD8B/w9QvJKnSk20rp80UfakYYaY/GE X-Received: by 2002:a17:906:6544:: with SMTP id u4mr6345181ejn.274.1571587240465; Sun, 20 Oct 2019 09:00:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571587240; cv=none; d=google.com; s=arc-20160816; b=cttmIMfJTNj2eMDZxEz3KeyX/PYwMhr8nJAYj3HuU2eIISJj3Mos9TVI6K1r/PAosY 1AhsFFqwoT8xajfuwKtTXJiq7OKzD9wgl5bSLLBjCQSF2BTDZNWDTtHMi4+cAzMfO3GT MiQGSjXC35GYYFs2pdXY3FiGWHlsTzryG3UX82mUg/YG+MkydcAwZHnOtmiK7/0/RFGA nSkWfhH9uAD8givI9BIBuqSOmHyS7DcEP3TD623i4/m+jgo5RJO0NvANgXfcsYkEshiG Echy3Fh1gDTMMArqOzF4CTCW1WuD4/fqa6Z78AQVvDPS95/9AxVAW5aO6a/4EhyqHMtS eLvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=+j8PkIZ/W4fETutMDk3zDyqRpO2Q8ARBdAS8OvH9pEs=; b=OCeuKQCs9YuDv8oBEpaGvJQyuQ30qJspvB5nBio7Jaxw/Z6qwEHsyNRPVUGGpUZtzY edqoS9tR0cHjHVLxp+YqdsEDaipW41+J46dw60WmqP1507+jzmfpVS5Ll1QU6UG0Q7uR Ao2OWEB+A/i/9W4XGQr/qg5lay0xacWPSF4RBnnY1Z25P9ONwvOEXfZLwOmYD31oQ8ll N+n4jvKFd3Tjk2cgLTl6eKnpSBPXkL3WKGdf8K0exmGM0n46u6l4fDBz774vcjhVnPO3 AHfL8AKL3A4smfm0Y3sG03gk2tLTMvTRFLdNifJr4A5n6uRlgh9DEvkq6x2VVhZ/c/Wt r2dA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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. [209.132.180.67]) by mx.google.com with ESMTP id b25si7469011ejb.49.2019.10.20.09.00.03; Sun, 20 Oct 2019 09:00:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1726561AbfJTP7y (ORCPT + 99 others); Sun, 20 Oct 2019 11:59:54 -0400 Received: from mga02.intel.com ([134.134.136.20]:54570 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726383AbfJTP7y (ORCPT ); Sun, 20 Oct 2019 11:59:54 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Oct 2019 08:59:53 -0700 X-IronPort-AV: E=Sophos;i="5.67,320,1566889200"; d="scan'208";a="398438094" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.157]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Oct 2019 08:59:53 -0700 From: ira.weiny@intel.com To: linux-kernel@vger.kernel.org Cc: Ira Weiny , Alexander Viro , "Darrick J. Wong" , Dan Williams , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , Jan Kara , linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH 0/5] Enable per-file/directory DAX operations Date: Sun, 20 Oct 2019 08:59:30 -0700 Message-Id: <20191020155935.12297-1-ira.weiny@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ira Weiny At LSF/MM'19 [1] [2] we discussed applications that overestimate memory consumption due to their inability to detect whether the kernel will instantiate page cache for a file, and cases where a global dax enable via a mount option is too coarse. The following patch series enables selecting the use of DAX on individual files and/or directories on xfs, and lays some groundwork to do so in ext4. In this scheme the dax mount option can be omitted to allow the per-file property to take effect. The insight at LSF/MM was to separate the per-mount or per-file "physical" capability switch from an "effective" attribute for the file. At LSF/MM we discussed the difficulties of switching the mode of a file with active mappings / page cache. Rather than solve those races the decision was to just limit mode flips to 0-length files. Finally, the physical DAX flag inheritance is maintained from previous work on XFS but should be added for other file systems for consistence. [1] https://lwn.net/Articles/787973/ [2] https://lwn.net/Articles/787233/ To: linux-kernel@vger.kernel.org Cc: Alexander Viro Cc: "Darrick J. Wong" Cc: Dan Williams Cc: Dave Chinner Cc: Christoph Hellwig Cc: "Theodore Y. Ts'o" Cc: Jan Kara Cc: linux-ext4@vger.kernel.org Cc: linux-xfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Ira Weiny (5): fs/stat: Define DAX statx attribute fs/xfs: Isolate the physical DAX flag from effective fs/xfs: Separate functionality of xfs_inode_supports_dax() fs/xfs: Clean up DAX support check fs/xfs: Allow toggle of physical DAX flag fs/stat.c | 3 +++ fs/xfs/xfs_ioctl.c | 32 ++++++++++++++------------------ fs/xfs/xfs_iops.c | 36 ++++++++++++++++++++++++++++++------ fs/xfs/xfs_iops.h | 2 ++ include/uapi/linux/stat.h | 1 + 5 files changed, 50 insertions(+), 24 deletions(-) -- 2.20.1