[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56280175.8060404@plumgrid.com>
Date: Wed, 21 Oct 2015 14:19:49 -0700
From: Alexei Starovoitov <ast@...mgrid.com>
To: Peter Zijlstra <peterz@...radead.org>, pi3orama <pi3orama@....com>
Cc: "Wangnan (F)" <wangnan0@...wei.com>,
xiakaixu <xiakaixu@...wei.com>, davem@...emloft.net,
acme@...nel.org, mingo@...hat.com, masami.hiramatsu.pt@...achi.com,
jolsa@...nel.org, daniel@...earbox.net,
linux-kernel@...r.kernel.org, hekuang@...wei.com,
netdev@...r.kernel.org
Subject: Re: [PATCH V5 1/1] bpf: control events stored in PERF_EVENT_ARRAY
maps trace data output when perf sampling
On 10/21/15 9:57 AM, Peter Zijlstra wrote:
>> In summary, your either-or logic doesn't hold in BPF world. A BPF
>> >program can only access perf event in a highly restricted way. We
>> >don't allow it calling perf_event_read_local() across core, so it
>> >can't.
That's actually broken. My fault as well, since I didn't review that
patch carefully enough. Will send a fix in a second.
No matter what bpf program does that should never be a kernel splat.
> Urgh, that's still horridly inconsistent. Can we please come up with a
> consistent interface to perf?
I had the same concerns during v1-v4 series of this set.
My suggestion was to do ioctl(enable/disable) of events from userspace
after receiving notification from kernel via my bpf_perf_event_output()
helper.
Wangnan's argument was that display refresh happens often and it's fast,
so the time taken by user space to enable events on all cpus is too
slow and ioctl does ipi and disturbs other cpus even more.
So soft_disable done by the program to enable/disable particular events
on all cpus kinda makes sense.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists