From: Daniel Wagner <wagi@monom.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: paulmck@linux.vnet.ibm.com, Alexei Starovoitov <ast@plumgrid.com>,
Daniel Wagner <daniel.wagner@bmw-carit.de>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: call_rcu from trace_preempt
Date: Tue, 16 Jun 2015 19:11:53 +0200 [thread overview]
Message-ID: <558058D9.5090700@monom.org> (raw)
In-Reply-To: <20150616114151.3681a9e8@gandalf.local.home>
On 06/16/2015 05:41 PM, Steven Rostedt wrote:
> On Tue, 16 Jun 2015 14:38:53 +0200
> Daniel Wagner <wagi@monom.org> wrote:
>> *map, void *key)
>> if (l) {
>> hlist_del_rcu(&l->hash_node);
>> htab->count--;
>> - kfree_rcu(l, rcu);
>> + /* kfree_rcu(l, rcu); */
>
> So this kfree_rcu() is only being used to defer a free, and has nothing
> to do with having to free 'l' from rcu?
Not 100% sure but I got the impression kfree_rcu only defers the free.
>> +static int free_thread(void *arg)
>> +{
>> + unsigned long flags;
>> + struct htab_elem *l;
>> +
>> + while (!kthread_should_stop()) {
>> + spin_lock_irqsave(&elem_freelist_lock, flags);
>> + while (!list_empty(&elem_freelist)) {
>> + l = list_entry(elem_freelist.next,
>> + struct htab_elem, list);
>> + list_del(&l->list);
>> + kfree(l);
>> + }
>> + spin_unlock_irqrestore(&elem_freelist_lock, flags);
>
> Wow! This is burning up CPU isn't it?
Sure, this is a very busy thread :) I was just experimenting if defering
it to a thread would paper of the problem.
> If you just need to delay the kfree, why not use irq_work for that job?
Good point. I tried that tomorrow.
cheers,
daniel
next prev parent reply other threads:[~2015-06-16 17:12 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 22:24 call_rcu from trace_preempt Alexei Starovoitov
2015-06-15 23:07 ` Paul E. McKenney
2015-06-16 1:09 ` Alexei Starovoitov
2015-06-16 2:14 ` Paul E. McKenney
2015-06-16 5:45 ` Alexei Starovoitov
2015-06-16 6:06 ` Daniel Wagner
2015-06-16 6:25 ` Alexei Starovoitov
2015-06-16 6:34 ` Daniel Wagner
2015-06-16 6:46 ` Alexei Starovoitov
2015-06-16 6:54 ` Daniel Wagner
2015-06-16 12:27 ` Paul E. McKenney
2015-06-16 12:38 ` Daniel Wagner
2015-06-16 14:16 ` Paul E. McKenney
2015-06-16 15:43 ` Steven Rostedt
2015-06-16 16:07 ` Paul E. McKenney
2015-06-16 17:13 ` Daniel Wagner
2015-06-16 15:41 ` Steven Rostedt
2015-06-16 15:52 ` Steven Rostedt
2015-06-16 17:11 ` Daniel Wagner [this message]
2015-06-16 17:20 ` Alexei Starovoitov
2015-06-16 17:37 ` Steven Rostedt
2015-06-17 0:33 ` Alexei Starovoitov
2015-06-17 0:47 ` Steven Rostedt
2015-06-17 1:04 ` Alexei Starovoitov
2015-06-17 1:19 ` Steven Rostedt
2015-06-17 8:11 ` Daniel Wagner
2015-06-17 9:05 ` Daniel Wagner
2015-06-17 18:39 ` Alexei Starovoitov
2015-06-17 20:37 ` Paul E. McKenney
2015-06-17 20:53 ` Alexei Starovoitov
2015-06-17 21:36 ` Paul E. McKenney
2015-06-17 23:58 ` Alexei Starovoitov
2015-06-18 0:20 ` Paul E. McKenney
2015-06-16 15:37 ` Steven Rostedt
2015-06-16 16:05 ` Paul E. McKenney
2015-06-16 17:14 ` Alexei Starovoitov
2015-06-16 17:39 ` Paul E. McKenney
2015-06-16 18:57 ` Steven Rostedt
2015-06-16 19:20 ` Paul E. McKenney
2015-06-16 19:29 ` Steven Rostedt
2015-06-16 19:34 ` 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=558058D9.5090700@monom.org \
--to=wagi@monom.org \
--cc=ast@plumgrid.com \
--cc=daniel.wagner@bmw-carit.de \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.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