All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next 2/3] udp: avoid a cache miss on dequeue
Date: Wed, 31 May 2017 10:00:43 -0700	[thread overview]
Message-ID: <1496250043.27480.6.camel@edumazet-glaptop3.roam.corp.google.com> (raw)
In-Reply-To: <b07f7111480bb0ca2d98fe9fef49a593ab1c4787.1496070490.git.pabeni@redhat.com>

On Mon, 2017-05-29 at 17:27 +0200, Paolo Abeni wrote:
> Since UDP no more uses sk->destructor, we can clear completely
> the skb head state before enqueuing.

...

> @@ -1739,6 +1740,9 @@ static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
>  		sk_mark_napi_id_once(sk, skb);
>  	}
>  
> +	/* drop all pending head states; dst, nf and sk are dropped by caller */
> +	secpath_reset(skb);
> +

I wonder if using skb_release_head_state() would be more appropriate ?

Surely more descriptive and probably not more expensive since all
cache lines should be already hot at this point.

>  	rc = __udp_enqueue_schedule_skb(sk, skb);
>  	if (rc < 0) {
>  		int is_udplite = IS_UDPLITE(sk);

  reply	other threads:[~2017-05-31 17:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-29 15:27 [PATCH net-next 0/3] udp: reduce cache pressure Paolo Abeni
2017-05-29 15:27 ` [PATCH net-next 1/3] net: factor out a helper to decrement the skb refcount Paolo Abeni
2017-05-31 16:56   ` Eric Dumazet
2017-05-29 15:27 ` [PATCH net-next 2/3] udp: avoid a cache miss on dequeue Paolo Abeni
2017-05-31 17:00   ` Eric Dumazet [this message]
2017-06-01 10:39     ` Paolo Abeni
2017-06-01 15:58       ` Eric Dumazet
2017-06-01 16:21         ` Paolo Abeni
2017-06-01 16:40           ` Eric Dumazet
2017-06-01 20:35             ` Paolo Abeni
2017-06-01 20:50               ` Eric Dumazet
2017-05-29 15:27 ` [PATCH net-next 3/3] udp: try to avoid 2 " Paolo Abeni
2017-05-31 17:04   ` Eric Dumazet
2017-06-01 10:46     ` Paolo Abeni
2017-06-07  2:12   ` [lkp-robot] [udp] bc0d3d0639: apachebench.requests_per_second -21% regression kernel test robot
2017-06-07  2:12     ` kernel test robot
2017-06-07 21:40     ` Paolo Abeni
2017-06-09 15:35       ` Paolo Abeni
2017-06-30  6:55         ` Ye Xiaolong
2017-05-31 16:47 ` [PATCH net-next 0/3] udp: reduce cache pressure David Miller
2017-05-31 16:52   ` 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=1496250043.27480.6.camel@edumazet-glaptop3.roam.corp.google.com \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.