From: Wanpeng Li <liwanp@linux.vnet.ibm.com>
To: Pekka Enberg <penberg@kernel.org>
Cc: Christoph Lameter <cl@linux.com>, Matt Mackall <mpm@selenic.com>,
Glauber Costa <glommer@parallels.com>,
Andrew Morton <akpm@linux-foundation.org>,
Joonsoo Kim <js1304@gmail.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] mm/slab: Sharing s_next and s_stop between slab and slub
Date: Mon, 8 Jul 2013 08:16:45 +0800 [thread overview]
Message-ID: <10928.6354309463$1373242630@news.gmane.org> (raw)
In-Reply-To: <CAOJsxLGXTcB2iVcg5SArVytakjeTSCZqLEqnBWhTrjA4aLnSSQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 919 bytes --]
On Sun, Jul 07, 2013 at 07:41:54PM +0300, Pekka Enberg wrote:
>On Mon, Jul 1, 2013 at 6:48 PM, Christoph Lameter <cl@linux.com> wrote:
>> On Mon, 24 Jun 2013, David Rientjes wrote:
>>
>>> On Mon, 24 Jun 2013, Wanpeng Li wrote:
>>>
>>> > This patch shares s_next and s_stop between slab and slub.
>>> >
>>>
>>> Just about the entire kernel includes slab.h, so I think you'll need to
>>> give these slab-specific names instead of exporting "s_next" and "s_stop"
>>> to everybody.
>>
>> He put the export into mm/slab.h. The headerfile is only included by
>> mm/sl?b.c .
>
>But he then went on to add globally visible symbols "s_next" and
>"s_stop" which is bad...
>
>Please send me an incremental patch on top of slab/next to fix this
>up. Otherwise I'll revert it before sending a pull request to Linus.
>
> Pekka
Hi Pekka,
I attach the incremental patch in attachment. ;-)
Regards,
Wanpeng Li
[-- Attachment #2: 0001-slab.patch --]
[-- Type: text/x-diff, Size: 2019 bytes --]
>From 02f008d7321a4a10babb4f7398b9eb8ebe13af24 Mon Sep 17 00:00:00 2001
From: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Date: Mon, 8 Jul 2013 08:08:28 +0800
Subject: [PATCH] mm/slab: Give s_next and s_stop slab-specific names
Give s_next and s_stop slab-specific names instead of exporting
"s_next" and "s_stop".
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
---
mm/slab.c | 4 ++--
mm/slab.h | 4 ++--
mm/slab_common.c | 8 ++++----
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/mm/slab.c b/mm/slab.c
index 9bf2251..57ab422 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -4440,8 +4440,8 @@ static int leaks_show(struct seq_file *m, void *p)
static const struct seq_operations slabstats_op = {
.start = leaks_start,
- .next = s_next,
- .stop = s_stop,
+ .next = slab_next,
+ .stop = slab_stop,
.show = leaks_show,
};
diff --git a/mm/slab.h b/mm/slab.h
index 95c8860..620ceed 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -272,5 +272,5 @@ struct kmem_cache_node {
};
-void *s_next(struct seq_file *m, void *p, loff_t *pos);
-void s_stop(struct seq_file *m, void *p);
+void *slab_next(struct seq_file *m, void *p, loff_t *pos);
+void slab_stop(struct seq_file *m, void *p);
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 13ae037..eacdffa 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -536,12 +536,12 @@ static void *s_start(struct seq_file *m, loff_t *pos)
return seq_list_start(&slab_caches, *pos);
}
-void *s_next(struct seq_file *m, void *p, loff_t *pos)
+void *slab_next(struct seq_file *m, void *p, loff_t *pos)
{
return seq_list_next(p, &slab_caches, pos);
}
-void s_stop(struct seq_file *m, void *p)
+void slab_stop(struct seq_file *m, void *p)
{
mutex_unlock(&slab_mutex);
}
@@ -618,8 +618,8 @@ static int s_show(struct seq_file *m, void *p)
*/
static const struct seq_operations slabinfo_op = {
.start = s_start,
- .next = s_next,
- .stop = s_stop,
+ .next = slab_next,
+ .stop = slab_stop,
.show = s_show,
};
--
1.8.1.2
next prev parent reply other threads:[~2013-07-08 0:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 10:23 [PATCH 1/3] mm/slab: Fix drain freelist excessively Wanpeng Li
2013-06-24 10:23 ` [PATCH 2/3] mm/slab: Sharing s_next and s_stop between slab and slub Wanpeng Li
2013-06-24 21:23 ` David Rientjes
2013-06-27 0:21 ` Wanpeng Li
2013-06-27 0:21 ` Wanpeng Li
2013-07-01 15:48 ` Christoph Lameter
2013-07-01 23:49 ` Wanpeng Li
2013-07-01 23:49 ` Wanpeng Li
2013-07-07 16:41 ` Pekka Enberg
2013-07-08 0:16 ` Wanpeng Li
2013-07-08 8:03 ` Pekka Enberg
2013-07-08 0:16 ` Wanpeng Li [this message]
2013-06-24 10:23 ` [PATCH 3/3] mm/slab: Fix /proc/slabinfo unwriteable for slab Wanpeng Li
2013-07-01 15:49 ` Christoph Lameter
2013-07-01 23:43 ` Wanpeng Li
2013-07-01 23:43 ` Wanpeng Li
2013-07-01 15:46 ` [PATCH 1/3] mm/slab: Fix drain freelist excessively Christoph Lameter
2013-07-01 23:45 ` Wanpeng Li
2013-07-01 23:45 ` Wanpeng Li
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='10928.6354309463$1373242630@news.gmane.org' \
--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 \
/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