From: Andries Brouwer <aebr@win.tue.nl>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@digeo.com>,
Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH 1/3] revert register_chrdev_region change
Date: Mon, 24 Mar 2003 15:25:15 +0100 [thread overview]
Message-ID: <20030324142515.GA10462@win.tue.nl> (raw)
In-Reply-To: <Pine.LNX.4.44.0303240023420.9053-100000@serv>
On Mon, Mar 24, 2003 at 12:25:57AM +0100, Roman Zippel wrote:
> This patch removes Andries dev patch, which was unfortunately merged.
> It doesn't really help to manage a large number of character devices.
Hi Roman -
It still looks like you do not understand the purpose of these patches.
First of all, it is a series - code is morphed into a more desirable
state; at each point in time there are imperfections, and some of these
disappear the next stage.
The first goal is not at all handling many devices. The first goal is
having a larger dev_t. Handling many devices comes after that.
The patch that you want to revert made the kernel source and binary smaller,
made chardev handling more efficient, and enables stuff impossible so far.
But if you need hundreds of regions on the same major, yes, then this very
simplistic hash scheme requires some further work.
This is not important today.
> unregister_chrdev() function is buggy
> There is no unregister_chrdev_region function.
True. This interface that you write all your letters against is for me
just something uninteresting, something temporary, a stage we pass through.
But if you want, you can so very easily fix these particular flaws:
int unregister_chrdev(unsigned int major, const char *name)
{
return unregister_chrdev_region(major, 0, 256, name);
}
int unregister_chrdev_region(unsigned int major, unsigned int baseminor,
int minorct, const char *name)
...
if ((*cp)->major == major &&
(*cp)->baseminor == baseminor &&
(*cp)->minorct == minorct)
break;
together with the appropriate invocation in tty_unregister_driver()
(causing a nice cleanup there).
[Now that you complained about this, I made this change in my tree -
may submit it against 2.5.66 or so.]
> Dynamic majors have to be allocated from a fixed range
I entirely agree, and already in ancient l-k posts you can see that that
is what I do myself. But we are in transition, and dev_t has not yet
become larger, so this big free fixed range is not yet available.
We are going there, LV.
Andries
next prev parent reply other threads:[~2003-03-24 14:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-23 23:25 Roman Zippel
2003-03-24 14:25 ` Andries Brouwer [this message]
2003-03-24 14:43 ` Roman Zippel
2003-03-24 15:04 ` Christoph Hellwig
2003-03-24 16:09 ` Roman Zippel
2003-03-24 19:07 Andries.Brouwer
2003-03-24 19:10 ` Christoph Hellwig
2003-03-24 20:55 ` Roman Zippel
2003-03-24 20:34 Andries.Brouwer
2003-03-24 20:39 ` Christoph Hellwig
2003-03-24 22:06 Andries.Brouwer
2003-03-24 22:28 ` Roman Zippel
2003-03-24 22:40 Andries.Brouwer
2003-03-24 22:52 ` 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=20030324142515.GA10462@win.tue.nl \
--to=aebr@win.tue.nl \
--cc=akpm@digeo.com \
--cc=hch@infradead.org \
--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®