[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1484095838.2029.1.camel@hpe.com>
Date: Tue, 10 Jan 2017 23:54:54 +0000
From: "Kani, Toshimitsu" <toshi.kani@....com>
To: "dan.j.williams@...el.com" <dan.j.williams@...el.com>
CC: "viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
"david@...morbit.com" <david@...morbit.com>,
"linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
"ross.zwisler@...ux.intel.com" <ross.zwisler@...ux.intel.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4] DAX: enable iostat for read/write
On Tue, 2017-01-10 at 15:41 -0800, Dan Williams wrote:
> On Tue, Jan 10, 2017 at 4:11 PM, Toshi Kani <toshi.kani@....com>
> wrote:
:
> >
> > + if (blk_queue_io_stat(disk->queue)) {
> > + int sec = iov_iter_count(iter) >> 9;
> > +
> > + start = jiffies;
> > + generic_start_io_acct(iov_iter_rw(iter),
> > + (!sec) ? 1 : sec, &disk-
> > >part0);
> > + }
> > +
> > while (iov_iter_count(iter)) {
> > ret = iomap_apply(inode, pos, iov_iter_count(iter),
> > flags, ops,
> > iter, dax_iomap_actor);
> > @@ -1073,6 +1083,9 @@ dax_iomap_rw(struct kiocb *iocb, struct
> > iov_iter *iter,
> > done += ret;
> > }
> >
> > + if (start)
> > + generic_end_io_acct(iov_iter_rw(iter), &disk-
> > >part0, start);
> > +
>
> I think we can afford to add a separate flag that indicates whether
> we called generic_start_io_acct(). Just in case 'start' is '0' after
> 'jiffies' rolls over.
Good point. I will add a flag to account such a case.
Thanks,
-Toshi
Powered by blists - more mailing lists