Re: [PATCH] tcp: Support tcp socket allocated counter in namespace.

2018-02-28 Thread Stephen Hemminger
On Mon, 12 Feb 2018 18:44:00 -0800 Tonghao Zhang wrote: > Sometimes, we want to know how many tcp sockets are in use > different _net_ namespaces. It's a key resource metric. With > this patch, we can get it via /proc/net/sockstat. > > The 'alloc' show in /proc/net/sockstat is the total tcp > so

Re: [PATCH] tcp: Support tcp socket allocated counter in namespace.

2018-02-28 Thread Tonghao Zhang
On Wed, Feb 28, 2018 at 10:41 PM, David Miller wrote: > From: Tonghao Zhang > Date: Wed, 28 Feb 2018 21:01:52 +0800 > >>> The amount of new conditional tests in these fast paths are not >>> justified for this new counter which is of debatable usefullness. >> sorry, too late for reply. Did you mea

Re: [PATCH] tcp: Support tcp socket allocated counter in namespace.

2018-02-28 Thread David Miller
From: Tonghao Zhang Date: Wed, 28 Feb 2018 21:01:52 +0800 >> The amount of new conditional tests in these fast paths are not >> justified for this new counter which is of debatable usefullness. > sorry, too late for reply. Did you mean this counter will affect performance ? > I tested the patch w

Re: [PATCH] tcp: Support tcp socket allocated counter in namespace.

2018-02-28 Thread Tonghao Zhang
On Wed, Feb 14, 2018 at 1:19 AM, David Miller wrote: > From: Tonghao Zhang > Date: Mon, 12 Feb 2018 18:44:00 -0800 > >> Sometimes, we want to know how many tcp sockets are in use >> different _net_ namespaces. It's a key resource metric. With >> this patch, we can get it via /proc/net/sockstat. >

Re: [PATCH] tcp: Support tcp socket allocated counter in namespace.

2018-02-13 Thread David Miller
From: Tonghao Zhang Date: Mon, 12 Feb 2018 18:44:00 -0800 > Sometimes, we want to know how many tcp sockets are in use > different _net_ namespaces. It's a key resource metric. With > this patch, we can get it via /proc/net/sockstat. > > The 'alloc' show in /proc/net/sockstat is the total tcp >

[PATCH] tcp: Support tcp socket allocated counter in namespace.

2018-02-12 Thread Tonghao Zhang
Sometimes, we want to know how many tcp sockets are in use different _net_ namespaces. It's a key resource metric. With this patch, we can get it via /proc/net/sockstat. The 'alloc' show in /proc/net/sockstat is the total tcp sockets in the kernel. This patch moves it to namespace, via adding a co