bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/4] Fix perf_buffer creation on systems with offline CPUs
@ 2019-12-12  1:35 Andrii Nakryiko
  2019-12-13 21:04 ` Alexei Starovoitov
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Andrii Nakryiko @ 2019-12-12  1:35 UTC (permalink / raw)
  To: bpf, netdev, ast, daniel; +Cc: andrii.nakryiko, kernel-team, Andrii Nakryiko

This patch set fixes perf_buffer__new() behavior on systems which have some of
the CPUs offline/missing (due to difference between "possible" and "online"
sets). perf_buffer will create per-CPU buffer and open/attach to corresponding
perf_event only on CPUs present and online at the moment of perf_buffer
creation. Without this logic, perf_buffer creation has no chances of
succeeding on such systems, preventing valid and correct BPF applications from
starting.

Andrii Nakryiko (4):
  libbpf: extract and generalize CPU mask parsing logic
  selftests/bpf: add CPU mask parsing tests
  libbpf: don't attach perf_buffer to offline/missing CPUs
  selftests/bpf: fix perf_buffer test on systems w/ offline CPUs

 tools/lib/bpf/libbpf.c                        | 157 ++++++++++++------
 tools/lib/bpf/libbpf_internal.h               |   2 +
 .../selftests/bpf/prog_tests/cpu_mask.c       |  78 +++++++++
 .../selftests/bpf/prog_tests/perf_buffer.c    |  29 +++-
 4 files changed, 213 insertions(+), 53 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/cpu_mask.c

-- 
2.17.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-02-09 21:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-12  1:35 [PATCH bpf-next 0/4] Fix perf_buffer creation on systems with offline CPUs Andrii Nakryiko
2019-12-13 21:04 ` Alexei Starovoitov
2019-12-16 14:44 ` Daniel Borkmann
2019-12-16 17:59   ` Andrii Nakryiko
2019-12-17 13:00     ` Daniel Borkmann
2019-12-20 17:46       ` Andrii Nakryiko
2020-02-09 17:18 ` Naresh Kamboju
2020-02-09 18:32   ` Andrii Nakryiko
2020-02-09 21:03     ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).