mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
block: simplify I/O stat accounting
This simplifies I/O stat accounting switching code and separates it completely from I/O scheduler switch code. Requests are accounted according to the state of their request queue at the time of the request allocation. There is no need anymore to flush the request queue when switching I/O accounting state. Signed-off-by: Jerome Marchand <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
097102c2d0
commit
42dad7647a
5 changed files with 12 additions and 13 deletions
|
|
@ -114,12 +114,7 @@ static inline int blk_cpu_to_group(int cpu)
|
|||
|
||||
static inline int blk_do_io_stat(struct request *rq)
|
||||
{
|
||||
struct gendisk *disk = rq->rq_disk;
|
||||
|
||||
if (!disk || !disk->queue)
|
||||
return 0;
|
||||
|
||||
return blk_queue_io_stat(disk->queue) && (rq->cmd_flags & REQ_ELVPRIV);
|
||||
return rq->rq_disk && blk_rq_io_stat(rq);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue