Re: [Resend] BPF ringbuf misses notifications due to improper coherence

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

 



On Tue, Jun 14, 2022 at 8:31 AM Tatsuyuki Ishi <ishitatsuyuki@xxxxxxxxx> wrote:
>
> Hi Andrii,
> Thanks for looking into this.
>
> > I'd like to get to this in next few days, but meanwhile have you tried
> > to benchmark what are the implications of stricter memory ordering
> > changes on libbpf side? Do you have example changes you were thinking
> > about for libbpf side? I can try benchmarking it on my side as well.
>
> I don't have a benchmark yet. I'll try to prepare a benchmark when I
> have time to do so.
>
> The proposed change to libbpf is simply to replace the two
> smp_store_release with smp_store_mb. I just realized that the Linux
> kernel memory model doesn't have direct mappings to seq_cst loads and
> stores though, so this will lead to a redundant barrier on AArch64
> etc.

Hey Tatsuyuki,

Just to follow up on this. We do have a bunch of benchmarks in
selftests/bpf/bench, so I did run after replacing smp_store_release()
in libbpf code with atomic_store(SEQ_CST). Generally it didn't show
significant performance differences, except for "Single-producer,
back-to-back mode (rb-libbpf case)". You can run these benchmarks
yourself from selftest/bpf with just benchs/run_bench_ringbufs.sh.

But before we make any changes, can you please share a reproducer for
this issue? And which architecture (x86-64? arm64?) did you manage to
reproduce this issue on?

>
> Regards,
> Tatsuyuki



[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