Netdev Archive mirror
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Eric Dumazet <edumazet@google.com>,
	 "David S . Miller" <davem@davemloft.net>,
	 Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org,  eric.dumazet@gmail.com,
	 Eric Dumazet <edumazet@google.com>,
	 Neil Horman <nhorman@tuxdriver.com>,
	 Daniel Borkmann <daniel@iogearbox.net>,
	 Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Subject: Re: [PATCH net] af_packet: do not call packet_read_pending() from tpacket_destruct_skb()
Date: Wed, 15 May 2024 14:02:59 -0400	[thread overview]
Message-ID: <6644f8d33638a_2af87294af@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <20240515163358.4105915-1-edumazet@google.com>

Eric Dumazet wrote:
> trafgen performance considerably sank on hosts with many cores
> after the blamed commit.
> 
> packet_read_pending() is very expensive, and calling it
> in af_packet fast path defeats Daniel intent in commit
> b013840810c2 ("packet: use percpu mmap tx frame pending refcount")
> 
> tpacket_destruct_skb() makes room for one packet, we can immediately
> wakeup a producer, no need to completely drain the tx ring.
> 
> Fixes: 89ed5b519004 ("af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Neil Horman <nhorman@tuxdriver.com>
> Cc: Daniel Borkmann <daniel@iogearbox.net>
> Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>

Reviewed-by: Willem de Bruijn <willemb@google.com>

Thanks!

  reply	other threads:[~2024-05-15 18:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-15 16:33 [PATCH net] af_packet: do not call packet_read_pending() from tpacket_destruct_skb() Eric Dumazet
2024-05-15 18:02 ` Willem de Bruijn [this message]
2024-05-17  2:40 ` patchwork-bot+netdevbpf
2024-05-21  9:34 ` Daniel Borkmann

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=6644f8d33638a_2af87294af@willemb.c.googlers.com.notmuch \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=pabeni@redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).