From: Christoph Lameter <cl@gentwo.org>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 3/3] slab: Use get_node() and kmem_cache_node() functions
Date: Fri, 13 Jun 2014 11:32:56 -0500 (CDT) [thread overview]
Message-ID: <alpine.DEB.2.10.1406131108530.913@gentwo.org> (raw)
In-Reply-To: <20140612063530.GB19918@js1304-P5Q-DELUXE>
On Thu, 12 Jun 2014, Joonsoo Kim wrote:
> > @@ -3759,8 +3746,8 @@ fail:
> > /* Cache is not active yet. Roll back what we did */
> > node--;
> > while (node >= 0) {
> > - if (cachep->node[node]) {
> > - n = cachep->node[node];
> > + if (get_node(cachep, node)) {
> > + n = get_node(cachep, node);
>
> Could you do this as following?
>
> n = get_node(cachep, node);
> if (n) {
> ...
> }
Sure....
Subject: slab: Fixes to earlier patch
Signed-off-by: Christoph Lameter <cl@linux.com>
Index: linux/mm/slab.c
===================================================================
--- linux.orig/mm/slab.c 2014-06-13 11:12:05.018384359 -0500
+++ linux/mm/slab.c 2014-06-13 11:11:57.970611243 -0500
@@ -528,8 +528,8 @@ static inline void on_slab_lock_classes(
struct kmem_cache_node *n;
VM_BUG_ON(OFF_SLAB(cachep));
- for_each_kmem_cache_node(cachep, node, h)
- on_slab_lock_classes_node(cachep, h);
+ for_each_kmem_cache_node(cachep, node, n)
+ on_slab_lock_classes_node(cachep, n);
}
static inline void init_lock_keys(void)
@@ -553,7 +553,7 @@ static inline void on_slab_lock_classes(
}
static inline void on_slab_lock_classes_node(struct kmem_cache *cachep,
- int node, struct kmem_cache_node *n)
+ struct kmem_cache_node *n)
{
}
@@ -771,7 +771,7 @@ static inline bool is_slab_pfmemalloc(st
static void recheck_pfmemalloc_active(struct kmem_cache *cachep,
struct array_cache *ac)
{
- struct kmem_cache_node *n = get_node(cachep,numa_mem_id());
+ struct kmem_cache_node *n = get_node(cachep, numa_mem_id());
struct page *page;
unsigned long flags;
@@ -1256,7 +1256,7 @@ static int cpuup_prepare(long cpu)
slab_set_debugobj_lock_classes_node(cachep, node);
else if (!OFF_SLAB(cachep) &&
!(cachep->flags & SLAB_DESTROY_BY_RCU))
- on_slab_lock_classes_node(cachep, node, n);
+ on_slab_lock_classes_node(cachep, n);
}
init_node_lock_keys(node);
@@ -3746,9 +3746,8 @@ fail:
/* Cache is not active yet. Roll back what we did */
node--;
while (node >= 0) {
- if (get_node(cachep, node)) {
- n = get_node(cachep, node);
-
+ n = get_node(cachep, node);
+ if (n) {
kfree(n->shared);
free_alien_cache(n->alien);
kfree(n);
--
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>
prev parent reply other threads:[~2014-06-13 16:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-11 19:15 [PATCH 0/3] slab: common kmem_cache_cpu functions V2 Christoph Lameter
2014-06-11 19:15 ` [PATCH 1/3] slab common: Add functions for kmem_cache_node access Christoph Lameter
2014-06-11 23:07 ` David Rientjes
2014-06-12 6:10 ` Joonsoo Kim
2014-06-17 21:17 ` Andrew Morton
2014-06-17 21:45 ` David Rientjes
2014-06-11 19:15 ` [PATCH 2/3] slub: Use new node functions Christoph Lameter
2014-06-11 23:12 ` David Rientjes
2014-06-13 16:02 ` Christoph Lameter
2014-06-17 21:47 ` David Rientjes
2014-06-11 19:15 ` [PATCH 3/3] slab: Use get_node() and kmem_cache_node() functions Christoph Lameter
2014-06-11 23:15 ` David Rientjes
2014-06-12 6:35 ` Joonsoo Kim
2014-06-13 16:32 ` Christoph Lameter [this message]
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.10.1406131108530.913@gentwo.org \
--to=cl@gentwo.org \
--cc=akpm@linux-foundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-mm@kvack.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