On Fri, Nov 8, 2019 at 2:08 PM Stanislav Fomichev <sdf@xxxxxxxxxxx> wrote: > > On 11/07, Andrii Nakryiko wrote: > > This patch set adds ability to memory-map BPF array maps (single- and > > multi-element). The primary use case is memory-mapping BPF array maps, created > > to back global data variables, created by libbpf implicitly. This allows for > > much better usability, along with avoiding syscalls to read or update data > > completely. > Just wondering: is it something that you plan to extend to other map types? My main motivation is global data, so normal arrays are the most important for me. If anyone has any performance-driven use cases, we can extend others as well, if possible. Not all maps can be easily mmap()'ed just due to nature of their data. E.g., it's hard to imagine how hashmap can be mapped. But doing per-cpu arrays should be doable with good kernel-userspace memory layout "contract".