mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Yonghong Song <yhs@fb.com>
Cc: "jinshan.xiong@gmail.com" <jinshan.xiong@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"jinshan.xiong@uber.com" <jinshan.xiong@uber.com>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>
Subject: Re: [PATCH] staging: tracing/kprobe: filter kprobe based perf event
Date: Wed, 18 Sep 2019 07:32:37 -0700	[thread overview]
Message-ID: <20190918143235.kpclo45eo7qye7fs@ast-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <5302836c-a6a1-c160-2de2-6a5b3d2c4828@fb.com>

On Wed, Sep 18, 2019 at 05:51:10AM +0000, Yonghong Song wrote:
> 
> Adding cc to bpf@vger.kernel.org mailing list since this is really
> bpf related.
> 
> On 9/17/19 10:24 PM, jinshan.xiong@gmail.com wrote:
> > From: Jinshan Xiong <jinshan.xiong@gmail.com>
> > 
> > Invoking bpf program only if kprobe based perf_event has been added into
> > the percpu list. This is essential to make event tracing for cgroup to work
> > properly.
> 
> The issue actually exists for bpf programs with kprobe, uprobe, 
> tracepoint and trace_syscall_enter/exit.
> 
> In all these places, bpf program is called regardless of
> whether there are perf events or not on this cpu.
> This provides bpf programs more opportunities to see
> the events. I guess this is by design.
> Alexei/Daniel, could you clarify?

Yes. It is by design.
When bpf is attached to kprobe it will fire on all cpus.
Per-cpu or per-task or per-cgroup filtering is already done
inside bpf programs.
We cannot make this change now it will break all users.


  reply	other threads:[~2019-09-18 14:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-18  5:24 jinshan.xiong
2019-09-18  5:51 ` Yonghong Song
2019-09-18 14:32   ` Alexei Starovoitov [this message]
     [not found]     ` <CA+-8EHRk6aAuDQ=S9O7h6T2fhyz2z+zQduN2yiDNWMOWt2-t_A@mail.gmail.com>
2019-09-18 20:22       ` Alexei Starovoitov
2019-09-19  2:41         ` Jinshan Xiong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190918143235.kpclo45eo7qye7fs@ast-mbp.dhcp.thefacebook.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=jinshan.xiong@gmail.com \
    --cc=jinshan.xiong@uber.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®