From: Eric Dumazet <eric.dumazet@gmail.com>
To: Cong Wang <xiyou.wangcong@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: Sun, 11 Mar 2012 10:38:22 -0700 [thread overview]
Message-ID: <1331487502.2449.20.camel@edumazet-laptop> (raw)
In-Reply-To: <1331463255-31019-1-git-send-email-xiyou.wangcong@gmail.com>
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...
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.
Ref: Documentation/SubmittingPatches section 3)
next prev parent reply other threads:[~2012-03-11 17:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-11 10:54 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 ` Eric Dumazet [this message]
2012-03-13 10:16 ` [V2 PATCH 1/3] module: use rcu to protect module list read Cong Wang
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=1331487502.2449.20.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=rusty@rustcorp.com.au \
--cc=xiyou.wangcong@gmail.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®