mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [Patch for review] BSD accounting IO stats
Date: Mon, 2 Aug 2004 09:57:42 -0700	[thread overview]
Message-ID: <20040802095742.0c62bea8.akpm@osdl.org> (raw)
In-Reply-To: <410E26FC.208@bull.net>

Guillaume Thouvenin <guillaume.thouvenin@bull.net> wrote:
>
> diff -uprN -X dontdiff linux-2.6.8-rc2/drivers/block/ll_rw_blk.c linux-2.6.8-rc2+BSDacct_IO/drivers/block/ll_rw_blk.c
>  --- linux-2.6.8-rc2/drivers/block/ll_rw_blk.c	2004-07-18 06:57:42.000000000 +0200
>  +++ linux-2.6.8-rc2+BSDacct_IO/drivers/block/ll_rw_blk.c	2004-07-27 09:17:33.149321480 +0200
>  @@ -1949,10 +1949,12 @@ void drive_stat_acct(struct request *rq,
>   
>   	if (rw == READ) {
>   		disk_stat_add(rq->rq_disk, read_sectors, nr_sectors);
>  +		current->rblk += nr_sectors;
>   		if (!new_io)
>   			disk_stat_inc(rq->rq_disk, read_merges);
>   	} else if (rw == WRITE) {
>   		disk_stat_add(rq->rq_disk, write_sectors, nr_sectors);
>  +		current->wblk += nr_sectors;
>   		if (!new_io)
>   			disk_stat_inc(rq->rq_disk, write_merges);
>   	}

The `wblk' accounting will be quite wrong - most writes will be accounted
to pdflush, kjournald, etc.

  parent reply	other threads:[~2004-08-02 16:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-02 11:35 Guillaume Thouvenin
2004-08-02 12:13 ` Rik van Riel
2004-08-02 12:58   ` Guillaume Thouvenin
2004-08-02 16:57 ` Andrew Morton [this message]
     [not found] <2oJkL-4sl-41@gated-at.bofh.it>
2004-08-02 12:44 ` Andi Kleen
2004-08-02 19:11   ` Rik van Riel
2004-08-02 20:10     ` Chris Wedgwood
2004-08-03 11:20   ` Guillaume Thouvenin

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=20040802095742.0c62bea8.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=guillaume.thouvenin@bull.net \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®