2020-04-23 08:25:58

by Jan Kara

[permalink] [raw]
Subject: Re: [PATCH V9 03/11] fs/stat: Define DAX statx attribute

On Wed 22-04-20 11:51:21, Ira Weiny wrote:
> On Wed, Apr 22, 2020 at 09:29:51AM -0700, Darrick J. Wong wrote:
> > On Tue, Apr 21, 2020 at 12:17:45PM -0700, [email protected] wrote:
> > > From: Ira Weiny <[email protected]>
> > >
> > > In order for users to determine if a file is currently operating in DAX
> > > state (effective DAX). Define a statx attribute value and set that
> > > attribute if the effective DAX flag is set.
> > >
> > > To go along with this we propose the following addition to the statx man
> > > page:
> > >
> > > STATX_ATTR_DAX
> > >
> > > The file is in the DAX (cpu direct access) state. DAX state
> > > 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 O_SYNC
> > > where data and the necessary metadata are transferred together.
> > >
> > > 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.
> >
> > One thing I hadn't noticed before -- this is a change to userspace API,
> > so please cc this series to [email protected] when you send V10.
>
> Right! Glad you caught me on this because I was just preparing to send V10.
>
> Is there someone I could directly mail who needs to look at this? I guess I
> thought we had the important FS people involved for this type of API change.
> :-/

I believe we have all the important people here. But linux-api is a general
fallback list where people reviewing API changes linger. So when changing
user facing API, it is good to CC this list.

Honza
--
Jan Kara <[email protected]>
SUSE Labs, CR