From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1465FCA9EA0 for ; Sun, 20 Oct 2019 15:59:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E43092190F for ; Sun, 20 Oct 2019 15:59:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726568AbfJTP7y (ORCPT ); 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