From: Martin KaFai Lau <martin.lau@linux.dev>
To: Jordan Rife <jordan@jrife.io>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Network Development <netdev@vger.kernel.org>,
bpf <bpf@vger.kernel.org>, Aditi Ghag <aditi.ghag@isovalent.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
Kuniyuki Iwashima <kuniyu@amazon.com>
Subject: Re: [PATCH v5 bpf-next 2/6] bpf: udp: Make sure iter->batch always contains a full bucket snapshot
Date: Fri, 25 Apr 2025 09:40:53 -0700 [thread overview]
Message-ID: <81fc481c-5421-42ad-a13a-b9e9c6ededb6@linux.dev> (raw)
In-Reply-To: <kjcasjtjil6br6qton7uz52ql25udddmzbraaw6qmjadbqj5xm@3o5c2rgdt5bt>
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
next prev parent reply other threads:[~2025-04-25 16:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 23:51 [PATCH v5 bpf-next 0/6] bpf: udp: Exactly-once socket iteration Jordan Rife
2025-04-23 23:51 ` [PATCH v5 bpf-next 1/6] bpf: udp: Make mem flags configurable through bpf_iter_udp_realloc_batch Jordan Rife
2025-04-23 23:51 ` [PATCH v5 bpf-next 2/6] bpf: udp: Make sure iter->batch always contains a full bucket snapshot Jordan Rife
2025-04-24 2:33 ` Alexei Starovoitov
2025-04-24 15:39 ` Jordan Rife
2025-04-25 16:40 ` Martin KaFai Lau [this message]
2025-04-23 23:51 ` [PATCH v5 bpf-next 3/6] bpf: udp: Use bpf_udp_iter_batch_item for bpf_udp_iter_state batch items Jordan Rife
2025-04-23 23:51 ` [PATCH v5 bpf-next 4/6] bpf: udp: Avoid socket skips and repeats during iteration Jordan Rife
2025-04-23 23:51 ` [PATCH v5 bpf-next 5/6] selftests/bpf: Return socket cookies from sock_iter_batch progs Jordan Rife
2025-04-23 23:51 ` [PATCH v5 bpf-next 6/6] selftests/bpf: Add tests for bucket resume logic in UDP socket iterators Jordan Rife
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=81fc481c-5421-42ad-a13a-b9e9c6ededb6@linux.dev \
--to=martin.lau@linux.dev \
--cc=aditi.ghag@isovalent.com \
--cc=alexei.starovoitov@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jordan@jrife.io \
--cc=kuniyu@amazon.com \
--cc=netdev@vger.kernel.org \
--cc=willemdebruijn.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).