From: Alain Knaff <Alain.Knaff@hitchhiker.org.lu>
To: Alexander Viro <viro@math.psu.edu>
Cc: ptb@it.uc3m.es, linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: Poor floppy performance in kernel 2.4.10
Date: Mon, 29 Oct 2001 07:34:18 +0100 [thread overview]
Message-ID: <200110290634.f9T6YJD07642@hitchhiker.org.lu> (raw)
In-Reply-To: Your message of "Mon, 29 Oct 2001 01:07:23 EST." <Pine.GSO.4.21.0110290101230.26445-100000@weyl.math.psu.edu>
>
>
>On Mon, 29 Oct 2001, Alain Knaff wrote:
>
>> Problem number 2 is not yet addressed, Alex Viro is working on a patch
>> (probably by having a variant of invalidate_bdev that just stops
>> transfers in progress, loudly warn about dirty pages, but without
>> killing clean cached pages)
>>
>> Number 3 is fixed by making struct block_device "long
>> lived". Formerly, it only existed as long as there were active open
>> descriptors using it; now it exists as long as there are frontend
>> inodes referencing it.
>
>IMO that's bogus.
As far as I understood, the same logic is used for all other kinds of
inodes, isn't it? I agree that it is suboptimal (might stay around
longer than its pages), but at least it works in simple cases
(i.e. stays cached normally, and is evicted from cache under memory
pressure).
>Correct test is "do we have any data in page cache
>for this guy?" (combined with "... and if driver says that it goes
>away, we'd better drop them all"). See the patch I've just sent to you
>and Linus - right now I consider it as too dangerous for public testing, so...
Got the patch... but only after I sent that mail to Peter. I'll have a
look at it, and try to test it. But due to other activities, I'm
afraid I'll only be able to get around to it tomorrow evening.
>Notice that it _doesn't_ trust check_media_change() - it still has
>both detach_metadata() (needed in all cases) and truncate_inode_pages()
>(kills cache, needed only for drivers with b0rken ->check_media_change())
>in blkdev_put(). You'll need to make the latter call conditional
With your patch, will making that call conditional still correctly
stop any transfers which are already in progress? (a problem that has
existed with my patches)? Or does this problem need to be addressed
separately?
>to
>actually keep the cache around, but I'd really like to make sure that
>infrastructure changes are sane before doing that step.
Ok, I'll give it a spin tomorrow evening.
Btw, the more I think about the check_media_change issue, the more I
come to the conclusion that the cases of broken media change detection
are best dealt with from within the driver. Indeed, firstly why
encumber the vast majority of drivers, which are non-broken, or which
already deal with the situation, just in order to handle a few bad
apples? Secondly, the broken drivers might have internal caches (track
buffers, etc.), and just ignoring check_media_change _outside_ the
driver won't fix all of the problem, as the internal caches will not
be invalidated.
Thus, may I suggest the following course of action in case a missed
media change detection problem with a driver: make a good-faith effort
to contact its maintainer, and have the problem fixed _in_the_driver_
rather than to have media change ignored centrally. Same goes for
other issues as well: work _with_ the device drivers, rather than
_against_ them. I think, in the long run this will save all of us lots
of grief.
Yes, we can have can_trust_media_change type functions, but it just
makes all drivers more complex, and eventually it will lead to a
situation where bad device drivers might unconditionnally return true
to it anyways, and we'd be back to square one.
Alain
next prev parent reply other threads:[~2001-10-29 6:34 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-27 15:00 Alain Knaff
2001-10-27 15:15 ` Alexander Viro
2001-10-27 17:12 ` Alain Knaff
2001-10-27 17:42 ` Alexander Viro
2001-10-27 18:00 ` Alain Knaff
2001-10-27 18:13 ` Alexander Viro
2001-10-27 18:26 ` Alexander Viro
2001-10-27 19:02 ` more devfs fun Alexander Viro
2001-10-27 19:16 ` Alexander Viro
2001-10-27 19:50 ` more devfs fun (Piled Higher and Deeper) Alexander Viro
2001-10-27 20:06 ` Alexander Viro
2001-10-27 21:09 ` Ryan Cumming
2001-10-27 21:22 ` Alexander Viro
2001-10-28 1:00 ` Rik van Riel
2001-10-28 8:45 ` Richard Gooch
2001-10-28 9:54 ` Alexander Viro
2001-10-28 12:27 ` Roman Zippel
2001-10-28 13:16 ` Alexander Viro
2001-10-28 22:31 ` Richard Gooch
2001-10-28 23:11 ` Alexander Viro
2001-10-27 21:01 ` Alexander Viro
2001-11-06 6:35 ` Richard Gooch
2001-11-06 7:10 ` Alexander Viro
2001-11-06 7:14 ` Richard Gooch
2001-11-06 7:17 ` Alexander Viro
2001-11-06 20:14 ` Richard Gooch
2001-10-28 10:06 ` Lorenzo Allegrucci
2001-11-06 5:21 ` Richard Gooch
2001-11-06 5:17 ` more devfs fun Richard Gooch
2001-11-06 5:06 ` Richard Gooch
2001-11-06 7:01 ` Poor floppy performance in kernel 2.4.10 Richard Gooch
2001-11-06 7:03 ` Alexander Viro
2001-12-09 5:38 ` Devfs races with block devices Richard Gooch
2001-11-06 7:19 ` Poor floppy performance in kernel 2.4.10 Richard Gooch
2001-11-06 7:22 ` Alexander Viro
2001-10-27 19:13 ` Alain Knaff
2001-10-27 19:19 ` Alexander Viro
2001-10-27 19:26 ` Alain Knaff
2001-10-28 20:40 ` Alain Knaff
2001-10-28 20:57 ` Peter T. Breuer
2001-10-29 5:38 ` Alain Knaff
2001-10-29 6:07 ` Alexander Viro
2001-10-29 6:34 ` Alain Knaff [this message]
2001-10-28 21:42 ` Alexander Viro
-- strict thread matches above, loose matches on Subject: below --
2001-10-21 11:36 Alain Knaff
2001-10-22 9:59 ` Andrea Arcangeli
2001-10-22 10:06 ` Alexander Viro
2001-10-22 14:07 ` Nick LeRoy
2001-10-22 18:28 ` bill davidsen
2001-10-19 16:58 Manfred Spraul
2001-10-17 7:36 Kamil Iskra
2001-10-17 20:45 ` Steve Kieu
2001-10-18 10:11 ` Kamil Iskra
2001-10-18 15:28 ` Andreas Dilger
2001-10-18 15:42 ` Kamil Iskra
2001-10-18 16:17 ` Ville Herva
2001-10-18 16:30 ` Nick LeRoy
2001-10-18 19:57 ` bill davidsen
2001-10-18 20:47 ` Nick LeRoy
2001-10-18 20:05 ` bill davidsen
2001-10-18 20:15 ` Alexander Viro
2001-10-18 16:18 ` Alexander Viro
2001-10-18 17:44 ` Andrea Arcangeli
2001-10-19 7:50 ` Giuliano Pochini
2001-10-19 13:46 ` Andrea Arcangeli
2001-10-19 15:57 ` Linus Torvalds
2001-10-20 4:20 ` 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=200110290634.f9T6YJD07642@hitchhiker.org.lu \
--to=alain.knaff@hitchhiker.org.lu \
--cc=alain@linux.lu \
--cc=linux-kernel@vger.kernel.org \
--cc=ptb@it.uc3m.es \
--cc=viro@math.psu.edu \
/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®