From: Wanpeng Li <liwanp@linux.vnet.ibm.com>
To: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>, Matt Mackall <mpm@selenic.com>,
Glauber Costa <glommer@parallels.com>,
Andrew Morton <akpm@linux-foundation.org>,
Joonsoo Kim <js1304@gmail.com>,
David Rientjes <rientjes@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] mm/slub: Fix slub calculate active slabs uncorrectly
Date: Tue, 2 Jul 2013 08:03:29 +0800 [thread overview]
Message-ID: <20130702000329.GC14358@hacker.(null)> (raw)
In-Reply-To: <0000013f9b8d6897-d2399224-d203-4dc5-a700-90dea9be7536-000000@email.amazonses.com>
On Mon, Jul 01, 2013 at 06:45:03PM +0000, Christoph Lameter wrote:
>On Thu, 27 Jun 2013, Wanpeng Li wrote:
>
>> Enough slabs are queued in partial list to avoid pounding the page allocator
>> excessively. Entire free slabs are not discarded immediately if there are not
>> enough slabs in partial list(n->partial < s->min_partial). The number of total
>> slabs is composed by the number of active slabs and the number of entire free
>> slabs, however, the current logic of slub implementation ignore this which lead
>> to the number of active slabs and the number of total slabs in slabtop message
>> is always equal. This patch fix it by substract the number of entire free slabs
>> in partial list when caculate active slabs.
>
>What do you mean by "active" slabs? If this excludes the small number of
>empty slabs that could be present then indeed you will not have that
>number. But why do you need that?
>
>The number of total slabs is the number of partial slabs, plus the number
>of full slabs plus the number of percpu slabs.
Before patch:
Active / Total Slabs (% used) : 59018 / 59018 (100.0%)
After patch:
Active / Total Slabs (% used) : 11086 / 11153 (99.4%)
These numbers are dump from slabtop for monitor slub, before patch Active / Total
Slabs are always 100%, this is not truth since empty slabs present. However, the
slab allocator can caculate its Active / Total Slabs correctly and its value is
less than 100.0%. By comparison, slub is more efficient than slab through slabtop
observation, however, it is not truth since slub uncorrectly calculate its
Active / Total Slabs.
Regards,
Wanpeng Li
--
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:[~2013-07-02 0:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 23:57 [PATCH 1/3] mm/slub: Fix slub calculate active slabs uncorrectly Wanpeng Li
2013-06-26 23:57 ` [PATCH 2/3] mm/slub: remove nr_partials Wanpeng Li
2013-06-26 23:57 ` [PATCH 3/3] mm/slub: Use node_nr_slabs and node_nr_objs in get_slabinfo Wanpeng Li
2013-07-01 18:47 ` Christoph Lameter
2013-07-01 18:45 ` [PATCH 1/3] mm/slub: Fix slub calculate active slabs uncorrectly Christoph Lameter
2013-07-02 0:03 ` Wanpeng Li [this message]
2013-07-02 0:03 ` Wanpeng Li
[not found] ` <51d218df.a77d440a.3cfe.ffffe64aSMTPIN_ADDED_BROKEN@mx.google.com>
2013-07-02 14:15 ` Christoph Lameter
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='20130702000329.GC14358@hacker.(null)' \
--to=liwanp@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=glommer@parallels.com \
--cc=js1304@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mpm@selenic.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;
as well as URLs for NNTP newsgroup(s).