Re: [PATCH bpf-next v4 1/4] bpf: Add a sleepable page allocator for map memory
Michal Hocko <[email protected]>
| Newsgroups | dev.linux.lists.linux-rt-devel,org.kernel.vger.bpf,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <aow4YNCDa0gDwbfj@tiehlicka> |
On Fri 21-08-26 13:06:12, Jiayuan Chen wrote: > bpf_map_alloc_pages() picks the allocator via can_alloc_pages(), a > conservative guess for BPF program context that is always false under > PREEMPT_RT. So even a caller that really is sleepable gets the > non-blocking allocator, which never reclaims and never engages the OOM > machinery. I thought one of the main motivations was reentrancy. As you cannot really assume the context bpf_map_alloc_pages is called from there is an extra care needed so that this doesn't re-enter the allocator from bpf program called from allocator path and deadlock. -- Michal Hocko SUSE Labs