* [PATCH] bpf: Remove redundant __GFP_NOWARN
@ 2025-08-04 12:27 Qianfeng Rong
2025-08-04 13:21 ` Jiri Olsa
2025-08-12 22:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Qianfeng Rong @ 2025-08-04 12:27 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, David S. Miller,
Jakub Kicinski, Jesper Dangaard Brouer, John Fastabend,
Stanislav Fomichev, Andrii Nakryiko, Martin KaFai Lau,
Eduard Zingerman, Song Liu, Yonghong Song, KP Singh, Hao Luo,
Jiri Olsa, netdev, bpf, 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.
No functional changes.
Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
---
kernel/bpf/devmap.c | 2 +-
kernel/bpf/local_storage.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c
index 482d284a1553..2625601de76e 100644
--- a/kernel/bpf/devmap.c
+++ b/kernel/bpf/devmap.c
@@ -865,7 +865,7 @@ static struct bpf_dtab_netdev *__dev_map_alloc_node(struct net *net,
struct bpf_dtab_netdev *dev;
dev = bpf_map_kmalloc_node(&dtab->map, sizeof(*dev),
- GFP_NOWAIT | __GFP_NOWARN,
+ GFP_NOWAIT,
dtab->map.numa_node);
if (!dev)
return ERR_PTR(-ENOMEM);
diff --git a/kernel/bpf/local_storage.c b/kernel/bpf/local_storage.c
index 632d51b05fe9..c93a756e035c 100644
--- a/kernel/bpf/local_storage.c
+++ b/kernel/bpf/local_storage.c
@@ -165,7 +165,7 @@ static long cgroup_storage_update_elem(struct bpf_map *map, void *key,
}
new = bpf_map_kmalloc_node(map, struct_size(new, data, map->value_size),
- __GFP_ZERO | GFP_NOWAIT | __GFP_NOWARN,
+ __GFP_ZERO | GFP_NOWAIT,
map->numa_node);
if (!new)
return -ENOMEM;
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] bpf: Remove redundant __GFP_NOWARN
2025-08-04 12:27 [PATCH] bpf: Remove redundant __GFP_NOWARN Qianfeng Rong
@ 2025-08-04 13:21 ` Jiri Olsa
2025-08-12 22:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Olsa @ 2025-08-04 13:21 UTC (permalink / raw)
To: Qianfeng Rong
Cc: Alexei Starovoitov, Daniel Borkmann, David S. Miller,
Jakub Kicinski, Jesper Dangaard Brouer, John Fastabend,
Stanislav Fomichev, Andrii Nakryiko, Martin KaFai Lau,
Eduard Zingerman, Song Liu, Yonghong Song, KP Singh, Hao Luo,
netdev, bpf, linux-kernel
On Mon, Aug 04, 2025 at 08:27:30PM +0800, Qianfeng Rong wrote:
> 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.
>
> No functional changes.
>
> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
jirka
> ---
> kernel/bpf/devmap.c | 2 +-
> kernel/bpf/local_storage.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c
> index 482d284a1553..2625601de76e 100644
> --- a/kernel/bpf/devmap.c
> +++ b/kernel/bpf/devmap.c
> @@ -865,7 +865,7 @@ static struct bpf_dtab_netdev *__dev_map_alloc_node(struct net *net,
> struct bpf_dtab_netdev *dev;
>
> dev = bpf_map_kmalloc_node(&dtab->map, sizeof(*dev),
> - GFP_NOWAIT | __GFP_NOWARN,
> + GFP_NOWAIT,
> dtab->map.numa_node);
> if (!dev)
> return ERR_PTR(-ENOMEM);
> diff --git a/kernel/bpf/local_storage.c b/kernel/bpf/local_storage.c
> index 632d51b05fe9..c93a756e035c 100644
> --- a/kernel/bpf/local_storage.c
> +++ b/kernel/bpf/local_storage.c
> @@ -165,7 +165,7 @@ static long cgroup_storage_update_elem(struct bpf_map *map, void *key,
> }
>
> new = bpf_map_kmalloc_node(map, struct_size(new, data, map->value_size),
> - __GFP_ZERO | GFP_NOWAIT | __GFP_NOWARN,
> + __GFP_ZERO | GFP_NOWAIT,
> map->numa_node);
> if (!new)
> return -ENOMEM;
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bpf: Remove redundant __GFP_NOWARN
2025-08-04 12:27 [PATCH] bpf: Remove redundant __GFP_NOWARN Qianfeng Rong
2025-08-04 13:21 ` Jiri Olsa
@ 2025-08-12 22:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-08-12 22:00 UTC (permalink / raw)
To: Qianfeng Rong
Cc: ast, daniel, davem, kuba, hawk, john.fastabend, sdf, andrii,
martin.lau, eddyz87, song, yonghong.song, kpsingh, haoluo, jolsa,
netdev, bpf, linux-kernel
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Mon, 4 Aug 2025 20:27:30 +0800 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- bpf: Remove redundant __GFP_NOWARN
https://git.kernel.org/bpf/bpf-next/c/3e2b799008a7
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-12 21:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-04 12:27 [PATCH] bpf: Remove redundant __GFP_NOWARN Qianfeng Rong
2025-08-04 13:21 ` Jiri Olsa
2025-08-12 22:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox