From: tpepper@vato.org
To: linux-kernel@vger.kernel.org
Subject: Re: Design-Question: end_that_request_* and bh->b_end_io hooks
Date: Wed, 25 Jul 2001 10:24:47 -0700 [thread overview]
Message-ID: <20010725102447.A16615@cb.vato.org> (raw)
In-Reply-To: <OF3CC2BFB9.69086721-ONC1256A93.0059C650@de.ibm.com>
In-Reply-To: <OF3CC2BFB9.69086721-ONC1256A93.0059C650@de.ibm.com>; from COTTE@de.ibm.com on Tue, Jul 24, 2001 at 07:20:46PM +0200
Are you confusing generic_make_request() and __make_request().
generic_make_request() doesn't itself grab any locks or sleep. It mostly
sets some stuff up and calls the make_request function that was registered
for the given queue. If the driver hasn't done anything special for its
make_request() function then __make_request() will be that function,
in which case your statements about locking and sleeping are correct.
I suppose that either way you're triggering stuff to run which might
sleep so you shouldn't be holding locks.
You bring up an interresting point though aside from locking.
What I've read has given me the indication that a person writing
a b_end_io() function should assume that they could be called from
interrupt context. If that is the case then any b_end_io() wanting to
call generic_make_request() would need to defer that call until it was
outside of interrupt context. Otherwise the b_end_io() could sleep
within interrupt context. Drivers at the "md" level tend to call
generic_make_request() after b_end_io(), but in the kernel proper I
don't see any others. I haven't traced through the md drivers enough
to know but it does look like they do defer.
I think this may be something I'm doing wrong in a driver on which I'm
working...
Tim
next prev parent reply other threads:[~2001-07-25 17:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-24 17:20 Design-Question: end_that_request_* and bh->b_end_io hooks Carsten Otte
2001-07-25 17:24 ` tpepper [this message]
2001-07-25 21:04 ` [Jfs-discussion] " Dave Kleikamp
2001-07-25 21:47 ` Dave Kleikamp
2001-07-26 6:40 ` Jens Axboe
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=20010725102447.A16615@cb.vato.org \
--to=tpepper@vato.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox