public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: tong@infragraf.org, bpf@vger.kernel.org, quentin@isovalent.com,
	daniel@iogearbox.net
Cc: Tonghao Zhang <tong@infragraf.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Song Liu <song@kernel.org>, Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
	Jiri Olsa <jolsa@kernel.org>
Subject: RE: [bpf-next v3] bpftool: profile online CPUs instead of possible
Date: Thu, 02 Feb 2023 17:46:25 -0800	[thread overview]
Message-ID: <63dc6771a8400_688f120896@john.notmuch> (raw)
In-Reply-To: <20230202131701.29519-1-tong@infragraf.org>

tong@ wrote:
> From: Tonghao Zhang <tong@infragraf.org>
> 
> The number of online cpu may be not equal to possible cpu.
> "bpftool prog profile" can not create pmu event on possible
> but on online cpu.
> 
> $ dmidecode -s system-product-name
> PowerEdge R620
> $ cat /sys/devices/system/cpu/possible
> 0-47
> $ cat /sys/devices/system/cpu/online
> 0-31
> 
> Disable cpu dynamically:
> $ echo 0 > /sys/devices/system/cpu/cpuX/online
> 
> If one cpu is offline, perf_event_open will return ENODEV.
> To fix this issue:
> * check value returned and skip offline cpu.
> * close pmu_fd immediately on error path, avoid fd leaking.
> 
> Fixes: 47c09d6a9f67 ("bpftool: Introduce "prog profile" command")
> Signed-off-by: Tonghao Zhang <tong@infragraf.org>

Acked-by: John Fastabend <john.fastabend@gmail.com>

  reply	other threads:[~2023-02-03  1:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 13:17 [bpf-next v3] bpftool: profile online CPUs instead of possible tong
2023-02-03  1:46 ` John Fastabend [this message]
2023-02-03  7:10 ` patchwork-bot+netdevbpf

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=63dc6771a8400_688f120896@john.notmuch \
    --to=john.fastabend@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=haoluo@google.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=quentin@isovalent.com \
    --cc=sdf@google.com \
    --cc=song@kernel.org \
    --cc=tong@infragraf.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