Re: [PATCH v7 2/3] sock: Move the socket inuse to namespace.

2017-12-19 Thread David Miller
From: Cong Wang Date: Mon, 18 Dec 2017 13:38:39 -0800 > On Mon, Dec 18, 2017 at 11:30 AM, David Miller wrote: >> From: Tonghao Zhang >> Date: Thu, 14 Dec 2017 05:51:58 -0800 >> >>> In some case, we want to know how many sockets are in use in >>> different _net_ namespaces. It's a key resource m

Re: [PATCH v7 2/3] sock: Move the socket inuse to namespace.

2017-12-18 Thread David Miller
From: Cong Wang Date: Mon, 18 Dec 2017 13:38:39 -0800 > On Mon, Dec 18, 2017 at 11:30 AM, David Miller wrote: >> From: Tonghao Zhang >> Date: Thu, 14 Dec 2017 05:51:58 -0800 >> >>> In some case, we want to know how many sockets are in use in >>> different _net_ namespaces. It's a key resource m

Re: [PATCH v7 2/3] sock: Move the socket inuse to namespace.

2017-12-18 Thread Cong Wang
On Mon, Dec 18, 2017 at 11:30 AM, David Miller wrote: > From: Tonghao Zhang > Date: Thu, 14 Dec 2017 05:51:58 -0800 > >> In some case, we want to know how many sockets are in use in >> different _net_ namespaces. It's a key resource metric. > > Useful or not, you're not exporting this value. > >

Re: [PATCH v7 2/3] sock: Move the socket inuse to namespace.

2017-12-18 Thread David Miller
From: Tonghao Zhang Date: Thu, 14 Dec 2017 05:51:58 -0800 > In some case, we want to know how many sockets are in use in > different _net_ namespaces. It's a key resource metric. Useful or not, you're not exporting this value. All this patch series does is convert the existing export of the glo

[PATCH v7 2/3] sock: Move the socket inuse to namespace.

2017-12-14 Thread Tonghao Zhang
In some case, we want to know how many sockets are in use in different _net_ namespaces. It's a key resource metric. This patch add a member in struct netns_core. This is a counter for socket-inuse in the _net_ namespace. The patch will add/sub counter in the sk_alloc, sk_clone_lock and __sk_free.