Message ID | 20220802140415.2960284-7-yukuai1@huaweicloud.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | bugfix and cleanup for blk-throttle | expand |
On Tue, Aug 02, 2022 at 10:04:12PM +0800, Yu Kuai wrote: > From: Yu Kuai <yukuai3@huawei.com> > > Make the code easier to read, like everywhere else. > > Signed-off-by: Yu Kuai <yukuai3@huawei.com> > Acked-by: Tejun Heo <tj@kernel.org> Let's float trivial acked patches to the front so that they can applied without waiting for the rest of the series. Thanks.
Hi, Tejun 在 2022/08/17 4:03, Tejun Heo 写道: > On Tue, Aug 02, 2022 at 10:04:12PM +0800, Yu Kuai wrote: >> From: Yu Kuai <yukuai3@huawei.com> >> >> Make the code easier to read, like everywhere else. >> >> Signed-off-by: Yu Kuai <yukuai3@huawei.com> >> Acked-by: Tejun Heo <tj@kernel.org> > > Let's float trivial acked patches to the front so that they can applied > without waiting for the rest of the series. > Good point! I'll move last 4 patches into a new patchset. Thanks, Kuai > Thanks. >
diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 237668328e98..907001eede85 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -329,8 +329,8 @@ static struct bio *throtl_pop_queued(struct list_head *queued, /* init a service_queue, assumes the caller zeroed it */ static void throtl_service_queue_init(struct throtl_service_queue *sq) { - INIT_LIST_HEAD(&sq->queued[0]); - INIT_LIST_HEAD(&sq->queued[1]); + INIT_LIST_HEAD(&sq->queued[READ]); + INIT_LIST_HEAD(&sq->queued[WRITE]); sq->pending_tree = RB_ROOT_CACHED; timer_setup(&sq->pending_timer, throtl_pending_timer_fn, 0); } @@ -1161,7 +1161,7 @@ static int throtl_select_dispatch(struct throtl_service_queue *parent_sq) nr_disp += throtl_dispatch_tg(tg); sq = &tg->service_queue; - if (sq->nr_queued[0] || sq->nr_queued[1]) + if (sq->nr_queued[READ] || sq->nr_queued[WRITE]) tg_update_disptime(tg); if (nr_disp >= THROTL_QUANTUM)