Re: [PATCH bpf-next] selftests/bpf: scale benchmark counting by using per-CPU counters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 12, 2024 at 3:23 PM Andrii Nakryiko <andrii@xxxxxxxxxx> wrote:
>
>
>  static void trigger_base_measure(struct bench_res *res)
>  {
> -       res->hits = atomic_swap(&base_hits.value, 0);
> +       res->hits = sum_counters(base_hits);
>  }
>
>  static void *trigger_producer(void *input)
> @@ -42,7 +72,7 @@ static void *trigger_producer(void *input)
>
>  static void trigger_measure(struct bench_res *res)
>  {
> -       res->hits = atomic_swap(&ctx.skel->bss->hits, 0);
> +       res->hits = sum_counters(ctx.skel->bss->hits);
>  }

It was zeroing counters before.
Do you need to zero them now?





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux