[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100428.143610.232922250.davem@davemloft.net>
Date: Wed, 28 Apr 2010 14:36:10 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: hadi@...erus.ca, xiaosuo@...il.com, therbert@...gle.com,
shemminger@...tta.com, netdev@...r.kernel.org, eilong@...adcom.com,
bmb@...enacr.com
Subject: Re: [PATCH net-next-2.6] net: speedup udp receive path
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Wed, 28 Apr 2010 16:06:45 +0200
> [PATCH net-next-2.6] net: speedup udp receive path
>
> Since commit 95766fff ([UDP]: Add memory accounting.),
> each received packet needs one extra sock_lock()/sock_release() pair.
>
> This added latency because of possible backlog handling. Then later,
> ticket spinlocks added yet another latency source in case of DDOS.
>
> This patch introduces lock_sock_bh() and unlock_sock_bh()
> synchronization primitives, avoiding one atomic operation and backlog
> processing.
>
> skb_free_datagram_locked() uses them instead of full blown
> lock_sock()/release_sock(). skb is orphaned inside locked section for
> proper socket memory reclaim, and finally freed outside of it.
>
> UDP receive path now take the socket spinlock only once.
>
> Signed-off-by: Eric DUmazet <eric.dumazet@...il.com>
Clever, let's see what this breaks :-)
Applied, thanks Eric.
--
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