Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1501142

Re: [PATCH] DAX: enable iostat for read/write

From "Kani, Toshimitsu" <toshi.kani@hpe.com>
Newsgroups linux.kernel
Subject Re: [PATCH] DAX: enable iostat for read/write
Date 2016-10-14 20:50 +0200
Message-ID <ssfIm-53c-1@gated-at.bofh.it> (permalink)
References <ssesW-4f3-21@gated-at.bofh.it> <sseCC-4ie-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 2016-10-14 at 10:35 -0700, Dan Williams wrote:
> On Fri, Oct 14, 2016 at 10:25 AM, Toshi Kani <toshi.kani@hpe.com>
> wrote:
> > 
> > DAX IO path does not support iostat, but its metadata IO path does.
> > Therefore, iostat shows metadata IO statistics only, which has been
> > confusing to users.
> > 
> > Add iostat support to the DAX read/write path.
> > 
> > Note, iostat still does not support the DAX mmap path as it allows
> > user applications to access directly.
> > 
> > Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Alexander Viro <viro@zeniv.linux.org.uk>
> > Cc: Dan Williams <dan.j.williams@intel.com>
> > Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
> > ---
> >  fs/dax.c |   37 +++++++++++++++++++++++++++++++++++++
> >  1 file changed, 37 insertions(+)
> > 
> > diff --git a/fs/dax.c b/fs/dax.c
> > index 014defd..3aaaac2 100644
> > --- a/fs/dax.c
> > +++ b/fs/dax.c
> > @@ -144,6 +144,34 @@ static sector_t to_sector(const struct
> > buffer_head *bh,
> >         return sector;
> >  }
> > 
> > +static void dax_iostat_start(struct gendisk *disk, struct iov_iter
> > *iter,
> > +                            unsigned long *start)
> > +{
> > +       int rw = iov_iter_rw(iter);
> > +       int sec = iov_iter_count(iter) >> 9;
> 
> Should this be a minimum of one sector since we allow unaligned
> transfers through this interface?
> 
> ...or is iov_iter_count() somehow guaranteed to be sector aligned
> here?

You are right. I will update to set a minimum of one sector in v2. 

Thanks!
-Toshi

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] DAX: enable iostat for read/write Toshi Kani <toshi.kani@hpe.com> - 2016-10-14 19:30 +0200
  Re: [PATCH] DAX: enable iostat for read/write Dan Williams <dan.j.williams@intel.com> - 2016-10-14 19:40 +0200
    Re: [PATCH] DAX: enable iostat for read/write "Kani, Toshimitsu" <toshi.kani@hpe.com> - 2016-10-14 20:50 +0200
  Re: [PATCH] DAX: enable iostat for read/write Dave Chinner <david@fromorbit.com> - 2016-10-15 10:00 +0200
    Re: [PATCH] DAX: enable iostat for read/write "Kani, Toshimitsu" <toshi.kani@hpe.com> - 2016-10-17 20:00 +0200
      Re: [PATCH] DAX: enable iostat for read/write Dan Williams <dan.j.williams@intel.com> - 2016-10-17 21:00 +0200
        Re: [PATCH] DAX: enable iostat for read/write "Kani, Toshimitsu" <toshi.kani@hpe.com> - 2016-10-17 21:30 +0200

csiph-web