From: "Kani, Toshimitsu" <toshi.kani@hpe.com>
To: "david@fromorbit.com" <david@fromorbit.com>
Cc: "linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Subject: Re: [PATCH] DAX: enable iostat for read/write
Date: Mon, 17 Oct 2016 17:40:56 +0000 [thread overview]
Message-ID: <1476725956.20881.68.camel@hpe.com> (raw)
In-Reply-To: <20161015075443.GG27872@dastard>
On Sat, 2016-10-15 at 18:54 +1100, Dave Chinner wrote:
> On Fri, Oct 14, 2016 at 11:25:13AM -0600, Toshi Kani wrote:
:
> > +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;
> > + int cpu = part_stat_lock();
> > +
> > + *start = jiffies;
> > + part_round_stats(cpu, &disk->part0);
> > + part_stat_inc(cpu, &disk->part0, ios[rw]);
> > + part_stat_add(cpu, &disk->part0, sectors[rw], sec);
> > + part_inc_in_flight(&disk->part0, rw);
> > + part_stat_unlock();
> > +}
>
> Why reimplement generic_start_io_acct() and generic_end_io_acct()?
It was modeled after __nd_iostat_start() / nd_iostart_end(). I agree
that we can use generic_start_io_acct() and generic_end_io_acct() here.
Should we also change the nd interface to use the generic version as
well?
Thanks,
-Toshi
ps.
Sorry I realized this comment after sending out v2...
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
WARNING: multiple messages have this Message-ID (diff)
From: "Kani, Toshimitsu" <toshi.kani@hpe.com>
To: "david@fromorbit.com" <david@fromorbit.com>
Cc: "dan.j.williams@intel.com" <dan.j.williams@intel.com>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"ross.zwisler@linux.intel.com" <ross.zwisler@linux.intel.com>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] DAX: enable iostat for read/write
Date: Mon, 17 Oct 2016 17:40:56 +0000 [thread overview]
Message-ID: <1476725956.20881.68.camel@hpe.com> (raw)
In-Reply-To: <20161015075443.GG27872@dastard>
On Sat, 2016-10-15 at 18:54 +1100, Dave Chinner wrote:
> On Fri, Oct 14, 2016 at 11:25:13AM -0600, Toshi Kani wrote:
:
> > +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;
> > + int cpu = part_stat_lock();
> > +
> > + *start = jiffies;
> > + part_round_stats(cpu, &disk->part0);
> > + part_stat_inc(cpu, &disk->part0, ios[rw]);
> > + part_stat_add(cpu, &disk->part0, sectors[rw], sec);
> > + part_inc_in_flight(&disk->part0, rw);
> > + part_stat_unlock();
> > +}
>
> Why reimplement generic_start_io_acct() and generic_end_io_acct()?
It was modeled after __nd_iostat_start() / nd_iostart_end(). I agree
that we can use generic_start_io_acct() and generic_end_io_acct() here.
Should we also change the nd interface to use the generic version as
well?
Thanks,
-Toshi
ps.
Sorry I realized this comment after sending out v2...
WARNING: multiple messages have this Message-ID (diff)
From: "Kani, Toshimitsu" <toshi.kani@hpe.com>
To: "david@fromorbit.com" <david@fromorbit.com>
Cc: "dan.j.williams@intel.com" <dan.j.williams@intel.com>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"ross.zwisler@linux.intel.com" <ross.zwisler@linux.intel.com>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] DAX: enable iostat for read/write
Date: Mon, 17 Oct 2016 17:40:56 +0000 [thread overview]
Message-ID: <1476725956.20881.68.camel@hpe.com> (raw)
In-Reply-To: <20161015075443.GG27872@dastard>
On Sat, 2016-10-15 at 18:54 +1100, Dave Chinner wrote:
> On Fri, Oct 14, 2016 at 11:25:13AM -0600, Toshi Kani wrote:
:
> > +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;
> > + int cpu = part_stat_lock();
> > +
> > + *start = jiffies;
> > + part_round_stats(cpu, &disk->part0);
> > + part_stat_inc(cpu, &disk->part0, ios[rw]);
> > + part_stat_add(cpu, &disk->part0, sectors[rw], sec);
> > + part_inc_in_flight(&disk->part0, rw);
> > + part_stat_unlock();
> > +}
>
> Why reimplement generic_start_io_acct() and generic_end_io_acct()?
It was modeled after __nd_iostat_start() / nd_iostart_end(). I agree
that we can use generic_start_io_acct() and generic_end_io_acct() here.
Should we also change the nd interface to use the generic version as
well?
Thanks,
-Toshi
ps.
Sorry I realized this comment after sending out v2...
next prev parent reply other threads:[~2016-10-17 17:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-14 17:25 [PATCH] DAX: enable iostat for read/write Toshi Kani
2016-10-14 17:25 ` Toshi Kani
2016-10-14 17:25 ` Toshi Kani
2016-10-14 17:35 ` Dan Williams
2016-10-14 17:35 ` Dan Williams
2016-10-14 17:35 ` Dan Williams
2016-10-14 18:47 ` Kani, Toshimitsu
2016-10-14 18:47 ` Kani, Toshimitsu
2016-10-14 18:47 ` Kani, Toshimitsu
2016-10-15 7:54 ` Dave Chinner
2016-10-15 7:54 ` Dave Chinner
2016-10-15 7:54 ` Dave Chinner
2016-10-17 17:40 ` Kani, Toshimitsu [this message]
2016-10-17 17:40 ` Kani, Toshimitsu
2016-10-17 17:40 ` Kani, Toshimitsu
2016-10-17 18:55 ` Dan Williams
2016-10-17 18:55 ` Dan Williams
2016-10-17 18:55 ` Dan Williams
2016-10-17 19:12 ` Kani, Toshimitsu
2016-10-17 19:12 ` Kani, Toshimitsu
2016-10-17 19:12 ` Kani, Toshimitsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1476725956.20881.68.camel@hpe.com \
--to=toshi.kani@hpe.com \
--cc=akpm@linux-foundation.org \
--cc=david@fromorbit.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.