Re: [PATCH 5/6] bpf: hash: avoid to call kmalloc() in eBPF prog

From: Daniel Borkmann
Date: Tue Dec 15 2015 - 18:42:55 EST


On 12/16/2015 12:10 AM, Alexei Starovoitov wrote:
...
this rounding to cache line is great for performance, but it's extra
memory upfront which may not be needed. The per-allocation is a classic
performance vs memory trade-off. In other cases it may hurt.
So could you change the patch to do pre-allocation only when
requested by user space via extra flag for hash map or via
new BPF_MAP_TYPE_HASH_PREALLOC type? Not sure yet whether flag or
new type is better. I guess implementation will dictate.

Was also thinking about this, probably new map type makes sense.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/