From: "Ahmed S. Darwish" <darwish.07@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] why so many more "down()" than "down_interruptible()"
Date: Sat, 17 Feb 2007 15:56:57 +0000 [thread overview]
Message-ID: <20070217155657.GA5498@Ahmed> (raw)
In-Reply-To: <Pine.LNX.4.64.0702170754290.23563@CPE00045a9c397f-CM001225dbafb6>
On Sat, Feb 17, 2007 at 09:03:59AM -0500, Robert P. J. Day wrote:
> On Sat, 17 Feb 2007, Arnd Bergmann wrote:
>
> > On Saturday 17 February 2007 14:00, Robert P. J. Day wrote:
> > > that's not what i see. just counting the calls under drivers/,
> > > it looks like there's about four times as many calls of down() as
> > > down_interruptible(). is there some reason that the actual stats
> > > differ so markedly from the claim in love's book? just curious.
> >
> > Using down_interruptible is hard: You need to be in a place where
> > you can return -EINTR (or -ERESTART*) to user space, and you need to
> > undo everything that your function did before the down_interruptible
> > failed.
>
> oh, i believe your logic. so it's odd that both love's kernel book
> and LDD3 seem adamant that the *interruptible* version is the
> preferred one.
>
I think there's no contradiction here. Preffered method is not always the
easiest one. You don't want your system to hang entirely and lose your work
cause of a weird locking bug.
--
Ahmed S. Darwish
http://darwish.07.googlepages.com
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
prev parent reply other threads:[~2007-02-17 15:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-17 13:00 [KJ] why so many more "down()" than "down_interruptible()" calls? Robert P. J. Day
2007-02-17 13:58 ` [KJ] why so many more "down()" than "down_interruptible()" Arnd Bergmann
2007-02-17 14:03 ` Robert P. J. Day
2007-02-17 15:56 ` Ahmed S. Darwish [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=20070217155657.GA5498@Ahmed \
--to=darwish.07@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
/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.