Re: [PATCH v2] Documentation: KUnit: Update filename best practices

2024-07-22 Thread Marco Elver
On Tue, 23 Jul 2024 at 01:49, John Hubbard wrote: > > On 7/22/24 2:55 AM, Marco Elver wrote: > > On Sat, Jul 20, 2024 at 09:54AM -0700, Kees Cook wrote: > ... > > I'm more confused now. This is just moving tests further away from what > > they are testing

Re: [PATCH v2] Documentation: KUnit: Update filename best practices

2024-07-22 Thread Marco Elver
On Sat, Jul 20, 2024 at 09:54AM -0700, Kees Cook wrote: > Based on feedback from Linus[1] and follow-up discussions, change the > suggested file naming for KUnit tests. > > Link: > https://lore.kernel.org/lkml/CAHk-=wgim6pNiGTBMhP8Kd3tsB7_JTAuvNJ=XYd3wPvvk=o...@mail.gmail.com/ > [1] > Signed-off

Re: [PATCH v4 00/10] Add support for synchronous signals on perf events

2024-06-11 Thread Marco Elver
On Thu, Apr 08, 2021 at 12:35PM +0200, Marco Elver wrote: [...] > Motivation and Example Uses > --- > > 1.Our immediate motivation is low-overhead sampling-based race > detection for user space [1]. By using perf_event_open() at > process

Re: [PATCH bpf-next v2] bpf: Allow compiler to inline most of bpf_local_storage_lookup()

2024-02-08 Thread Marco Elver
On Thu, Feb 08, 2024 at 08:37AM +0100, Marco Elver wrote: > On Thu, 8 Feb 2024 at 00:58, Yonghong Song wrote: > > On 2/7/24 4:26 AM, Marco Elver wrote: > > > In various performance profiles of kernels with BPF programs attached, > > > bpf_local_storage_lookup() appears

Re: [PATCH bpf-next v2] bpf: Allow compiler to inline most of bpf_local_storage_lookup()

2024-02-07 Thread Marco Elver
On Thu, 8 Feb 2024 at 00:58, Yonghong Song wrote: > On 2/7/24 4:26 AM, Marco Elver wrote: > > In various performance profiles of kernels with BPF programs attached, > > bpf_local_storage_lookup() appears as a significant portion of CPU > > cycles spent. To enable the c

[PATCH bpf-next v2] bpf: Allow compiler to inline most of bpf_local_storage_lookup()

2024-02-07 Thread Marco Elver
+- hits latency | 2481.190 ns/op | 2487.555 ns/op ( ~ ) | +- important_hits throughput | 0.102 M ops/s| 0.101 M ops/s ( ~ ) Signed-off-by: Marco Elver Cc: Martin KaFai Lau --- v2: * Inline most of bpf_local_storage_lookup(), which produc

Re: [PATCH] bpf: Separate bpf_local_storage_lookup() fast and slow paths

2024-02-07 Thread Marco Elver
On Tue, Feb 06, 2024 at 05:22PM -0800, Martin KaFai Lau wrote: > On 2/6/24 9:04 AM, Marco Elver wrote: > > On Mon, Feb 05, 2024 at 03:24PM -0800, Martin KaFai Lau wrote: > > [...] > > > > Or can you suggest different functions to hook to for the recursion > > >

Re: [PATCH] bpf: Separate bpf_local_storage_lookup() fast and slow paths

2024-02-06 Thread Marco Elver
fff810f2ed0 mov%rbx,%rax pop%rbx pop%r14 cs jmp 82324ea0 <__x86_return_thunk> Could you suggest how we can fix up the tests? I'm a little stuck because there's not much we can hook to left. Thanks, -- Marco -- >8 -- From: Marco Elver

Re: [PATCH] bpf: Separate bpf_local_storage_lookup() fast and slow paths

2024-02-05 Thread Marco Elver
On Wed, 31 Jan 2024 at 20:52, Martin KaFai Lau wrote: [...] > > | num_maps: 1000 > > | local_storage cache sequential get: > > | | > > | hits throughput: 0.357 ± 0.005 M ops/s | 0.325 ± 0.005 M > > ops/s(-9.0%) > > | hits lat

Re: [PATCH] bpf: Separate bpf_local_storage_lookup() fast and slow paths

2024-01-31 Thread Marco Elver
On Wed, 31 Jan 2024 at 20:52, Martin KaFai Lau wrote: > > On 1/31/24 6:18 AM, Marco Elver wrote: > > To allow the compiler to inline the bpf_local_storage_lookup() fast- > > path, factor it out by making bpf_local_storage_lookup() a static inline > > function a

[PATCH] bpf: Separate bpf_local_storage_lookup() fast and slow paths

2024-01-31 Thread Marco Elver
rtant_hits throughput: 0.109 ± 0.002 M ops/s | 0.112 ± 0.002 M ops/s (+2.8%) Signed-off-by: Marco Elver --- include/linux/bpf_local_storage.h | 17 - kernel/bpf/bpf_local_storage.c | 14 -- .../selftests/bpf/progs/cgrp_ls_recursion.

Re: [PATCH v2 3/3] selftest/bpf: Test a perf bpf program that suppresses side effects.

2023-12-08 Thread Marco Elver
On Fri, 8 Dec 2023 at 02:08, Kyle Huey wrote: > > On Thu, Dec 7, 2023 at 2:56 PM Kyle Huey wrote: > > > > On Thu, Dec 7, 2023 at 11:20 AM Marco Elver wrote: > > > > > > On Thu, 7 Dec 2023 at 20:12, Andrii Nakryiko > > > wrote: > > > >

Re: [PATCH v2 3/3] selftest/bpf: Test a perf bpf program that suppresses side effects.

2023-12-07 Thread Marco Elver
On Thu, 7 Dec 2023 at 20:12, Andrii Nakryiko wrote: > > On Thu, Dec 7, 2023 at 8:35 AM Kyle Huey wrote: > > > > The test sets a hardware breakpoint and uses a bpf program to suppress the > > side effects of a perf event sample, including I/O availability signals, > > SIGTRAPs, and decrementing th