mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] block, bfq: remove redundant __GFP_NOWARN
@ 2025-08-09 14:22 Qianfeng Rong
  2025-08-11  0:59 ` Yu Kuai
  0 siblings, 1 reply; 3+ messages in thread
From: Qianfeng Rong @ 2025-08-09 14:22 UTC (permalink / raw)
  To: Yu Kuai, Jens Axboe, linux-block, linux-kernel; +Cc: Qianfeng Rong

Commit 16f5dfbc851b ("gfp: include __GFP_NOWARN in GFP_NOWAIT") made
GFP_NOWAIT implicitly include __GFP_NOWARN.

Therefore, explicit __GFP_NOWARN combined with GFP_NOWAIT (e.g.,
`GFP_NOWAIT | __GFP_NOWARN`) is now redundant.  Let's clean up these
redundant flags across subsystems.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
---
 block/bfq-iosched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 3bf76902f07f..db0ae65186ec 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -5848,7 +5848,7 @@ static struct bfq_queue *bfq_get_queue(struct bfq_data *bfqd,
 	}
 
 	bfqq = kmem_cache_alloc_node(bfq_pool,
-				     GFP_NOWAIT | __GFP_ZERO | __GFP_NOWARN,
+				     GFP_NOWAIT | __GFP_ZERO,
 				     bfqd->queue->node);
 
 	if (bfqq) {
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block, bfq: remove redundant __GFP_NOWARN
  2025-08-09 14:22 [PATCH] block, bfq: remove redundant __GFP_NOWARN Qianfeng Rong
@ 2025-08-11  0:59 ` Yu Kuai
  2025-08-11  7:40   ` Qianfeng Rong
  0 siblings, 1 reply; 3+ messages in thread
From: Yu Kuai @ 2025-08-11  0:59 UTC (permalink / raw)
  To: Qianfeng Rong, Jens Axboe, linux-block, linux-kernel, yukuai (C)

Hi,

在 2025/08/09 22:22, Qianfeng Rong 写道:
> Commit 16f5dfbc851b ("gfp: include __GFP_NOWARN in GFP_NOWAIT") made
> GFP_NOWAIT implicitly include __GFP_NOWARN.
> 
> Therefore, explicit __GFP_NOWARN combined with GFP_NOWAIT (e.g.,
> `GFP_NOWAIT | __GFP_NOWARN`) is now redundant.  Let's clean up these
> redundant flags across subsystems.
> 
> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
> ---
>   block/bfq-iosched.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
> index 3bf76902f07f..db0ae65186ec 100644
> --- a/block/bfq-iosched.c
> +++ b/block/bfq-iosched.c
> @@ -5848,7 +5848,7 @@ static struct bfq_queue *bfq_get_queue(struct bfq_data *bfqd,
>   	}
>   
>   	bfqq = kmem_cache_alloc_node(bfq_pool,
> -				     GFP_NOWAIT | __GFP_ZERO | __GFP_NOWARN,
> +				     GFP_NOWAIT | __GFP_ZERO,
Can you also combine this line with the one above?

Otherwise LGTM. Feel free to add:

Reviewed-by: Yu Kuai <yukuai3@huawei.com>

>   				     bfqd->queue->node);
>   
>   	if (bfqq) {
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block, bfq: remove redundant __GFP_NOWARN
  2025-08-11  0:59 ` Yu Kuai
@ 2025-08-11  7:40   ` Qianfeng Rong
  0 siblings, 0 replies; 3+ messages in thread
From: Qianfeng Rong @ 2025-08-11  7:40 UTC (permalink / raw)
  To: Yu Kuai, Jens Axboe, linux-block, linux-kernel, yukuai (C)


在 2025/8/11 8:59, Yu Kuai 写道:
> [You don't often get email from yukuai1@huaweicloud.com. Learn why 
> this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Hi,
>
> 在 2025/08/09 22:22, Qianfeng Rong 写道:
>> Commit 16f5dfbc851b ("gfp: include __GFP_NOWARN in GFP_NOWAIT") made
>> GFP_NOWAIT implicitly include __GFP_NOWARN.
>>
>> Therefore, explicit __GFP_NOWARN combined with GFP_NOWAIT (e.g.,
>> `GFP_NOWAIT | __GFP_NOWARN`) is now redundant.  Let's clean up these
>> redundant flags across subsystems.
>>
>> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
>> ---
>>   block/bfq-iosched.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
>> index 3bf76902f07f..db0ae65186ec 100644
>> --- a/block/bfq-iosched.c
>> +++ b/block/bfq-iosched.c
>> @@ -5848,7 +5848,7 @@ static struct bfq_queue *bfq_get_queue(struct 
>> bfq_data *bfqd,
>>       }
>>
>>       bfqq = kmem_cache_alloc_node(bfq_pool,
>> -                                  GFP_NOWAIT | __GFP_ZERO | 
>> __GFP_NOWARN,
>> +                                  GFP_NOWAIT | __GFP_ZERO,
> Can you also combine this line with the one above?

OK, I'll post the second version soon.

Best regards,
Qianfeng

>
> Otherwise LGTM. Feel free to add:
>
> Reviewed-by: Yu Kuai <yukuai3@huawei.com>
>
>> bfqd->queue->node);
>>
>>       if (bfqq) {
>>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-11  7:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-09 14:22 [PATCH] block, bfq: remove redundant __GFP_NOWARN Qianfeng Rong
2025-08-11  0:59 ` Yu Kuai
2025-08-11  7:40   ` Qianfeng Rong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®