[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <81fc481c-5421-42ad-a13a-b9e9c6ededb6@linux.dev>
Date: Fri, 25 Apr 2025 09:40:53 -0700
From: Martin KaFai Lau <martin.lau@...ux.dev>
To: Jordan Rife <jordan@...fe.io>,
Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: Network Development <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
Aditi Ghag <aditi.ghag@...valent.com>, Daniel Borkmann
<daniel@...earbox.net>, Willem de Bruijn <willemdebruijn.kernel@...il.com>,
Kuniyuki Iwashima <kuniyu@...zon.com>
Subject: Re: [PATCH v5 bpf-next 2/6] bpf: udp: Make sure iter->batch always
contains a full bucket snapshot
On 4/24/25 8:39 AM, Jordan Rife wrote:
>> It looks like overdesign.
>> I think it would be much simpler to do GFP_USER once,
>
> Martin expressed a preference for retrying GFP_USER, so I'll let him
> chime in here, but I'm fine the simpler approach. There were some
> concerns about maximizing the chances that allocation succeeds, but
> this situation should be be rare anyway, so yeah retries are probably
> overkill.
No strong opinion on how many retries on GFP_USER, so no objection on trying
GFP_USER only once and then retry one last time with GFP_NOWAIT|__GFP_NOWARN.
>
>> grab the lock and follow with GFP_NOWAIT|__GFP_NOWARN.
>> GFP_ATOMIC will deplete memory reserves.
>> bpf iterator is certainly not a critical operation, so use GFP_NOWAIT.
>
> Yeah, GFP_NOWAIT makes sense. Will do.
>
> Jordan
Powered by blists - more mailing lists