From: viro@parcelfarce.linux.theplanet.co.uk
To: Andries.Brouwer@cwi.nl
Cc: aebr@win.tue.nl, linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: Re: [CFT] more kdev_t-ectomy
Date: Sun, 20 Apr 2003 23:35:08 +0100 [thread overview]
Message-ID: <20030420223508.GK10374@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <UTC200304202158.h3KLwIu10935.aeb@smtp.cwi.nl>
On Sun, Apr 20, 2003 at 11:58:18PM +0200, Andries.Brouwer@cwi.nl wrote:
> [Now that we are talking anyway, let me ask about something.
> You wrote blk_register_region so that subregions override
> superregions. At the bottom there is the full region.
> Was this just a general good idea, or do you have definite
> applications in mind? I ask this mostly because the hash
A lot of them. Consider, e.g., ide code. Or any other driver with
subdrivers - anything that can't be just done by blind "here's device
number, that's enough to know what should be loaded".
In case of ide we have regions corresponding to hwifs (== IDE cables)
and each of them can carry up to two devices. We can see that 22:43
is to be handled by IDE, no problems with that. But then we get to
decide whether it's ide-disk or ide-cd or ide-floppy. IDE code knows
what is needed - it had probed devices already and it knows that
master on that cable is a disk. So attempt to open that sucker
should refer to IDE code, which, in turn, should know that we need
to load a high-level driver (ide-disk.o). After that we have a
normal range (64 numbers) for master. But not necessary for slave -
if it is an ide-cd, we still might have no driver loaded.
We could play splitting these ranges and merging them (i.e. original range
shrinks and subrange is added as the first-level one), but that gets very
nasty when you try to get it right (you need to merge these suckers during
cleanup, etc.)
> and that is OK for regions with constant major.
> For multimajor regions a hash does not work very well, and
> a tree looks better.]
Tree certainly looks better. I'd played with route cache code (after
all, that's exactly the same problem), but it looked like an overkill.
I'm porting genhd.c code for character devices, if that will show up
in profiles we'll always be able to optimize that stuff. It is fairly
isolated, so changes of lookup data structures should not affect anything
else.
next prev parent reply other threads:[~2003-04-20 22:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-20 21:58 Andries.Brouwer
2003-04-20 22:35 ` viro [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-04-21 1:32 Andries.Brouwer
2003-04-21 3:54 ` H. Peter Anvin
2003-04-20 23:56 Andries.Brouwer
2003-04-21 0:15 ` H. Peter Anvin
2003-04-21 0:35 ` viro
2003-04-20 21:17 Andries.Brouwer
2003-04-20 21:26 ` viro
2003-04-20 13:31 viro
2003-04-20 15:26 ` Muli Ben-Yehuda
2003-04-20 16:00 ` Andries Brouwer
2003-04-20 19:24 ` viro
2003-04-20 21:10 ` H. Peter Anvin
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=20030420223508.GK10374@parcelfarce.linux.theplanet.co.uk \
--to=viro@parcelfarce.linux.theplanet.co.uk \
--cc=Andries.Brouwer@cwi.nl \
--cc=aebr@win.tue.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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®