From: Cong Wang <xiyou.wangcong@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: [V2 PATCH 1/3] module: use rcu to protect module list read
Date: Tue, 13 Mar 2012 18:16:38 +0800 [thread overview]
Message-ID: <4F5F1E86.8060707@gmail.com> (raw)
In-Reply-To: <1331487502.2449.20.camel@edumazet-laptop>
On 03/12/2012 01:38 AM, Eric Dumazet wrote:
> Le dimanche 11 mars 2012 à 18:54 +0800, Cong Wang a écrit :
>> V2:
> ...
>>
>> @@ -1639,7 +1639,7 @@ static void mod_sysfs_teardown(struct module *mod)
>> static int __unlink_module(void *_mod)
>> {
>> struct module *mod = _mod;
>> - list_del(&mod->list);
>> + list_del_rcu(&mod->list);
>> module_bug_cleanup(mod);
>> return 0;
>> }
>> @@
>
> You mix too many different things in a single patch.
>
> For example, lets review this __unlink_module() change...
Oops, sorry I missed this part...
>
> If this was really needed, it should be a single patch so that it can be
> a stable submission.
>
> As it is not needed (since its called from stop_machine()), this makes
> your whole patch looking suspicious.
>
> I suggest you make a 100% cleanup patch, changing the title as well,
> because module code _already_ uses RCU.
>
> "module: use rcu to protect module list read" makes no sense at all.
>
> To meet current RCU API best pratices, you change preempt_enable() by
> rcu_read_unlock_sched() and preempt_disable() by rcu_read_lock_sched()
>
> Then, if you believe other changes are needed, submit them with an
> explicit changelog explaining the change, not hiding them in a big
> cleanup patch.
>
>
Fair enough, Rusty gave me the same suggestion, I will split this patch.
Thanks!
prev parent reply other threads:[~2012-03-13 10:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-11 10:54 [V2 PATCH 1/3] module: use rcu to protect module list read Cong Wang
2012-03-11 10:54 ` [V2 PATCH 2/3] module: avoid exporting module_mutex Cong Wang
2012-03-11 10:54 ` [V2 PATCH 3/3] module: dd missing synchronize_sched() Cong Wang
2012-03-11 17:38 ` [V2 PATCH 1/3] module: use rcu to protect module list read Eric Dumazet
2012-03-13 10:16 ` Cong Wang [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=4F5F1E86.8060707@gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=rusty@rustcorp.com.au \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.