Re: [PATCH 4/4] block: account io: convert part->in_fligh[] into percpu variable

2015-07-16 Thread Tejun Heo
Hello, On Thu, Jul 16, 2015 at 11:16:47AM +0800, Ming Lei wrote: ... > --- a/drivers/md/dm.c > +++ b/drivers/md/dm.c > @@ -651,9 +651,9 @@ static void start_io_acct(struct dm_io *io) > > cpu = part_stat_lock(); > part_round_stats(cpu, &dm_disk(md)->part0); > + part_stat_set(cpu,

[PATCH 4/4] block: account io: convert part->in_fligh[] into percpu variable

2015-07-15 Thread Ming Lei
So the atomic operations for accounting block I/O can be killed completely, and it is OK to add the percpu variables in part_in_flight() because the function is run at most one time in every tick. Signed-off-by: Ming Lei --- block/blk-core.c | 1 + block/partition-generic.c | 5 +++--