Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e75f2ca4 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Pradeep P V K
Browse files

block: delete part_round_stats and switch to less precise counting



We want to convert to per-cpu in_flight counters.

The function part_round_stats needs the in_flight counter every jiffy, it
would be too costly to sum all the percpu variables every jiffy, so it
must be deleted. part_round_stats is used to calculate two counters -
time_in_queue and io_ticks.

time_in_queue can be calculated without part_round_stats, by adding the
duration of the I/O when the I/O ends (the value is almost as exact as the
previously calculated value, except that time for in-progress I/Os is not
counted).

io_ticks can be approximated by increasing the value when I/O is started
or ended and the jiffies value has changed. If the I/Os take less than a
jiffy, the value is as exact as the previously calculated value. If the
I/Os take more than a jiffy, io_ticks can drift behind the previously
calculated value.

Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk&gt;.>

Change-Id: I39ed139e8059dc7cc6dff95eb797f1cee4cef0fb
Git-commit: 5b18b5a737600fd20ba2045f320d5926ebbf341a
Git-repo: https://android.googlesource.com/kernel/common/


Signed-off-by: default avatarPradeep P V K <quic_pragalla@quicinc.com>
parent 30a9d3b2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment