From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796173241; b=iB6VpyVY6MicbDMNXhlhtSXlbfQEYlemwx85vXiAANdLABe0kskHW2yvea8JNLwyLKiR rHKoeP3C5HyaczpBD8bkxe8kqc/qFIG/d8HSl69RNqUjevGKjIjtz4WshIm3qrrMto/HJ oSLolYFzO+0jmlqcYByXzXcZZeRT3qf82AED/sjRz+1zhh3IcghxqcEtV+05IDcnYiNFW 9W5HZu4xQ6XbLfIyXdcGxgwYGMLmw4pW6Mey5RR0Csp16yH60kf393rUx0oeW1/OLAiqW i7BzocawRm9vnprZqJafsEpe5i41UYNZxKnWcAhy47MIx0cdLMYFw9bhkSGdPNB6YAQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796173241; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received: X-Received:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=keGV3JDHymjCHl8w84EHTisD+KMGzTNiJXfVOah7mIU=; b=pyXErtecwA986aC9zxQOzjWHVNzOO6yc4UHS1dCSvRySX/VFBMDOmRabRsylapSNLSAZ tt+yyuCuSv/6IAFRo3WOp98WzuplPXy5zMdCYyCH8vdma7ueQ0ILnT5FV/T0O3KfzvpZ9 aLRF0LRGcRl+OpBXdwqzQvJB5Exu2KMkyP+l5JUfe7woScmt314s4FHNNuSBmnK7uCEcR bN0jkKycyLZv+h+uFO+qDKrcka6QOqATE2RD0oPTjtXYiV9KAA6LhgqS8SrRoyt+Glqmg hTxTYbmLEwVXXs/lW63BeHf4Y0FdHMMUhLsIniSoSxQsc1qpSAYcHhnh09/JSL7WbQA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=YESszQRx; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=google header.b=LbaLYA40; arc=none smtp.remote-ip=170.10.133.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67E8A606A327 for ; Wed, 2 Dec 2026 01:00:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 67E8A606A327 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=YESszQRx; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=google header.b=LbaLYA40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796173240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=keGV3JDHymjCHl8w84EHTisD+KMGzTNiJXfVOah7mIU=; b=YESszQRxsp7MF8MvLOzOzbBZmijizQqjl70nwhctEu/h4ljL0RcCicLYM8DKhYSXwEQn8H kryJCBda4Z74Pwu9SscC4nFtVcgdBETwpXHlS2juKQcysomIc3DD5tOK3zX3uBXkiO50Io oFHLxrKKuExYJnCwAWedx/w3U3t5S8k= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-428-t_27EdkSNUa9S6tkCFLkqw-1; Wed, 2 Dec 2026 01:00:38 +0000 X-MC-Unique: t_27EdkSNUa9S6tkCFLkqw-1 X-Mimecast-MFC-AGG-ID: t_27EdkSNUa9S6tkCFLkqw_1796173237 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-4beee84c431so3329765f8f.0 for ; Tue, 01 Dec 2026 17:00:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1796173237; x=1796778037; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=keGV3JDHymjCHl8w84EHTisD+KMGzTNiJXfVOah7mIU=; b=LbaLYA401wbgpXwJ7lxkOyJenp/5ZwixuxmS7XLN0HHb9IGeWkBamMqq60nphy04x3 HJBjgyR5fbUnZGrP4xtJEUBtCaSKkHBLWPBuaWyn9AE4GZR5ViuSIBPIKs/m7RkBgnPV qr2urOBmmMRdra/Gi0xVUydJybdpsIg5ChWKGkKh9qGi+vhRlrd6Asa3/XBJem/1q2Un 7dQL2QYjeJBTG2uQUV0ymhb9lznCHjq3klugDtCVyD3oVTH6Lwj58Fk1gbC6OqnQfe48 QBlcJNrVJYQ/IIyQWn4qOlkmvU6mBYcpuXCJOnDicN5LQLmov6nFCYOuIXgdSGzZbjtq oceQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796173237; x=1796778037; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content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1i77T3J 8PABI2vb0sfSWCaXcRvkLh1xYgbJL47mBwBQFMuDR7g== X-Received: by 2002:a05:6000:2383:b0:492:aff5:da4d with SMTP id ffacd0b85a97d-4aa545e244fmr102676210f8f.7.1796173237148; Tue, 01 Dec 2026 17:00:37 -0800 (PST) X-Received: by 2002:a05:6000:2383:b0:492:aff5:da4d with SMTP id ffacd0b85a97d-4aa545e244fmr102676153f8f.7.1796173236630; Tue, 01 Dec 2026 17:00:36 -0800 (PST) Received: from redhat.com ([2a0d:6fc0:1529:2e00:86ec:bef7:c309:ba1f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab6a680483sm74264031f8f.28.2026.12.01.17.00.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 17:00:35 -0800 (PST) Date: Tue, 1 Dec 2026 20:00:32 -0500 From: "Michael S. Tsirkin" To: Alexei Starovoitov Cc: linux-kernel@vger.kernel.org, Andrii Nakryiko , Daniel Borkmann , Martin KaFai Lau , Eduard Zingerman , Kumar Kartikeya Dwivedi , Song Liu , Yonghong Song , Jiri Olsa , John Fastabend , bpf@vger.kernel.org Subject: Re: [PATCH] bpf: ringbuf: add wakeup coalescing Message-ID: <20261201195613-mutt-send-email-mst@kernel.org> References: <5663e1035f52f0b358710721c1c77e5c73552a2e.1796135892.git.mst@redhat.com> <20261201192254-mutt-send-email-mst@kernel.org> X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Dec 02, 2026 at 12:54:17AM +0000, Alexei Starovoitov wrote: > On Tue, Dec 01, 2026 at 04:29 PM Michael S. Tsirkin wrote: > >> Sounds like your tracing tool is simply inefficient. > > > > Oh yes. Yet I don't have control over it. > > Then pls report it to the people who do. It's two lines in their prog. > The kernel shouldn't work around an inefficient tool. Shrug. Most software in the world is inefficient. If I can improve my laptop's battery life, I'm be happier. > >> 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); > > > > > > This assumes that every bpf program is tuned for every hardware box it > > runs on. It's not gonnu happen. > > The sysctl assumes the same. Its default is 1, which is what we have today. If you feel changing that to 8 is okay, lemme know. > Somebody has to find that 8 for every box and every workload. > Then that one number applies to every ringbuf on the box. I mean, I can do it on my box. That's the point. Currently bpf can only have the universal threshold, I want to add a per-box one, if some box is different than others. -- MST