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


Groups > linux.kernel > #1556686

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

Path csiph.com!news.freedyn.net!open-news-network.org!aioe.org!bofh.it!news.nic.it!robomod
From "Kani, Toshimitsu" <toshi.kani@hpe.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4] DAX: enable iostat for read/write
Date Wed, 11 Jan 2017 17:30:01 +0100
Message-ID <sYtWF-In-7@gated-at.bofh.it> (permalink)
References <sYdRT-7D2-13@gated-at.bofh.it> <sYiRz-29R-3@gated-at.bofh.it>
X-Original-To "joe@perches.com" <joe@perches.com>, "dan.j.williams@intel.com" <dan.j.williams@intel.com>, "akpm@linux-foundation.org" <akpm@linux-foundation.org>
Thread-Topic [PATCH v4] DAX: enable iostat for read/write
Thread-Index AQHSa5d/ro3wS0lNGEiFAt9SbjNTx6EysT+AgADW3AA=
Accept-Language en-US
Content-Language en-US
Authentication-Results spf=none (sender IP is ) smtp.mailfrom=toshi.kani@hpe.com;
X-Ms-Exchange-Messagesentrepresentingtype 1
X-Originating-IP [15.219.163.9]
X-Ms-Office365-Filtering-Correlation-ID 9e8dc5f7-7782-4512-820d-08d43a3effcf
X-Microsoft-Antispam UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CS1PR84MB0293;
X-Microsoft-Exchange-Diagnostics 1;CS1PR84MB0293;7:fIleuY6hn/77iGSN2XKZaJ4JlsU+HFJLLVOyN1guYUMMeqVi7hVAHpQm5wZ7Pvw1xgnudTeGvfVJEu9o2htH70AN/O68XP5O4j/dAGEzWFh4GAYmn7OKPTX/IhLD5gXIFlKLSIzXlIzlY2lPE85Kk17/47C7PINSbn97JjBjzbw6976GMY9TaUBQUH/APxBoSczz9gW75P3fWZDm+yjCCkwPLw84oiyEZMBU2oxVB/GsA341rwzVe3A/Q3rajNCllU79wpjfFLQsqq7xUNSc0Nhz25OH6Zrd30wpLV0PU9eH8OZ+Et38TIt8urDJ4/1Semj65VRDCYmZdHJuZYW+p1szNHEoN3X/gxF5Vdv6XL3nL/+Ek4ob/rH1iHb/qmOalC4qJqKMPjSzX85MRP5eRQopNqGTDzJrx2aiwOlQ3yqaiLAU9gyqH+Tf8/mHs4aF87SyB/CHz3CpayqkkkWt0Q==
X-Microsoft-Antispam-Prvs <CS1PR84MB02930FD8353779A929F4798682660@CS1PR84MB0293.NAMPRD84.PROD.OUTLOOK.COM>
X-Exchange-Antispam-Report-Test UriScan:;
X-Exchange-Antispam-Report-Cfa-Test BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148);SRVR:CS1PR84MB0293;BCL:0;PCL:0;RULEID:;SRVR:CS1PR84MB0293;
X-Forefront-Prvs 01842C458A
X-Forefront-Antispam-Report SFV:NSPM;SFS:(10019020)(6009001)(7916002)(39860400002)(39840400002)(39850400002)(39410400002)(39450400003)(24454002)(189002)(377424004)(199003)(6436002)(6506006)(92566002)(8936002)(2950100002)(38730400001)(105586002)(54356999)(77096006)(122556002)(3660700001)(76176999)(8676002)(81156014)(81166006)(97736004)(2906002)(2501003)(6486002)(50986999)(5660300001)(68736007)(4326007)(6512007)(66066001)(2900100001)(33646002)(101416001)(106356001)(6116002)(2201001)(305945005)(229853002)(102836003)(106116001)(103116003)(3846002)(7736002)(3280700002)(189998001)(86362001)(5001770100001)(36756003);DIR:OUT;SFP:1102;SCL:1;SRVR:CS1PR84MB0293;H:CS1PR84MB0294.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en;
Received-Spf None (protection.outlook.com: hpe.com does not designate permitted sender hosts)
Spamdiagnosticoutput 1:99
Spamdiagnosticmetadata NSPM
Content-Type text/plain; charset="utf-8"
Content-ID <47FAF610C1BCFD4EB01438815B7AD868@NAMPRD84.PROD.OUTLOOK.COM>
Content-Transfer-Encoding base64
MIME-Version 1.0
X-Originatororg hpe.com
X-Ms-Exchange-Crosstenant-Originalarrivaltime 11 Jan 2017 16:29:21.8293 (UTC)
X-Ms-Exchange-Crosstenant-Fromentityheader Hosted
X-Ms-Exchange-Crosstenant-ID 105b2061-b669-4b31-92ac-24d304d195dc
X-Ms-Exchange-Transport-Crosstenantheadersstamped CS1PR84MB0293
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 19
Organization linux.* mail to news gateway
X-Original-Cc "viro@zenihttp.domain.invalid" <viro@zenihttp.domain.invalid>, "ross.zwisler@linux.intel.com" <ross.zwisler@linux.intel.com>, "david@fromorbit.com" <david@fromorbit.com>, "linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
X-Original-Date Wed, 11 Jan 2017 16:29:21 +0000
X-Original-Message-ID <1484155504.2029.3.camel@hpe.com>
X-Original-References <20170111001122.10826-1-toshi.kani@hpe.com> <1484109363.12006.19.camel@perches.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1556686

Show key headers only | View raw


On Tue, 2017-01-10 at 20:36 -0800, Joe Perches wrote:
> > 
On Tue, 2017-01-10 at 17:11 -0700, Toshi Kani 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.
> 
> []
> > diff --git a/fs/dax.c b/fs/dax.c
> 
> []
> > @@ -1058,12 +1058,22 @@ dax_iomap_rw(struct kiocb *iocb, struct
> > iov_iter *iter,
> 
> []
> > +	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);
> > +	}
> 
> There is a signed/unsigned conversion of sec
> It may be better to use something like:
> 
> 		size_t sec  = iov_iter_count(iter) >> 9;
> 		[...]
> 		generic_start_io_acct(iov_iter_rw(iter),
> 				      min_t(unsigned long, 1, sec),
> 				      &disk->part0);

Good catch. I will change as you suggested, and use 'sector_t' for
'sec'. 

Thanks,
-Toshi

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


Thread

[PATCH v4] DAX: enable iostat for read/write Toshi Kani <toshi.kani@hpe.com> - 2017-01-11 00:20 +0100
  Re: [PATCH v4] DAX: enable iostat for read/write Dan Williams <dan.j.williams@intel.com> - 2017-01-11 00:50 +0100
    Re: [PATCH v4] DAX: enable iostat for read/write "Kani, Toshimitsu" <toshi.kani@hpe.com> - 2017-01-11 01:00 +0100
  Re: [PATCH v4] DAX: enable iostat for read/write Joe Perches <joe@perches.com> - 2017-01-11 05:40 +0100
    Re: [PATCH v4] DAX: enable iostat for read/write "Kani, Toshimitsu" <toshi.kani@hpe.com> - 2017-01-11 17:30 +0100

csiph-web