Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1292649
| From | Daniel Borkmann <daniel@iogearbox.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 5/6] bpf: hash: avoid to call kmalloc() in eBPF prog |
| Date | 2015-12-16 00:50 +0100 |
| Message-ID | <qG7vX-2wd-9@gated-at.bofh.it> (permalink) |
| References | <qFVXQ-3nl-15@gated-at.bofh.it> <qFVXQ-3nl-33@gated-at.bofh.it> <qG72W-2k7-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/6] bpf: hash: optimization Ming Lei <tom.leiming@gmail.com> - 2015-12-15 12:30 +0100
[PATCH 6/6] bpf: hash: reorganize 'struct htab_elem' Ming Lei <tom.leiming@gmail.com> - 2015-12-15 12:30 +0100
[PATCH 5/6] bpf: hash: avoid to call kmalloc() in eBPF prog Ming Lei <tom.leiming@gmail.com> - 2015-12-15 12:30 +0100
Re: [PATCH 5/6] bpf: hash: avoid to call kmalloc() in eBPF prog Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2015-12-16 00:20 +0100
Re: [PATCH 5/6] bpf: hash: avoid to call kmalloc() in eBPF prog Daniel Borkmann <daniel@iogearbox.net> - 2015-12-16 00:50 +0100
Re: [PATCH 5/6] bpf: hash: avoid to call kmalloc() in eBPF prog Ming Lei <tom.leiming@gmail.com> - 2015-12-16 08:20 +0100
Re: [PATCH 5/6] bpf: hash: avoid to call kmalloc() in eBPF prog Daniel Borkmann <daniel@iogearbox.net> - 2015-12-16 00:30 +0100
Re: [PATCH 5/6] bpf: hash: avoid to call kmalloc() in eBPF prog Daniel Borkmann <daniel@iogearbox.net> - 2015-12-16 00:40 +0100
Re: [PATCH 5/6] bpf: hash: avoid to call kmalloc() in eBPF prog Daniel Borkmann <daniel@iogearbox.net> - 2015-12-16 01:20 +0100
[PATCH 2/6] hlist: prepare for supporting bit spinlock Ming Lei <tom.leiming@gmail.com> - 2015-12-15 12:30 +0100
[PATCH 1/6] bpf: hash: use atomic count Ming Lei <tom.leiming@gmail.com> - 2015-12-15 12:30 +0100
[PATCH 3/6] bpf: hash: move select_bucket() out of htab's spinlock Ming Lei <tom.leiming@gmail.com> - 2015-12-15 12:30 +0100
csiph-web