Re: [PATCH net-next] net: init sk_cookie for inet socket

2018-04-24 Thread Eric Dumazet
On 04/24/2018 04:47 AM, Yafang Shao wrote: > > Could you pls. explain the issue to me ? Just run a synflood test on your host, it will definitely show the atomic consuming most cpu cycles in inet_reqsk_alloc(), because of huge contention on a cache line shared by all cpus. Performance is redu

Re: [PATCH net-next] net: init sk_cookie for inet socket

2018-04-24 Thread Yafang Shao
On Tue, Apr 24, 2018 at 7:41 PM, Eric Dumazet wrote: > > > On 04/23/2018 09:39 PM, Yafang Shao wrote: >> On Tue, Apr 24, 2018 at 12:09 AM, Eric Dumazet >> wrote: >>> >>> >>> On 04/23/2018 08:58 AM, David Miller wrote: From: Yafang Shao Date: Sun, 22 Apr 2018 21:50:04 +0800 >

Re: [PATCH net-next] net: init sk_cookie for inet socket

2018-04-24 Thread Eric Dumazet
On 04/23/2018 09:39 PM, Yafang Shao wrote: > On Tue, Apr 24, 2018 at 12:09 AM, Eric Dumazet wrote: >> >> >> On 04/23/2018 08:58 AM, David Miller wrote: >>> From: Yafang Shao >>> Date: Sun, 22 Apr 2018 21:50:04 +0800 >>> With sk_cookie we can identify a socket, that is very helpful for

Re: [PATCH net-next] net: init sk_cookie for inet socket

2018-04-23 Thread Yafang Shao
On Tue, Apr 24, 2018 at 12:09 AM, Eric Dumazet wrote: > > > On 04/23/2018 08:58 AM, David Miller wrote: >> From: Yafang Shao >> Date: Sun, 22 Apr 2018 21:50:04 +0800 >> >>> With sk_cookie we can identify a socket, that is very helpful for >>> traceing and statistic, i.e. tcp tracepiont and ebpf.

Re: [PATCH net-next] net: init sk_cookie for inet socket

2018-04-23 Thread Eric Dumazet
On 04/23/2018 08:58 AM, David Miller wrote: > From: Yafang Shao > Date: Sun, 22 Apr 2018 21:50:04 +0800 > >> With sk_cookie we can identify a socket, that is very helpful for >> traceing and statistic, i.e. tcp tracepiont and ebpf. >> So we'd better init it by default for inet socket. >> When u

Re: [PATCH net-next] net: init sk_cookie for inet socket

2018-04-23 Thread David Miller
From: Yafang Shao Date: Sun, 22 Apr 2018 21:50:04 +0800 > With sk_cookie we can identify a socket, that is very helpful for > traceing and statistic, i.e. tcp tracepiont and ebpf. > So we'd better init it by default for inet socket. > When using it, we just need call atomic64_read(&sk->sk_cookie)

[PATCH net-next] net: init sk_cookie for inet socket

2018-04-22 Thread Yafang Shao
With sk_cookie we can identify a socket, that is very helpful for traceing and statistic, i.e. tcp tracepiont and ebpf. So we'd better init it by default for inet socket. When using it, we just need call atomic64_read(&sk->sk_cookie). Signed-off-by: Yafang Shao --- include/linux/sock_diag.h | 9