From: Kirill Tkhai <ktkhai@virtuozzo.com>
To: paulmck@linux.vnet.ibm.com, josh@joshtriplett.org,
rostedt@goodmis.org, mathieu.desnoyers@efficios.com,
jiangshanlai@gmail.com, mingo@redhat.com, cl@linux.com,
penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com,
akpm@linux-foundation.org, ktkhai@virtuozzo.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH 2/2] mm: Use kvfree_rcu() in update_memcg_params()
Date: Tue, 06 Feb 2018 13:19:56 +0300 [thread overview]
Message-ID: <151791239671.5994.2058061081618636334.stgit@localhost.localdomain> (raw)
In-Reply-To: <151791170164.5994.8253310844733420079.stgit@localhost.localdomain>
Make update_memcg_params() to use generic kvfree_rcu()
helper and remove free_memcg_params() code.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
mm/slab_common.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 10f127b2de7c..92d4a3a9471d 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -190,14 +190,6 @@ static void destroy_memcg_params(struct kmem_cache *s)
kvfree(rcu_access_pointer(s->memcg_params.memcg_caches));
}
-static void free_memcg_params(struct rcu_head *rcu)
-{
- struct memcg_cache_array *old;
-
- old = container_of(rcu, struct memcg_cache_array, rcu);
- kvfree(old);
-}
-
static int update_memcg_params(struct kmem_cache *s, int new_array_size)
{
struct memcg_cache_array *old, *new;
@@ -215,7 +207,7 @@ static int update_memcg_params(struct kmem_cache *s, int new_array_size)
rcu_assign_pointer(s->memcg_params.memcg_caches, new);
if (old)
- call_rcu(&old->rcu, free_memcg_params);
+ kvfree_rcu(old, rcu);
return 0;
}
--
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:[~2018-02-06 10:20 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-06 10:19 [PATCH 0/2] rcu: Transform kfree_rcu() into kvfree_rcu() Kirill Tkhai
2018-02-06 10:19 ` [PATCH 1/2] " Kirill Tkhai
2018-02-06 14:34 ` Steven Rostedt
2018-02-06 15:06 ` Kirill Tkhai
2018-02-06 15:49 ` Steven Rostedt
2018-02-06 10:19 ` Kirill Tkhai [this message]
2018-02-07 2:17 ` [PATCH 0/2] " Paul E. McKenney
2018-02-07 4:23 ` Matthew Wilcox
2018-02-07 5:02 ` Paul E. McKenney
2018-02-07 7:54 ` Josh Triplett
2018-02-07 8:20 ` Paul E. McKenney
2018-02-07 7:57 ` Kirill Tkhai
2018-02-07 8:31 ` Paul E. McKenney
2018-02-07 13:57 ` Steven Rostedt
2018-02-07 16:18 ` Matthew Wilcox
2018-02-07 16:34 ` Steven Rostedt
2018-02-07 16:45 ` Jesper Dangaard Brouer
2018-02-07 18:10 ` Matthew Wilcox
2018-02-07 18:26 ` Steven Rostedt
2018-02-08 4:10 ` Paul E. McKenney
2018-02-22 23:55 ` Paul E. McKenney
2018-02-08 4:09 ` Paul E. McKenney
2018-02-07 16:47 ` Christopher Lameter
2018-02-07 17:09 ` Steven Rostedt
2018-02-07 17:19 ` Matthew Wilcox
2018-02-07 17:29 ` Steven Rostedt
2018-02-07 17:54 ` Christopher Lameter
2018-02-07 14:55 ` Christopher Lameter
2018-02-08 4:09 ` Paul E. McKenney
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=151791239671.5994.2058061081618636334.stgit@localhost.localdomain \
--to=ktkhai@virtuozzo.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=rostedt@goodmis.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