Linux Device Mapper development
 help / color / mirror / Atom feed
From: Junichi Nomura <j-nomura@ce.jp.nec.com>
To: device-mapper development <dm-devel@redhat.com>
Subject: Re: ios and sectors should be incremented on completion
Date: Wed, 1 Oct 2014 08:26:05 +0000	[thread overview]
Message-ID: <542BBA9C.7010808@ce.jp.nec.com> (raw)
In-Reply-To: <20140926181236.177920a7a88d25a2d7189093@valinux.co.jp>

On 09/26/14 18:12, Akira Hayakawa wrote:
> I seems DM increments stats (ios and sectors) before completion.
> Why don't you do this in dec_pending?
> block/stat.txt says these values are incremented when I/O request completes.
> 
> Is this to be fixed or do you have some justifications for this behavior?

Do you have a problem with the current behavior other than the document?

AFAIR, dm increments ios/sectors at submission because md did.
And other bio-based drivers such as drbd and nvme seem to have followed
the precedence.

While md has a reason to do so (some md personalities just remaps bios
and doesn't track completion), dm should be able to collect stat
in dec_pending as it always clones.

So, I think it's ok to move ios/sectors counting to end_io_acct().
It might make tools like iostat happier.
You might want to fix other bio-based drivers as well.

-- 
Jun'ichi Nomura, NEC Corporation

  reply	other threads:[~2014-10-01  8:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26  9:12 ios and sectors should be incremented on completion Akira Hayakawa
2014-10-01  8:26 ` Junichi Nomura [this message]
2014-10-22  1:55   ` Akira Hayakawa

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=542BBA9C.7010808@ce.jp.nec.com \
    --to=j-nomura@ce.jp.nec.com \
    --cc=dm-devel@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox