From: Andries.Brouwer@cwi.nl
To: linux-kernel@vger.kernel.org, zippel@linux-m68k.org
Cc: Andries.Brouwer@cwi.nl, akpm@digeo.com
Subject: Re: [PATCH] alternative dev patch
Date: Thu, 20 Mar 2003 22:50:14 +0100 (MET) [thread overview]
Message-ID: <UTC200303202150.h2KLoEl09978.aeb@smtp.cwi.nl> (raw)
From: Roman Zippel <zippel@linux-m68k.org>
> Here is a more detailed explanation of the patch
Thanks!
However, I am unconvinced.
(i)
There was some unused code, and you decide to start using that
in order to speed up the open() of a chardev. Is that urgent?
Is the speed of opening a chardev a bottleneck?
I think something is wrong with this philosophy.
Look at what happens on open("/dev/ttyS1") - there is a hash
lookup of the "dev", then a hash lookup of the "ttyS1", then
we find that this is device (4,65) and do a hash lookup for
(4,65). You want to eliminate this last hash lookup by building
infrastructure to cache it? That is possible of course.
Some extra code, an extra slab cache, a field i_cdev in struct inode,
a semaphore, refcounting..
I have not benchmarked anything but it sure feels like a lot of
machinery to avoid a simple hash lookup.
I very much doubt that Al had speeding up the open() in mind when
he wrote that (so far unused) infrastructure.
(ii)
> Further he introduces a new function register_chrdev_region(),
> which is only needed by the tty code and rather hides the problem
> than solves it.
What does one want? A driver announces the device number regions
that it wants to cover. Simple and straightforward.
Hardly a new idea. How is this done for block devices?
Using blk_register_region(). How is register_chrdev_region()
hiding problems? It eliminates the tty kludges that you only
move to a different file.
[Al muttered for an entirely different reason:
He wants to specify the region like "dev_t dev, unsigned long range",
where I left the parts of dev separate. I plan (eventually, there is
no hurry) to turn the dev_t here into a kdev_t since that is much
faster, and once that is done both blk_register_region() and
register_chrdev_region() can get a kdev_t as first parameter.]
(iii)
> this patch helps drivers to manage them without huge tables
> (this latter part is also missing in Andries patch).
I am not sure I understand. Where are these huge tables?
And how did you remove them?
Andries
next reply other threads:[~2003-03-20 21:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-20 21:50 Andries.Brouwer [this message]
2003-03-20 23:03 ` Roman Zippel
2003-03-21 1:24 ` Greg KH
2003-03-21 9:08 ` Roman Zippel
2003-03-22 1:38 ` Greg KH
2003-03-22 13:02 ` Roman Zippel
2003-03-23 8:19 ` Greg KH
2003-03-23 8:30 ` Christoph Hellwig
2003-03-23 15:05 ` Roman Zippel
2003-03-23 16:32 ` Christoph Hellwig
2003-03-23 8:50 ` Christoph Hellwig
2003-03-23 8:46 ` Christoph Hellwig
2003-03-23 15:11 ` Roman Zippel
-- strict thread matches above, loose matches on Subject: below --
2003-03-20 0:57 Roman Zippel
2003-03-20 20:40 ` Roman Zippel
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=UTC200303202150.h2KLoEl09978.aeb@smtp.cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zippel@linux-m68k.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
all inboxes | Powered by JetHome®