From: Roman Zippel <zippel@linux-m68k.org>
To: "Adam J. Richter" <adam@yggdrasil.com>
Cc: linux-kernel@vger.kernel.org, Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: Patch/resubmit linux-2.5.63-bk4 try_module_get simplification
Date: Sun, 2 Mar 2003 19:37:09 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.44.0303021928090.32518-100000@serv> (raw)
In-Reply-To: <200303021733.JAA15313@adam.yggdrasil.com>
Hi,
On Sun, 2 Mar 2003, Adam J. Richter wrote:
> Is there enough traffic on the module reference counts to make
> this trade-off worthwhile?
I don't know, you have to ask that Rusty.
BTW the same trick is also possible with the old module count:
int try_inc_mod_count(struct module *mod)
{
int res;
if (mod) {
__MOD_INC_USE_COUNT(mod);
smp_mb__after_atomic_inc()
if (unlikely(mod->flags & MOD_DELETED))
goto check;
}
return 1;
check:
res = 1;
spin_lock(&unload_lock);
if (mod->flags & MOD_DELETED) {
__MOD_DEC_USE_COUNT(mod);
res = 0;
}
spin_unlock(&unload_lock);
return res;
}
(and a similiar change to sys_delete_module.)
bye, Roman
next prev parent reply other threads:[~2003-03-02 18:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-02 17:33 Adam J. Richter
2003-03-02 18:37 ` Roman Zippel [this message]
2003-03-07 6:35 ` Rusty Russell
-- strict thread matches above, loose matches on Subject: below --
2003-03-01 4:30 Adam J. Richter
2003-03-02 14:12 ` Roman Zippel
2003-03-07 6:34 ` Rusty Russell
2003-03-07 17:12 ` Bob Miller
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=Pine.LNX.4.44.0303021928090.32518-100000@serv \
--to=zippel@linux-m68k.org \
--cc=adam@yggdrasil.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®