Thread (16 messages) 16 messages, 3 authors, 2021-09-10

Re: [PATCH v6 bpf-next 1/3] perf: enable branch record for software events

From: Peter Zijlstra <peterz@infradead.org>
Date: 2021-09-10 19:08:23
Also in: lkml

On Fri, Sep 10, 2021 at 07:00:08PM +0000, Song Liu wrote:
Hmm.. not really. We call migrate_disable() before entering the BPF program. 
And the helper calls snapshot_branch_stack() inside the BPF program. To move
it to before migrate_disable(), we will have to add a "whether to snapshot
branch stack" check before entering the BPF program. This check, while is
cheap, is added to all BPF programs on this hook, even when the program does 
not use snapshot at all. So we would rather keep all logic inside the helper, 
and not touch the common path. 
Moo :/ Because I also really don't want to expose struct rq, it's
currently nicely squirelled away in kernel/sched/ and doesn't get
anywhere near include/.

A well, maybe we can do something clever with migrate_disable() itself.
I'll put it on this endless todo list ;-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help