[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4CB6FDB7.5010501@kernel.dk>
Date: Thu, 14 Oct 2010 14:55:19 +0200
From: Jens Axboe <axboe@...nel.dk>
To: Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>
CC: kosaki.motohiro@...fujitsu.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] blk: fix a wrong accounting of hd_struct->in_flight
On 2010-10-14 14:48, Yasuaki Ishimatsu wrote:
> Index: linux-2.6.36-rc7/block/blk-core.c
> ===================================================================
> --- linux-2.6.36-rc7.orig/block/blk-core.c 2010-10-07 05:39:52.000000000 +0900
> +++ linux-2.6.36-rc7/block/blk-core.c 2010-10-14 17:25:43.000000000 +0900
> @@ -66,9 +66,15 @@ static void drive_stat_acct(struct reque
> cpu = part_stat_lock();
> part = disk_map_sector_rcu(rq->rq_disk, blk_rq_pos(rq));
>
> - if (!new_io)
> + if (!new_io) {
> + if (unlikely(rq->part != part)) {
> + part_dec_in_flight(rq->part, rw);
> + part_inc_in_flight(part, rw);
> + rq->part = part;
> + }
> part_stat_inc(cpu, part, merges[rw]);
> - else {
> + } else {
> + rq->part = part;
> part_round_stats(cpu, part);
> part_inc_in_flight(part, rw);
> }
I was thinking that we'd do away with the lookup always if ->part was
already set. It will probably require a quiscing of IO on partition
table reload, though.
--
Jens Axboe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists