Re: [PATCH bpf-next v2 22/35] bpf: eliminate rlimit-based memory accounting for bpf ringbuffer

2020-07-27 Thread Andrii Nakryiko
On Mon, Jul 27, 2020 at 12:21 PM Roman Gushchin wrote: > > Do not use rlimit-based memory accounting for bpf ringbuffer. > It has been replaced with the memcg-based memory accounting. > > bpf_ringbuf_alloc() can't return anything except ERR_PTR(-ENOMEM) > and a valid pointer, so to simplify the

Re: [PATCH bpf-next v2 22/35] bpf: eliminate rlimit-based memory accounting for bpf ringbuffer

2020-07-27 Thread Song Liu
On Mon, Jul 27, 2020 at 12:22 PM Roman Gushchin wrote: > > Do not use rlimit-based memory accounting for bpf ringbuffer. > It has been replaced with the memcg-based memory accounting. > > bpf_ringbuf_alloc() can't return anything except ERR_PTR(-ENOMEM) > and a valid pointer, so to simplify the

[PATCH bpf-next v2 22/35] bpf: eliminate rlimit-based memory accounting for bpf ringbuffer

2020-07-27 Thread Roman Gushchin
Do not use rlimit-based memory accounting for bpf ringbuffer. It has been replaced with the memcg-based memory accounting. bpf_ringbuf_alloc() can't return anything except ERR_PTR(-ENOMEM) and a valid pointer, so to simplify the code make it return NULL in the first case. This allows to drop a