From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Josh Poimboeuf <jpoimboe@redhat.com>
Subject: [PATCH v2 0/5] module: Remove stop_machine from module unloading
Date: Thu, 23 Oct 2014 15:26:36 -0400 [thread overview]
Message-ID: <20141023192636.10463.45031.stgit@localhost.localdomain> (raw)
Hi,
Here is the second version of removing stop_machine() from
module unloading patchset.
Currently, each module unloading calls stop_machine()s 2 times.
One is for safely removing module from lists and one is to
check the reference counter. However, both are not necessary
for those purposes (required by current implementation).
First, we can use RCU for the list operation, we just need
a synchronize_rcu right before cleaning up.
Second, the reference counter can be checked atomically by
using atomic_t, instead of per-cpu module_ref.
In v2, the series updated as below;
- Fix to initialize return value in 1/5.
- Remove module LOCKUP code(v1 4/5).
- Split v1 5/5 into replacing module_ref with atomic_t and
removing stop_machine patches.
- Also, add BUG_ON and WARN_ON for the cases if the
reference counter becomes a negative value.
Thank you,
---
Masami Hiramatsu (5):
module: Wait for RCU synchronizing before releasing a module
module: Unlink module with RCU synchronizing instead of stop_machine
lib/bug: Use RCU list ops for module_bug_list
module: Replace module_ref with atomic_t refcnt
module: Remove stop_machine from module unloading
include/linux/module.h | 16 ------
include/trace/events/module.h | 2 -
kernel/module.c | 117 ++++++++++++++++-------------------------
lib/bug.c | 20 +++++--
4 files changed, 63 insertions(+), 92 deletions(-)
--
Masami HIRAMATSU
Software Platform Research Dpt. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
next reply other threads:[~2014-10-23 11:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-23 19:26 Masami Hiramatsu [this message]
2014-10-23 19:26 ` [PATCH v2 1/5] module: Wait for RCU synchronizing before releasing a module Masami Hiramatsu
2014-10-23 19:26 ` [PATCH v2 2/5] module: Unlink module with RCU synchronizing instead of stop_machine Masami Hiramatsu
2014-10-23 19:26 ` [PATCH v2 3/5] lib/bug: Use RCU list ops for module_bug_list Masami Hiramatsu
2014-10-23 19:27 ` [PATCH v2 4/5] module: Replace module_ref with atomic_t refcnt Masami Hiramatsu
2014-10-23 19:27 ` [PATCH v2 5/5] module: Remove stop_machine from module unloading Masami Hiramatsu
2014-10-28 1:20 ` Rusty Russell
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=20141023192636.10463.45031.stgit@localhost.localdomain \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox