From: Robert Love <rml@tech9.net>
To: Mitchell Blank Jr <mitch@sfgoth.com>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] might_sleep() improvements
Date: Tue, 02 Sep 2003 09:55:37 -0400 [thread overview]
Message-ID: <1062510937.28552.7.camel@boobies.awol.org> (raw)
In-Reply-To: <20030902075145.GA12817@sfgoth.com>
On Tue, 2003-09-02 at 03:51, Mitchell Blank Jr wrote:
> Andrew - I thought this might be appropriate for -mm kernels.
>
> This patch makes the following improvements to might_sleep():
Good. These checks are very useful.
> o Add a "might_sleep_if()" macro for when we might sleep only if some
> condition is met.
But I am neutral about this. One thing that BUG_ON() gives is that the
if has an unlikely() in it, so it at least guarantees some improved
semantics.
Another bit is that we have historically avoided conditional code (i.e.,
cruft like smp_if() etc. that you see elsewhere) like this. Maybe
renaming this "might_sleep_on()" at least brings it more in line with
BUG_ON(), and avoids looking like the gross constructs I fear.
> o Add might_sleep checks to skb_share_check() and skb_unshare() which
> sometimes need to allocate memory.
Great.
> o Make all architectures call might_sleep() in both down() and
> down_interruptible(). Before only ppc, ppc64, and i386 did this check.
> (sh did the check on down() but not down_interruptible())
Even better.
Robert Love
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
On Tue, 2003-09-02 at 03:51, Mitchell Blank Jr wrote:
> Andrew - I thought this might be appropriate for -mm kernels.
>
> This patch makes the following improvements to might_sleep():
Good. These checks are very useful.
> o Add a "might_sleep_if()" macro for when we might sleep only if some
> condition is met.
But I am neutral about this. One thing that BUG_ON() gives is that the
if has an unlikely() in it, so it at least guarantees some improved
semantics.
Another bit is that we have historically avoided conditional code (i.e.,
cruft like smp_if() etc. that you see elsewhere) like this. Maybe
renaming this "might_sleep_on()" at least brings it more in line with
BUG_ON(), and avoids looking like the gross constructs I fear.
> o Add might_sleep checks to skb_share_check() and skb_unshare() which
> sometimes need to allocate memory.
Great.
> o Make all architectures call might_sleep() in both down() and
> down_interruptible(). Before only ppc, ppc64, and i386 did this check.
> (sh did the check on down() but not down_interruptible())
Even better.
Robert Love
next prev parent reply other threads:[~2003-09-02 13:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-02 7:51 Mitchell Blank Jr
2003-09-02 8:14 ` Nick Piggin
2003-09-02 8:32 ` Mitchell Blank Jr
2003-09-02 8:39 ` Nick Piggin
2003-09-02 8:36 ` Linus Torvalds
2003-09-02 8:44 ` Nick Piggin
2003-09-02 13:55 ` Robert Love [this message]
2003-09-02 18:39 ` Mitchell Blank Jr
2003-09-09 3:10 ` Rob Landley
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=1062510937.28552.7.camel@boobies.awol.org \
--to=rml@tech9.net \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mitch@sfgoth.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®