netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>, netdev <netdev@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next] net: generalize skb freeing deferral to per-cpu lists
Date: Fri, 22 Apr 2022 09:40:14 -0700	[thread overview]
Message-ID: <20220422094014.1bcf78d5@kernel.org> (raw)
In-Reply-To: <20220421153920.3637792-1-eric.dumazet@gmail.com>

On Thu, 21 Apr 2022 08:39:20 -0700 Eric Dumazet wrote:
> 10 runs of one TCP_STREAM flow

Was the test within a NUMA node or cross-node?

For my learning - could this change cause more cache line bouncing 
than individual per-socket lists for non-RFS setups. Multiple CPUs 
may try to queue skbs for freeing on one remove node.

> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index 7dccbfd1bf5635c27514c70b4a06d3e6f74395dd..0162a9bdc9291e7aae967a044788d09bd2ef2423 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -3081,6 +3081,9 @@ struct softnet_data {
>  	struct sk_buff_head	input_pkt_queue;
>  	struct napi_struct	backlog;
>  
> +	/* Another possibly contended cache line */
> +	struct sk_buff_head	skb_defer_list ____cacheline_aligned_in_smp;

If so maybe we can avoid some dirtying and use a single-linked list? 
No point modifying the cache line of the skb already on the list.

> +	call_single_data_t  csd_defer;
>  };

  parent reply	other threads:[~2022-04-22 16:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21 15:39 [PATCH net-next] net: generalize skb freeing deferral to per-cpu lists Eric Dumazet
2022-04-22  9:02 ` Paolo Abeni
2022-04-22 15:59   ` Eric Dumazet
2022-04-22 16:40 ` Jakub Kicinski [this message]
2022-04-22 16:50   ` Eric Dumazet
2022-04-22 17:10     ` Jakub Kicinski
2022-04-22 17:25     ` Eric Dumazet
2022-04-22 16:40 ` Jakub Kicinski
2022-04-22 16:50   ` Eric Dumazet

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=20220422094014.1bcf78d5@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --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 NNTP newsgroup(s).