projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c9f209
)
blk-throttle: Use more suitable time_after check for update of slice_start
author
Kemeng Shi
<shikemeng@huawei.com>
Mon, 5 Dec 2022 11:57:09 +0000
(19:57 +0800)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 5 Dec 2022 20:45:31 +0000
(13:45 -0700)
There is no need to update tg->slice_start[rw] to start when they are
equal already. So remove "eq" part of check before update slice_start.
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
Link:
https://lore.kernel.org/r/20221205115709.251489-10-shikemeng@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-throttle.c
patch
|
blob
|
history
diff --git
a/block/blk-throttle.c
b/block/blk-throttle.c
index
413e668
..
6fb5a2f
100644
(file)
--- a/
block/blk-throttle.c
+++ b/
block/blk-throttle.c
@@
-645,7
+645,7
@@
static inline void throtl_start_new_slice_with_credit(struct throtl_grp *tg,
* that bandwidth. Do try to make use of that bandwidth while giving
* credit.
*/
- if (time_after
_eq
(start, tg->slice_start[rw]))
+ if (time_after(start, tg->slice_start[rw]))
tg->slice_start[rw] = start;
tg->slice_end[rw] = jiffies + tg->td->throtl_slice;