Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934489AbcJQSz5 (ORCPT ); Mon, 17 Oct 2016 14:55:57 -0400 Received: from mail-oi0-f44.google.com ([209.85.218.44]:34047 "EHLO mail-oi0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932359AbcJQSzy (ORCPT ); Mon, 17 Oct 2016 14:55:54 -0400 MIME-Version: 1.0 In-Reply-To: <1476725956.20881.68.camel@hpe.com> References: <1476465913-25305-1-git-send-email-toshi.kani@hpe.com> <20161015075443.GG27872@dastard> <1476725956.20881.68.camel@hpe.com> From: Dan Williams Date: Mon, 17 Oct 2016 11:55:53 -0700 Message-ID: Subject: Re: [PATCH] DAX: enable iostat for read/write To: "Kani, Toshimitsu" Cc: "david@fromorbit.com" , "viro@zeniv.linux.org.uk" , "ross.zwisler@linux.intel.com" , "linux-nvdimm@lists.01.org" , "linux-kernel@vger.kernel.org" , "akpm@linux-foundation.org" , "linux-fsdevel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1027 Lines: 29 On Mon, Oct 17, 2016 at 10:40 AM, Kani, Toshimitsu wrote: > 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? Yes, sounds good to me.