From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, <linux-kernel@vger.kernel.org>
Cc: "Andrii Nakryiko" <andrii@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Martin KaFai Lau" <martin.lau@linux.dev>,
"Eduard Zingerman" <eddyz87@gmail.com>,
"Kumar Kartikeya Dwivedi" <memxor@gmail.com>,
"Song Liu" <song@kernel.org>,
"Yonghong Song" <yonghong.song@linux.dev>,
"Jiri Olsa" <jolsa@kernel.org>,
"John Fastabend" <john.fastabend@gmail.com>,
<bpf@vger.kernel.org>
Subject: Re: [PATCH] bpf: ringbuf: add wakeup coalescing
Date: Wed, 02 Dec 2026 00:09:54 +0000 [thread overview]
Message-ID: <DN9T701R1EG3.2P5CO3XIJLEQ5@gmail.com> (raw)
In-Reply-To: <5663e1035f52f0b358710721c1c77e5c73552a2e.1796135892.git.mst@redhat.com>
On Tue, Dec 01, 2026 at 06:39 AM Michael S. Tsirkin <mst@redhat.com> wrote:
> Add per-ringbuf pending count and wakeup threshold to coalesce wakeups:
> first record after idle wakes immediately, next ones are batched. This
> reduces context-switch churn substantially under bursty traffic while
> keeping latency low.
Sounds like your tracing tool is simply inefficient.
No need for kernel changes. The prog can do it today.
BPF_RB_NO_WAKEUP, BPF_RB_FORCE_WAKEUP and bpf_ringbuf_query() exist for
that.
avail = bpf_ringbuf_query(&rb, BPF_RB_AVAIL_DATA);
bpf_ringbuf_submit(rec, avail >= wakeup_data_size ?
BPF_RB_FORCE_WAKEUP : BPF_RB_NO_WAKEUP);
pw-bot: cr
next prev parent reply other threads:[~2026-12-02 0:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 14:39 [PATCH] bpf: ringbuf: add wakeup coalescing Michael S. Tsirkin
2026-12-02 0:09 ` Alexei Starovoitov [this message]
2026-12-02 0:29 ` Michael S. Tsirkin
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=DN9T701R1EG3.2P5CO3XIJLEQ5@gmail.com \
--to=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=mst@redhat.com \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/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