block: switch to per-cpu in-flight counters
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 6 Dec 2018 16:41:20 +0000 (11:41 -0500)
committerJens Axboe <axboe@kernel.dk>
Mon, 10 Dec 2018 15:30:37 +0000 (08:30 -0700)
commit1226b8dd0e91331cfab500f305b2c264445a0392
tree347679d6d2eafea136d7d93529e16cd6fbe87609
parent5b18b5a737600fd20ba2045f320d5926ebbf341a
block: switch to per-cpu in-flight counters

Now when part_round_stats is gone, we can switch to per-cpu in-flight
counters.

We use the local-atomic type local_t, so that if part_inc_in_flight or
part_dec_in_flight is reentrantly called from an interrupt, the value will
be correct.

The other counters could be corrupted due to reentrant interrupt, but the
corruption only results in slight counter skew - the in_flight counter
must be exact, so it needs local_t.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/genhd.c
include/linux/genhd.h