Thread (9 messages) 9 messages, 3 authors, 2020-09-29

Re: [PATCH bpf-next 1/2] bpf: introduce BPF_F_SHARE_PE for perf event array

From: Song Liu <hidden>
Date: 2020-09-29 21:08:59
Also in: bpf

On Sep 29, 2020, at 12:28 PM, Alexei Starovoitov [off-list ref] wrote:

On Tue, Sep 29, 2020 at 12:18 PM Daniel Borkmann [off-list ref] wrote:
quoted
On 9/29/20 9:00 PM, Alexei Starovoitov wrote:
quoted
On Tue, Sep 29, 2020 at 04:02:10PM +0200, Daniel Borkmann wrote:
quoted
quoted
+
+/* Share perf_event among processes */
+   BPF_F_SHARE_PE          = (1U << 11),
nit but given UAPI: maybe name into something more self-descriptive
like BPF_F_SHAREABLE_EVENT ?
I'm not happy with either name.
It's not about sharing and not really about perf event.
I think the current behavior of perf_event_array is unusual and surprising.
Sadly we cannot fix it without breaking user space, so flag is needed.
How about BPF_F_STICKY_OBJECTS or BPF_F_PRESERVE_OBJECTS
or the same with s/OBJECTS/FILES/ ?
Sounds good to me, BPF_F_PRESERVE_OBJECTS or _ENTRIES seems reasonable.
May be BPF_F_PRESERVE_ELEMENTS?
or _ELEMS ?
I think we refer to map elements more often as elements instead of entries.
But both _entries and _elems work for me.
BPF_F_PRESERVE_ELEMS sounds best to me. I will go ahead with it. 

Thanks,
Song
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help