netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: stephen@networkplumber.org
Cc: willy@infradead.org, netdev@vger.kernel.org, linux-mm@kvack.org,
	ikomyagin@gmail.com, sthemmin@microsoft.com
Subject: Re: [PATCH 0/2] mark some slabs as visible not mergeable
Date: Mon, 26 Feb 2018 20:13:55 -0500 (EST)	[thread overview]
Message-ID: <20180226.201355.1546591469388453458.davem@davemloft.net> (raw)
In-Reply-To: <20180226134613.04edcc98@xeon-e3>

From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 26 Feb 2018 13:46:13 -0800

> This is ancient original iproute2 code that dumpster dives into
> slabinfo to get summary statistics on active objects.
> 
> 	1) open sockets (sock_inode_cache)

The sockets inuse counter from /proc/net/sockstat is really
sufficient for this.

> 	2) TCP ports bound (tcp_bind_buckets) [*]
> 	3) TCP time wait sockets (tw_sock_TCP) [*]

Time wait is provided by /proc/net/sockstat as well.

> 	4) TCP syn sockets (request_sock_TCP) [*]

It shouldn't be too hard to fill in the last two gaps, maintaining a
counter for bind buckets and request socks, and exporting them in new
/proc/net/sockstat field.

That would be so much better than disabling a useful optimization
in the SLAB allocator.

Thank you.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2018-02-27  1:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-24 19:04 [PATCH 0/2] mark some slabs as visible not mergeable Stephen Hemminger
2018-02-24 19:04 ` [PATCH 1/2] slab: add flag to block merging of UAPI elements Stephen Hemminger
2018-02-24 19:04 ` [PATCH 2/2] net: mark slab's used by ss as UAPI Stephen Hemminger
2018-02-25  3:34   ` kbuild test robot
2018-02-25  6:05   ` [net] ba4f5b62a2: kernel_BUG_at_net/socket.c kernel test robot
2018-02-24 21:05 ` [PATCH 0/2] mark some slabs as visible not mergeable Matthew Wilcox
2018-02-25 16:36 ` Stephen Hemminger
2018-02-26 20:15 ` David Miller
2018-02-26 21:46   ` Stephen Hemminger
2018-02-27  1:13     ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180226.201355.1546591469388453458.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ikomyagin@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=sthemmin@microsoft.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).