Thread (4 messages) 4 messages, 3 authors, 2019-02-01

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

From: Jakub Kicinski <hidden>
Date: 2019-01-31 20:04:20

On Thu, 31 Jan 2019 10:38:01 +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
the memory accounting for a map, and it can be set during
the map creation ("BPF_MAP_CREATE") in "map_flags".
What should happen for no-prealloc maps?  Would it make some sense to
charge the max map size to the user and not each allocation?  Or
perhaps remember the owner to be able to charge the data path
allocations which don't happen in process context as well?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help