[lkml]   [2019]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH 0/5] Enable per-file/directory DAX operations
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.


Cc: Alexander Viro <>
Cc: "Darrick J. Wong" <>
Cc: Dan Williams <>
Cc: Dave Chinner <>
Cc: Christoph Hellwig <>
Cc: "Theodore Y. Ts'o" <>
Cc: Jan Kara <>

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(-)


 \ /
  Last update: 2019-10-20 18:01    [W:0.191 / U:2.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site