netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@gmail.com>
To: Tom Herbert <therbert@google.com>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] rps: core implementation
Date: Thu, 19 Nov 2009 09:57:31 +0000	[thread overview]
Message-ID: <20091119095730.GA7661@ff.dom.local> (raw)
In-Reply-To: <65634d660911102253o2b4f7a19kfed5849e5c88bfe1@mail.gmail.com>

On 11-11-2009 07:53, Tom Herbert wrote:
> Third version of RPS.
> 
> Signed-off-by: Tom Herbert <therbert@google.com>
...
> @@ -2266,10 +2401,10 @@ void netif_nit_deliver(struct sk_buff *skb)
>  }
> 
>  /**
> - *	netif_receive_skb - process receive buffer from network
> + *	__netif_receive_skb - process receive buffer from network
>   *	@skb: buffer to process
>   *
> - *	netif_receive_skb() is the main receive data processing function.
> + *	__netif__napireceive_skb() is the main receive data processing function.

--------------->^^^^^^^^^^^^ ?

>   *	It always succeeds. The buffer may be dropped during processing
>   *	for congestion control or by the protocol layers.
>   *
> @@ -2280,7 +2415,8 @@ void netif_nit_deliver(struct sk_buff *skb)
>   *	NET_RX_SUCCESS: no congestion
>   *	NET_RX_DROP: packet was dropped
>   */
> -int netif_receive_skb(struct sk_buff *skb)
> +
> +int __netif_receive_skb(struct sk_buff *skb)
>  {
>  	struct packet_type *ptype, *pt_prev;
>  	struct net_device *orig_dev;
> @@ -2378,6 +2514,16 @@ out:
>  }
>  EXPORT_SYMBOL(netif_receive_skb);
> 
> +int netif_receive_skb(struct sk_buff *skb)
> +{
> +	int cpu = get_rps_cpu(skb->dev, skb);
> +
> +	if (cpu < 0)

The description reads: "This solution queues packets early on in the
receive path on the backlog queues of other CPUs.", so I'm not sure
it's intended. Did you test it like this (and it was visibly worse)?:

	if (cpu < 0 || cpu == smp_processor_id())

> +		return __netif_receive_skb(skb);
> +	else
> +		return enqueue_to_backlog(skb, cpu);
> +}
> +

Jarek P.

  parent reply	other threads:[~2009-11-19  9:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-11  6:53 [PATCH 1/2] rps: core implementation Tom Herbert
2009-11-11  8:20 ` Eric Dumazet
2009-11-11 16:28   ` Tom Herbert
2009-11-11 21:44   ` Andi Kleen
2009-11-12  2:32     ` David Miller
2009-11-16 11:15   ` David Miller
2009-11-11 16:49 ` Randy Dunlap
2009-11-11 21:43 ` Andi Kleen
2009-11-16 17:02   ` Tom Herbert
2009-11-19 10:08     ` Andi Kleen
2009-11-20  6:41       ` Tom Herbert
2009-11-20  6:49         ` Eric Dumazet
2009-11-12 20:23 ` Eric Dumazet
2009-11-16 11:19 ` David Miller
2009-11-16 16:43   ` Tom Herbert
2009-11-18  7:21     ` David Miller
2009-11-19  8:08     ` Jarek Poplawski
2009-11-20 22:52       ` David Miller
2009-11-17 21:32 ` Jarek Poplawski
2009-11-19  9:57 ` Jarek Poplawski [this message]
2009-11-20 17:08   ` Tom Herbert
2009-11-20 19:00     ` Jarek Poplawski

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=20091119095730.GA7661@ff.dom.local \
    --to=jarkao2@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=therbert@google.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).