From: Steven Rostedt <rostedt@goodmis.org>
To: Kirill Tkhai <ktkhai@virtuozzo.com>
Cc: paulmck@linux.vnet.ibm.com, josh@joshtriplett.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, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH 1/2] rcu: Transform kfree_rcu() into kvfree_rcu()
Date: Tue, 6 Feb 2018 10:49:19 -0500 [thread overview]
Message-ID: <20180206104919.0bc1734d@gandalf.local.home> (raw)
In-Reply-To: <52fe3917-cf72-d512-8422-d53bacf40113@virtuozzo.com>
On Tue, 6 Feb 2018 18:06:33 +0300
Kirill Tkhai <ktkhai@virtuozzo.com> wrote:
> There are kfree_rcu() and vfree_rcu() defined below, and they will give
> compilation error if someone tries to implement one more primitive with
> the same name.
Ah, I misread the patch. I was thinking you were simply replacing
kfree_rcu() with kvfree_rcu(), but now see the macros added below it.
>
> We may add a comment, but I'm not sure it will be good if people will use
> unpaired brackets like:
>
> obj = kmalloc(..)
> kvfree_rcu(obj,..)
>
> after they read such a commentary that it works for both vmalloc and kmalloc.
> After this unpaired behavior distribute over the kernel, we won't be able
> to implement some debug on top of this defines (I'm not sure it will be really
> need in the future, but anyway).
>
> Though, we may add a comment forcing use of paired bracket. Something like:
>
> /**
> * kvfree_rcu() - kvfree an object after a grace period.
> This is a primitive for objects allocated via kvmalloc*() family primitives.
> Do not use it to free kmalloc() and vmalloc() allocated objects, use kfree_rcu()
> and vfree_rcu() wrappers instead.
>
> How are you about this?
Never mind, I missed the adding of kfree_rcu() at the bottom, and was
thinking that we were just using kvfree_rcu() for everything.
That's what I get for looking at patches before my first cup of
coffee ;-)
If you want to add a comment, feel free, but taking a second look, I
don't feel it is necessary.
-- Steve
next prev parent reply other threads:[~2018-02-06 15:49 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-06 10:19 [PATCH 0/2] " 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 [this message]
2018-02-06 10:19 ` [PATCH 2/2] mm: Use kvfree_rcu() in update_memcg_params() Kirill Tkhai
2018-02-07 2:17 ` [PATCH 0/2] rcu: Transform kfree_rcu() into kvfree_rcu() 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=20180206104919.0bc1734d@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=ktkhai@virtuozzo.com \
--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 \
/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
all inboxes | Powered by JetHome®