From: Wei Yang <richard.weiyang@gmail.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Wei Yang <richard.weiyang@gmail.com>,
cl@linux.com, penberg@kernel.org, rientjes@google.com,
akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/6] refine and rename slub sysfs
Date: Wed, 24 May 2017 17:54:50 +0800 [thread overview]
Message-ID: <20170524095450.GA7706@WeideMBP.lan> (raw)
In-Reply-To: <20170523063911.GC12813@dhcp22.suse.cz>
[-- Attachment #1: Type: text/plain, Size: 3497 bytes --]
On Tue, May 23, 2017 at 08:39:11AM +0200, Michal Hocko wrote:
>On Tue 23-05-17 11:27:05, Wei Yang wrote:
>> On Thu, May 18, 2017 at 11:06:37AM +0200, Michal Hocko wrote:
>> >On Wed 17-05-17 22:11:40, Wei Yang wrote:
>> >> This patch serial could be divided into two parts.
>> >>
>> >> First three patches refine and adds slab sysfs.
>> >> Second three patches rename slab sysfs.
>> >>
>> >> 1. Refine slab sysfs
>> >>
>> >> There are four level slabs:
>> >>
>> >> CPU
>> >> CPU_PARTIAL
>> >> PARTIAL
>> >> FULL
>> >>
>> >> And in sysfs, it use show_slab_objects() and cpu_partial_slabs_show() to
>> >> reflect the statistics.
>> >>
>> >> In patch 2, it splits some function in show_slab_objects() which makes sure
>> >> only cpu_partial_slabs_show() covers statistics for CPU_PARTIAL slabs.
>> >>
>> >> After doing so, it would be more clear that show_slab_objects() has totally 9
>> >> statistic combinations for three level of slabs. Each slab has three cases
>> >> statistic.
>> >>
>> >> slabs
>> >> objects
>> >> total_objects
>> >>
>> >> And when we look at current implementation, some of them are missing. So patch
>> >> 2 & 3 add them up.
>> >>
>> >> 2. Rename sysfs
>> >>
>> >> The slab statistics in sysfs are
>> >>
>> >> slabs
>> >> objects
>> >> total_objects
>> >> cpu_slabs
>> >> partial
>> >> partial_objects
>> >> cpu_partial_slabs
>> >>
>> >> which is a little bit hard for users to understand. The second three patches
>> >> rename sysfs file in this pattern.
>> >>
>> >> xxx_slabs[[_total]_objects]
>> >>
>> >> Finally it looks Like
>> >>
>> >> slabs
>> >> slabs_objects
>> >> slabs_total_objects
>> >> cpu_slabs
>> >> cpu_slabs_objects
>> >> cpu_slabs_total_objects
>> >> partial_slabs
>> >> partial_slabs_objects
>> >> partial_slabs_total_objects
>> >> cpu_partial_slabs
>> >
>> >_Why_ do we need all this?
>>
>> To have a clear statistics for each slab level.
>
>Is this worth risking breakage of the userspace which consume this data
>now? Do you have any user space code which will greatly benefit from the
>new data and which couldn't do the same with the current format/output?
>
>If yes this all should be in the changelog.
The answer is no.
I have the same concern as yours. So this patch set could be divided into two
parts: 1. add some new entry with current name convention, 2. change the name
convention.
If there are many userspace tools use these entries, the changing is really
risky, I agree. Hmm, I still send this out, since current name convention is a
little difficult for users to understand, especially after we have several
levels slabs. Is it possible to use the name convention I proposed and add
link to them to keep the userspace interface?
And the second part is to fully utilize current functions. In function
show_slab_objects(), we have 9 combinations of slab statistics. 3 for each
slab level. And currently code just enable 6 of them. So the first three tries
to enable the missing 3 to make it a more complete statistics.
BTW, I found we don't have any entry for full slabs statistics. Not sure this
is omitted intendedly or not. If the community agrees, I still have a path to
enable the statistics for full slabs.
Thanks for your comments~ Michal
>
>--
>Michal Hocko
>SUSE Labs
--
Wei Yang
Help you, Help me
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2017-05-24 9:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-17 14:11 [PATCH 0/6] refine and rename slub sysfs Wei Yang
2017-05-17 14:11 ` [PATCH 1/6] mm/slub: add total_objects_partial sysfs Wei Yang
2017-05-17 14:50 ` Christoph Lameter
2017-05-17 14:11 ` [PATCH 2/6] mm/slub: not include cpu_partial data in cpu_slabs sysfs Wei Yang
2017-05-17 14:11 ` [PATCH 3/6] mm/slub: add cpu_slabs_[total_]objects sysfs Wei Yang
2017-05-17 14:11 ` [PATCH 4/6] mm/slub: rename ALL slabs sysfs Wei Yang
2017-05-17 14:11 ` [PATCH 5/6] mm/slub: rename partial_slabs sysfs Wei Yang
2017-05-17 14:11 ` [PATCH 6/6] mm/slub: rename cpu_partial_slab sysfs Wei Yang
2017-05-17 14:57 ` [PATCH 0/6] refine and rename slub sysfs Christoph Lameter
2017-05-18 9:06 ` Michal Hocko
2017-05-23 3:27 ` Wei Yang
2017-05-23 6:39 ` Michal Hocko
2017-05-23 16:07 ` Christoph Lameter
2017-05-24 9:54 ` Wei Yang [this message]
2017-05-24 12:03 ` Michal Hocko
2017-05-24 15:21 ` Wei Yang
2017-05-24 16:03 ` Christoph Lameter
2017-05-25 6:49 ` Michal Hocko
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=20170524095450.GA7706@WeideMBP.lan \
--to=richard.weiyang@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--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).