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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
> 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
��.n��������+%������w��{.n�����{���)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux