On 3/8/19 12:20 PM, Michal Hocko wrote:
On Fri 08-03-19 12:14:16, Martynas Pumputis wrote:
On 3/8/19 9:44 AM, Michal Hocko wrote:
On Fri 08-03-19 09:08:57, Martynas Pumputis wrote:
It has been observed that sometimes memory allocation for BPF maps
fails when there is no obvious memory pressure in a system.
E.g. the map (BPF_MAP_TYPE_LRU_HASH, key=38, value=56, max_elems=524288)
could not be created due to due to vmalloc unable to allocate 75497472B,
when the system's memory consumption (in MB) was the following:
Total: 3942 Used: 837 (21.24%) Free: 138 Buffers: 239 Cached: 2727
Hmm 75MB is quite large and much larger than the slab/page allocator
cann provide so this is not really a fragmentation issue. Vmalloc does
respect noretry but considering that there shouldn't be a large memory
pressure I wonder how NORETRY managed to fail the allocation. Do you
happen to have the allocation failure report?
I got /proc/{meminfo,vmstat,vmallocinfo} just after the allocation has
failed:
https://gist.github.com/brb/62092c1d83daa6527271b88f0352e32d
dmesg with the allocation failure report would be more helpful
https://gist.github.com/brb/2d7ac323d2e14cb7a38bacba301fe3af
Thanks!