* Re: [PATCH 0/2] block, bfq: minor cleanups
2022-12-14 3:31 [PATCH 0/2] block, bfq: minor cleanups Yu Kuai
@ 2022-12-14 3:14 ` Yu Kuai
2022-12-14 15:57 ` Jan Kara
2022-12-14 3:31 ` [PATCH 1/2] block, bfq: don't return bfqg from __bfq_bic_change_cgroup() Yu Kuai
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Yu Kuai @ 2022-12-14 3:14 UTC (permalink / raw)
To: Jan Kara, paolo.valente, axboe, tj, josef
Cc: linux-block, cgroups, linux-kernel, yi.zhang, yukuai (C)
Hi, Jan
Sorry that I forgot to cc you.
Thanks,
Kuai
在 2022/12/14 11:31, Yu Kuai 写道:
> From: Yu Kuai <yukuai3@huawei.com>
>
> Yu Kuai (2):
> block, bfq: don't return bfqg from __bfq_bic_change_cgroup()
> block, bfq: replace 0/1 with false/true in bic apis
>
> block/bfq-cgroup.c | 16 +++++++---------
> block/bfq-iosched.c | 4 ++--
> 2 files changed, 9 insertions(+), 11 deletions(-)
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 0/2] block, bfq: minor cleanups
@ 2022-12-14 3:31 Yu Kuai
2022-12-14 3:14 ` Yu Kuai
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Yu Kuai @ 2022-12-14 3:31 UTC (permalink / raw)
To: paolo.valente, axboe, tj, josef
Cc: linux-block, cgroups, linux-kernel, yukuai3, yukuai1, yi.zhang
From: Yu Kuai <yukuai3@huawei.com>
Yu Kuai (2):
block, bfq: don't return bfqg from __bfq_bic_change_cgroup()
block, bfq: replace 0/1 with false/true in bic apis
block/bfq-cgroup.c | 16 +++++++---------
block/bfq-iosched.c | 4 ++--
2 files changed, 9 insertions(+), 11 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] block, bfq: don't return bfqg from __bfq_bic_change_cgroup()
2022-12-14 3:31 [PATCH 0/2] block, bfq: minor cleanups Yu Kuai
2022-12-14 3:14 ` Yu Kuai
@ 2022-12-14 3:31 ` Yu Kuai
2022-12-14 3:31 ` [PATCH 2/2] block, bfq: replace 0/1 with false/true in bic apis Yu Kuai
2022-12-14 16:56 ` [PATCH 0/2] block, bfq: minor cleanups Jens Axboe
3 siblings, 0 replies; 6+ messages in thread
From: Yu Kuai @ 2022-12-14 3:31 UTC (permalink / raw)
To: paolo.valente, axboe, tj, josef
Cc: linux-block, cgroups, linux-kernel, yukuai3, yukuai1, yi.zhang
From: Yu Kuai <yukuai3@huawei.com>
The return value is not used, hence remove it.
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
---
block/bfq-cgroup.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
index 627476bc6495..23dc355a106d 100644
--- a/block/bfq-cgroup.c
+++ b/block/bfq-cgroup.c
@@ -724,9 +724,9 @@ void bfq_bfqq_move(struct bfq_data *bfqd, struct bfq_queue *bfqq,
* sure that the reference to cgroup is valid across the call (see
* comments in bfq_bic_update_cgroup on this issue)
*/
-static void *__bfq_bic_change_cgroup(struct bfq_data *bfqd,
- struct bfq_io_cq *bic,
- struct bfq_group *bfqg)
+static void __bfq_bic_change_cgroup(struct bfq_data *bfqd,
+ struct bfq_io_cq *bic,
+ struct bfq_group *bfqg)
{
struct bfq_queue *async_bfqq = bic_to_bfqq(bic, 0);
struct bfq_queue *sync_bfqq = bic_to_bfqq(bic, 1);
@@ -776,8 +776,6 @@ static void *__bfq_bic_change_cgroup(struct bfq_data *bfqd,
}
}
}
-
- return bfqg;
}
void bfq_bic_update_cgroup(struct bfq_io_cq *bic, struct bio *bio)
--
2.31.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] block, bfq: replace 0/1 with false/true in bic apis
2022-12-14 3:31 [PATCH 0/2] block, bfq: minor cleanups Yu Kuai
2022-12-14 3:14 ` Yu Kuai
2022-12-14 3:31 ` [PATCH 1/2] block, bfq: don't return bfqg from __bfq_bic_change_cgroup() Yu Kuai
@ 2022-12-14 3:31 ` Yu Kuai
2022-12-14 16:56 ` [PATCH 0/2] block, bfq: minor cleanups Jens Axboe
3 siblings, 0 replies; 6+ messages in thread
From: Yu Kuai @ 2022-12-14 3:31 UTC (permalink / raw)
To: paolo.valente, axboe, tj, josef
Cc: linux-block, cgroups, linux-kernel, yukuai3, yukuai1, yi.zhang
From: Yu Kuai <yukuai3@huawei.com>
Just to make the code a litter cleaner, there are no functional changes.
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
---
block/bfq-cgroup.c | 8 ++++----
block/bfq-iosched.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
index 23dc355a106d..1b2829e99dad 100644
--- a/block/bfq-cgroup.c
+++ b/block/bfq-cgroup.c
@@ -728,15 +728,15 @@ static void __bfq_bic_change_cgroup(struct bfq_data *bfqd,
struct bfq_io_cq *bic,
struct bfq_group *bfqg)
{
- struct bfq_queue *async_bfqq = bic_to_bfqq(bic, 0);
- struct bfq_queue *sync_bfqq = bic_to_bfqq(bic, 1);
+ struct bfq_queue *async_bfqq = bic_to_bfqq(bic, false);
+ struct bfq_queue *sync_bfqq = bic_to_bfqq(bic, true);
struct bfq_entity *entity;
if (async_bfqq) {
entity = &async_bfqq->entity;
if (entity->sched_data != &bfqg->sched_data) {
- bic_set_bfqq(bic, NULL, 0);
+ bic_set_bfqq(bic, NULL, false);
bfq_release_process_ref(bfqd, async_bfqq);
}
}
@@ -772,7 +772,7 @@ static void __bfq_bic_change_cgroup(struct bfq_data *bfqd,
*/
bfq_put_cooperator(sync_bfqq);
bfq_release_process_ref(bfqd, sync_bfqq);
- bic_set_bfqq(bic, NULL, 1);
+ bic_set_bfqq(bic, NULL, true);
}
}
}
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index b111a7b8dca6..dc576b90ddfe 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -3114,7 +3114,7 @@ bfq_merge_bfqqs(struct bfq_data *bfqd, struct bfq_io_cq *bic,
/*
* Merge queues (that is, let bic redirect its requests to new_bfqq)
*/
- bic_set_bfqq(bic, new_bfqq, 1);
+ bic_set_bfqq(bic, new_bfqq, true);
bfq_mark_bfqq_coop(new_bfqq);
/*
* new_bfqq now belongs to at least two bics (it is a shared queue):
@@ -6562,7 +6562,7 @@ bfq_split_bfqq(struct bfq_io_cq *bic, struct bfq_queue *bfqq)
return bfqq;
}
- bic_set_bfqq(bic, NULL, 1);
+ bic_set_bfqq(bic, NULL, true);
bfq_put_cooperator(bfqq);
--
2.31.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] block, bfq: minor cleanups
2022-12-14 3:14 ` Yu Kuai
@ 2022-12-14 15:57 ` Jan Kara
0 siblings, 0 replies; 6+ messages in thread
From: Jan Kara @ 2022-12-14 15:57 UTC (permalink / raw)
To: Yu Kuai
Cc: Jan Kara, paolo.valente, axboe, tj, josef, linux-block, cgroups,
linux-kernel, yi.zhang, yukuai (C)
On Wed 14-12-22 11:14:49, Yu Kuai wrote:
> Hi, Jan
>
> Sorry that I forgot to cc you.
Both patches look good to me. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
>
> Thanks,
> Kuai
>
> 在 2022/12/14 11:31, Yu Kuai 写道:
> > From: Yu Kuai <yukuai3@huawei.com>
> >
> > Yu Kuai (2):
> > block, bfq: don't return bfqg from __bfq_bic_change_cgroup()
> > block, bfq: replace 0/1 with false/true in bic apis
> >
> > block/bfq-cgroup.c | 16 +++++++---------
> > block/bfq-iosched.c | 4 ++--
> > 2 files changed, 9 insertions(+), 11 deletions(-)
> >
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] block, bfq: minor cleanups
2022-12-14 3:31 [PATCH 0/2] block, bfq: minor cleanups Yu Kuai
` (2 preceding siblings ...)
2022-12-14 3:31 ` [PATCH 2/2] block, bfq: replace 0/1 with false/true in bic apis Yu Kuai
@ 2022-12-14 16:56 ` Jens Axboe
3 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2022-12-14 16:56 UTC (permalink / raw)
To: paolo.valente, tj, josef, Yu Kuai
Cc: linux-block, cgroups, linux-kernel, yukuai3, yi.zhang
On Wed, 14 Dec 2022 11:31:53 +0800, Yu Kuai wrote:
> Yu Kuai (2):
> block, bfq: don't return bfqg from __bfq_bic_change_cgroup()
> block, bfq: replace 0/1 with false/true in bic apis
>
> block/bfq-cgroup.c | 16 +++++++---------
> block/bfq-iosched.c | 4 ++--
> 2 files changed, 9 insertions(+), 11 deletions(-)
>
> [...]
Applied, thanks!
[1/2] block, bfq: don't return bfqg from __bfq_bic_change_cgroup()
commit: 452af7dc59033a76372d51a24682503377872b11
[2/2] block, bfq: replace 0/1 with false/true in bic apis
commit: 337366e02b370d2800110fbc99940f6ddddcbdfa
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-12-14 16:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-14 3:31 [PATCH 0/2] block, bfq: minor cleanups Yu Kuai
2022-12-14 3:14 ` Yu Kuai
2022-12-14 15:57 ` Jan Kara
2022-12-14 3:31 ` [PATCH 1/2] block, bfq: don't return bfqg from __bfq_bic_change_cgroup() Yu Kuai
2022-12-14 3:31 ` [PATCH 2/2] block, bfq: replace 0/1 with false/true in bic apis Yu Kuai
2022-12-14 16:56 ` [PATCH 0/2] block, bfq: minor cleanups Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).