From: Jari Ruusu <jari.ruusu@pp.inet.fi>
To: Jens Axboe <axboe@suse.de>
Cc: Andrea Arcangeli <andrea@suse.de>,
Marcelo Tosatti <marcelo@conectiva.com.br>,
Herbert Valerio Riedel <hvr@hvrlab.org>,
linux-kernel@vger.kernel.org
Subject: Re: 2.4.19pre3aa2
Date: Fri, 15 Mar 2002 19:35:02 +0200 [thread overview]
Message-ID: <3C9230C6.4119CB4C@pp.inet.fi> (raw)
In-Reply-To: <20020314032801.C1273@dualathlon.random> <3C912ACF.AF3EE6F0@pp.inet.fi> <20020315105621.GA22169@suse.de>
Jens Axboe wrote:
> On Fri, Mar 15 2002, Jari Ruusu wrote:
> > - No more illegal sleeping in generic_make_request().
>
> I've told you this before -- sleeping in make_request is not illegal,
> heck it happens _all the time_. Safely sleeping requires a reserved pool
> of the units you wish to allocate, of course. In fact I think that would
> be much nicer than the path you are following here by delaying
> allocations to the loop thread (and still not using a reserved pool).
Yes, I know you have told me that before, but I'm being overcareful. See:
<quote> from device drivers book by Alessandro Rubini, chapter 12, page 331
The request function has one very important constraint: it must be atomic.
request is not usually called in direct response to user requests, and it is
not running in the context of any particular process. It can be called at
interrupt time, from tasklets, or from any number of other places. Thus, it
must not sleep while carrying out its tasks.
</quote>
> - loop_put_buffer(), it looks racy to check waitqueue_active there.
No race there. All that loop_put_buffer() cares is that helper thread wakes
up. If helper thread woke up earlier and completed its job, fine. If helper
thread wakes up later, that is fine too. If helper thread wakes up
unnecessarily, it will just go back to sleep after noticing that that there
is no work to do.
> - if(!bh) return((struct buffer_head *)0);
>
> eww!
>
> - Also, please adher to the style. VaRiAbLe names can hurt the eyes, and
> stuff like
>
> if (something) break;
>
> return(val);
>
> etc don't belong too. Could you fix that up?
>
> That said, thanks for fixing it!
If there is any chance of being merged to mainline kernel, I will fix these
"hurt the eyes" formatting issues.
> BTW, it looks like you are killing LO_FLAGS_BH_REMAP?! Why? This is a
> very worthwhile optimization.
Removing it simplified the code a lot. Doing remap direcly from
loop_make_request() would probably be more effective. Just remap and return
1 from loop_make_request() like LVM code does.
Regards,
Jari Ruusu <jari.ruusu@pp.inet.fi>
next prev parent reply other threads:[~2002-03-15 17:35 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-14 2:28 2.4.19pre3aa2 Andrea Arcangeli
2002-03-14 12:32 ` 2.4.19pre3aa2 Dave Jones
2002-03-14 12:37 ` 2.4.19pre3aa2 Andrea Arcangeli
2002-03-14 12:46 ` 2.4.19pre3aa2 Jeff Garzik
2002-03-14 12:59 ` 2.4.19pre3aa2 Dave Jones
2002-03-14 15:53 ` 2.4.19pre3aa2 Bill Davidsen
2002-03-14 16:12 ` 2.4.19pre3aa2 Andrea Arcangeli
2002-03-14 16:16 ` 2.4.19pre3aa2 Dave Jones
2002-03-14 16:32 ` 2.4.19pre3aa2 Andrea Arcangeli
2002-03-16 1:26 ` 2.4.19pre3aa2 Mike Fedyk
2002-03-14 16:13 ` 2.4.19pre3aa2 Dave Jones
2002-03-14 17:16 ` 2.4.19pre3aa2 Bill Davidsen
2002-03-14 21:16 ` 2.4.19pre3aa2 H. Peter Anvin
2002-03-14 18:00 ` 2.4.19pre3aa2 Andrew Morton
2002-03-14 22:57 ` 2.4.19pre3aa2 Jari Ruusu
2002-03-15 10:56 ` 2.4.19pre3aa2 Jens Axboe
2002-03-15 11:06 ` 2.4.19pre3aa2 Jens Axboe
2002-03-15 17:35 ` Jari Ruusu [this message]
2002-03-15 17:57 ` 2.4.19pre3aa2 Andrea Arcangeli
2002-03-16 12:10 ` 2.4.19pre3aa2 Jari Ruusu
2002-03-16 13:54 ` 2.4.19pre3aa2 Andrea Arcangeli
2002-03-18 19:13 ` 2.4.19pre3aa2 Jens Axboe
2002-03-19 23:26 ` 2.4.19pre3aa2 Jari Ruusu
2002-03-20 7:54 ` 2.4.19pre3aa2 Jens Axboe
2002-03-20 18:16 ` 2.4.19pre3aa2 Jari Ruusu
2002-03-20 14:21 ` 2.4.19pre3aa2 Herbert Valerio Riedel
2002-03-15 12:19 ` 2.4.19pre3aa2 Herbert Valerio Riedel
2002-03-15 17:36 ` 2.4.19pre3aa2 Jari Ruusu
2002-03-15 18:36 ` 2.4.19pre3aa2 Herbert Valerio Riedel
2002-03-16 12:12 ` 2.4.19pre3aa2 Jari Ruusu
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=3C9230C6.4119CB4C@pp.inet.fi \
--to=jari.ruusu@pp.inet.fi \
--cc=andrea@suse.de \
--cc=axboe@suse.de \
--cc=hvr@hvrlab.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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