Re: [PATCH bpf-next] bpf: add optional memory accounting for maps

2019-02-01 Thread Alexei Starovoitov
On Fri, Feb 01, 2019 at 01:03:45PM +0200, Martynas wrote: > > > There are nokmem and nosocket memcg boot options. > > We can add one more to turn off accounting of bpf map memory. > > > > Considering the suggested boot option, I'm OK with enabling it by default. Do > you want me to add the opti

Re: [PATCH bpf-next] bpf: add optional memory accounting for maps

2019-02-01 Thread Martynas
On Thu, Jan 31, 2019, at 8:35 PM, Alexei Starovoitov wrote: > On Wed, Jan 30, 2019 at 03:02:51PM +0100, Martynas Pumputis wrote: > > Previously, memory allocated for a map was not accounted. Therefore, > > this memory could not be taken into consideration by the cgroups > > memory controller. >

Re: [PATCH bpf-next] bpf: add optional memory accounting for maps

2019-01-31 Thread Alexei Starovoitov
On Wed, Jan 30, 2019 at 03:02:51PM +0100, Martynas Pumputis wrote: > Previously, memory allocated for a map was not accounted. Therefore, > this memory could not be taken into consideration by the cgroups > memory controller. > > This patch introduces the "BPF_F_ACCOUNT_MEM" flag which enables > t

Re: [PATCH bpf-next] bpf: add optional memory accounting for maps

2019-01-31 Thread Martynas
Thanks for testing. Sure, I will re-submit with the required changes. On Thu, Jan 31, 2019, at 9:15 AM, Y Song wrote: > On Wed, Jan 30, 2019 at 6:05 AM Martynas Pumputis wrote: > > > > Previously, memory allocated for a map was not accounted. Therefore, > > this memory could not be taken into con

Re: [PATCH bpf-next] bpf: add optional memory accounting for maps

2019-01-30 Thread Y Song
On Wed, Jan 30, 2019 at 6:05 AM Martynas Pumputis wrote: > > Previously, memory allocated for a map was not accounted. Therefore, > this memory could not be taken into consideration by the cgroups > memory controller. > > This patch introduces the "BPF_F_ACCOUNT_MEM" flag which enables > the memor

[PATCH bpf-next] bpf: add optional memory accounting for maps

2019-01-30 Thread Martynas Pumputis
Previously, memory allocated for a map was not accounted. Therefore, this memory could not be taken into consideration by the cgroups memory controller. This patch introduces the "BPF_F_ACCOUNT_MEM" flag which enables the memory accounting for a map, and it can be set during the map creation ("BPF