[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPhsuW7Bk3Xbu2bcb0aJw_McMWXnUL90jj1qQK1a_e126GpESA@mail.gmail.com>
Date: Mon, 27 Jul 2020 17:01:23 -0700
From: Song Liu <song@...nel.org>
To: Roman Gushchin <guro@...com>
Cc: bpf <bpf@...r.kernel.org>, Networking <netdev@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Kernel Team <kernel-team@...com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH bpf-next v2 12/35] bpf: refine memcg-based memory
accounting for xskmap maps
On Mon, Jul 27, 2020 at 12:25 PM Roman Gushchin <guro@...com> wrote:
>
> Extend xskmap memory accounting to include the memory taken by
> the xsk_map_node structure.
>
> Signed-off-by: Roman Gushchin <guro@...com>
Acked-by: Song Liu <songliubraving@...com>
> ---
> net/xdp/xskmap.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/xdp/xskmap.c b/net/xdp/xskmap.c
> index 8367adbbe9df..e574b22defe5 100644
> --- a/net/xdp/xskmap.c
> +++ b/net/xdp/xskmap.c
> @@ -28,7 +28,8 @@ static struct xsk_map_node *xsk_map_node_alloc(struct xsk_map *map,
> struct xsk_map_node *node;
> int err;
>
> - node = kzalloc(sizeof(*node), GFP_ATOMIC | __GFP_NOWARN);
> + node = kzalloc(sizeof(*node),
> + GFP_ATOMIC | __GFP_NOWARN | __GFP_ACCOUNT);
> if (!node)
> return ERR_PTR(-ENOMEM);
>
> --
> 2.26.2
>
Powered by blists - more mailing lists