[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1349724113.21172.3629.camel@edumazet-glaptop>
Date: Mon, 08 Oct 2012 21:21:53 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Stephen Hemminger <shemminger@...tta.com>
Cc: David Miller <davem@...emloft.net>,
Rick Jones <rick.jones2@...com>,
Herbert Xu <herbert@...dor.apana.org.au>,
netdev <netdev@...r.kernel.org>, Jesse Gross <jesse@...ira.com>
Subject: Re: [RFC] napi: limit GRO latency
On Mon, 2012-10-08 at 11:58 -0700, Stephen Hemminger wrote:
> Limit the latency of pending GRO in NAPI processing to 2*HZ.
> When the system is under heavy network load, NAPI will go into
> poll mode via soft irq, and only stay in the loop for
> two jiffies. If this occurs, process the GRO pending list
> to make sure and not delay outstanding TCP frames for too long.
>
> Rearrange the exit path to get rid of unnecessary goto logic.
>
> Signed-off-by: Stephen Hemminger <shemminger@...tta.com>
>
>
> --- a/net/core/dev.c 2012-10-08 09:21:27.466049785 -0700
> +++ b/net/core/dev.c 2012-10-08 11:56:41.714618745 -0700
> @@ -3937,8 +3937,16 @@ static void net_rx_action(struct softirq
> * Allow this to run for 2 jiffies since which will allow
> * an average latency of 1.5/HZ.
> */
> - if (unlikely(budget <= 0 || time_after(jiffies, time_limit)))
> - goto softnet_break;
> + if (unlikely(budget <= 0 || time_after(jiffies, time_limit))) {
> + /* Cleanup all pending GRO */
> +
> + list_for_each_entry(n, &sd->poll_list, poll_list)
> + napi_gro_flush(n);
> +
> + sd->time_squeeze++;
> + __raise_softirq_irqoff(NET_RX_SOFTIRQ);
> + break;
> + }
>
Hmm, I really dont think its a good idea.
I am working in making GRO storing more packets, so any kind of flushes
like that will completely defeat GRO intent.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists