From: Glauber Costa <glommer@parallels.com>
To: Christoph Lameter <cl@linux.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Pekka Enberg <penberg@cs.helsinki.fi>
Subject: Re: [PATCH 4/4] sl[au]b: process slabinfo_show in common code
Date: Thu, 27 Sep 2012 20:38:19 +0400 [thread overview]
Message-ID: <506480FB.40802@parallels.com> (raw)
In-Reply-To: <0000013a08443b02-5715bfe6-9c47-49c5-a951-8a48cc432e42-000000@email.amazonses.com>
On 09/27/2012 07:07 PM, Christoph Lameter wrote:
> On Thu, 27 Sep 2012, Glauber Costa wrote:
>
>> --- a/mm/slab_common.c
>> +++ b/mm/slab_common.c
>> @@ -239,7 +239,23 @@ static void s_stop(struct seq_file *m, void *p)
>>
>> static int s_show(struct seq_file *m, void *p)
>> {
>> - return slabinfo_show(m, p);
>> + struct kmem_cache *s = list_entry(p, struct kmem_cache, list);
>> + struct slabinfo sinfo;
>> +
>> + memset(&sinfo, 0, sizeof(sinfo));
>> + get_slabinfo(s, &sinfo);
>
> Could get_slabinfo() also set the objects per slab etc in some additional
> field in struct slabinfo? Then we can avoid the exporting of the oo_
> functions and we do not need the cache_order() etc functions.
>
Yes. As a matter of fact, I first implemented it this way, and later
switched. I was anticipating that people would be likely to point out
that those properties are directly derivable from the caches, and it
would be better to just get them from there.
I am more than happy to stick them in the slabinfo struct.
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Glauber Costa <glommer@parallels.com>
To: Christoph Lameter <cl@linux.com>
Cc: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Pekka Enberg <penberg@cs.helsinki.fi>
Subject: Re: [PATCH 4/4] sl[au]b: process slabinfo_show in common code
Date: Thu, 27 Sep 2012 20:38:19 +0400 [thread overview]
Message-ID: <506480FB.40802@parallels.com> (raw)
In-Reply-To: <0000013a08443b02-5715bfe6-9c47-49c5-a951-8a48cc432e42-000000@email.amazonses.com>
On 09/27/2012 07:07 PM, Christoph Lameter wrote:
> On Thu, 27 Sep 2012, Glauber Costa wrote:
>
>> --- a/mm/slab_common.c
>> +++ b/mm/slab_common.c
>> @@ -239,7 +239,23 @@ static void s_stop(struct seq_file *m, void *p)
>>
>> static int s_show(struct seq_file *m, void *p)
>> {
>> - return slabinfo_show(m, p);
>> + struct kmem_cache *s = list_entry(p, struct kmem_cache, list);
>> + struct slabinfo sinfo;
>> +
>> + memset(&sinfo, 0, sizeof(sinfo));
>> + get_slabinfo(s, &sinfo);
>
> Could get_slabinfo() also set the objects per slab etc in some additional
> field in struct slabinfo? Then we can avoid the exporting of the oo_
> functions and we do not need the cache_order() etc functions.
>
Yes. As a matter of fact, I first implemented it this way, and later
switched. I was anticipating that people would be likely to point out
that those properties are directly derivable from the caches, and it
would be better to just get them from there.
I am more than happy to stick them in the slabinfo struct.
next prev parent reply other threads:[~2012-09-27 16:41 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-27 14:37 [PATCH 0/4] move slabinfo processing to common code Glauber Costa
2012-09-27 14:37 ` Glauber Costa
2012-09-27 14:37 ` [PATCH 1/4] sl[au]b: move slabinfo processing to slab_common.c Glauber Costa
2012-09-27 14:37 ` Glauber Costa
2012-09-27 14:50 ` Christoph Lameter
2012-09-27 14:50 ` Christoph Lameter
2012-09-27 14:37 ` [PATCH 2/4] sl[au]b: move print_slabinfo_header " Glauber Costa
2012-09-27 14:37 ` Glauber Costa
2012-09-27 14:51 ` Christoph Lameter
2012-09-27 14:51 ` Christoph Lameter
2012-09-27 14:37 ` [PATCH 3/4] slub: move slub internal functions to its header Glauber Costa
2012-09-27 14:37 ` Glauber Costa
2012-09-27 14:53 ` Christoph Lameter
2012-09-27 14:53 ` Christoph Lameter
2012-09-27 14:37 ` [PATCH 4/4] sl[au]b: process slabinfo_show in common code Glauber Costa
2012-09-27 14:37 ` Glauber Costa
2012-09-27 15:07 ` Christoph Lameter
2012-09-27 15:07 ` Christoph Lameter
2012-09-27 16:38 ` Glauber Costa [this message]
2012-09-27 16:38 ` Glauber Costa
2012-09-27 17:53 ` Christoph Lameter
2012-09-27 17:53 ` Christoph Lameter
2012-09-27 14:48 ` [PATCH 0/4] move slabinfo processing to " Christoph Lameter
2012-09-27 14:48 ` 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=506480FB.40802@parallels.com \
--to=glommer@parallels.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@cs.helsinki.fi \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.