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