public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] net: add a prefetch in socket backlog processing
Date: Mon, 30 Apr 2012 20:24:23 -0700	[thread overview]
Message-ID: <1335842663.26217.10.camel@joe2Laptop> (raw)
In-Reply-To: <1335838029.11396.12.camel@edumazet-glaptop>

On Tue, 2012-05-01 at 04:07 +0200, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
> 
> TCP or UDP stacks have big enough latencies that prefetching next
> pointer is worth it.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
>  net/core/sock.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/core/sock.c b/net/core/sock.c
> index 836bca6..1a88351 100644
> --- a/net/core/sock.c
> +++ b/net/core/sock.c
> @@ -1700,6 +1700,7 @@ static void __release_sock(struct sock *sk)
>  		do {
>  			struct sk_buff *next = skb->next;
>  
> +			prefetch(next);
>  			WARN_ON_ONCE(skb_dst_is_noref(skb));
>  			skb->next = NULL;
>  			sk_backlog_rcv(sk, skb);

Hi Eric.

Why should next be "prefetch"ed when
two lines below it's set to null and
the only use is as a pointer not as
an apparently undereferenced pointer?

  reply	other threads:[~2012-05-01  3:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-01  2:07 [PATCH net-next] net: add a prefetch in socket backlog processing Eric Dumazet
2012-05-01  3:24 ` Joe Perches [this message]
2012-05-01  6:34   ` Eric Dumazet
2012-05-01  6:42     ` Eric Dumazet
2012-05-01 11:52     ` Joe Perches
2012-05-01 12:29       ` Eric Dumazet
2012-05-01 13:09         ` Joe Perches
2012-05-01 13:41 ` David Miller

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=1335842663.26217.10.camel@joe2Laptop \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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