From: Christoph Lameter <cl@linux.com>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Aruna Ramakrishna <aruna.ramakrishna@oracle.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Mike Kravetz <mike.kravetz@oracle.com>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm/slab: Improve performance of gathering slabinfo stats
Date: Tue, 2 Aug 2016 09:59:26 -0500 (CDT) [thread overview]
Message-ID: <alpine.DEB.2.20.1608020953160.24620@east.gentwo.org> (raw)
In-Reply-To: <20160802024342.GA15062@js1304-P5Q-DELUXE>
Hmm.... What SLUB does is:
1. Keep a count of the total number of allocated slab pages per node.
This counter only needs to be updated when a slab page is
allocated from the page allocator or when it is freed to the
page allocator. At that point we already hold the per node lock,
page allocator operations are extremely costly anyways and so that
is ok.
2. Keep a count of the number of partially allocated slab pages per node.
At that point we have to access the partial list and take a per
node lock. Placing the counter into the same cacheline and
the increment/decrement into the period when the lock has been taken
avoids the overhead.
The number of full pages is then
total - partial
If both allocators would use the same scheme here then the code to
maintain the counter can be moved into mm/slab_common.c. Plus the per node
structures could be mostly harmonized between both allocators. Maybe even
the page allocator operations could become common code.
Aruna: Could you work on a solution like that?
--
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>
next prev parent reply other threads:[~2016-08-02 14:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 0:09 Aruna Ramakrishna
2016-08-02 0:55 ` Joonsoo Kim
2016-08-02 1:43 ` Aruna Ramakrishna
2016-08-02 2:43 ` Joonsoo Kim
2016-08-02 14:59 ` Christoph Lameter [this message]
2016-08-02 17:39 ` Aruna Ramakrishna
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=alpine.DEB.2.20.1608020953160.24620@east.gentwo.org \
--to=cl@linux.com \
--cc=akpm@linux-foundation.org \
--cc=aruna.ramakrishna@oracle.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
/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