linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roman Zippel <zippel@linux-m68k.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andries.Brouwer@cwi.nl, <linux-kernel@vger.kernel.org>
Subject: Re: 64-bit kdev_t - just for playing
Date: Wed, 9 Apr 2003 18:42:10 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.44.0304091415460.12110-100000@serv> (raw)
In-Reply-To: <b6vnig$q86$1@cesium.transmeta.com>

Hi,

On 8 Apr 2003, H. Peter Anvin wrote:

> So far, *none* of the schemes used for dynamics have gotten it right.
> They just ignore a fair number of the problems.  People keep focusing
> on disks, and they are nearly uniformly the almost-trivial case in
> comparison with especially character devices, where you don't have the
> layer of indirection called /etc/fstab, persistent labels, etc.
> 
> [...]
> 
> Given that it has taken, literally, 8 years to get to this point, and
> based on collective global experience with numberspaces, I'm arguing
> for enlarging it far more than anyone can currently imagine being
> necessary.

Let's try it with a real example:
I have two onboard SCSI channels, the first one is for external devices 
and the second for internal devices. This means the internal drives are 
renumbered depending on whether I have my MO-drive turned on or off. Now I 
also want to access the MO-drive as normal user, but the device name 
can be /dev/sda or /dev/sdd.
So what options do I have here?
1. devfs: it would work in this situation, but it doesn't offer really 
stable device names.
2. scsidev: it's more flexible, but it is limited to scsi devices.

Another example:
Let's take a legacy free pc, where a serial port is only available via a 
usb port replicator. Is there really a good reason, why that port isn't 
available via /dev/ttyS0? Why has the user to find out, how that thing is 
called? Or why should a terminal program maintain a growing list of 
possible serial device names?

The information exported via sysfs offers now for the first time a more 
general mechanism to manage these problems. I'm trying very hard here to 
get an answer to the question "How are we going to manage a lot of 
devices?", instead I only get answers to the question "How do we get a lot 
of devices?". If we concentrate only on the latter, we neglect a major 
part of the problem.

I have to come back to the two questions I already asked earlier:
1. How do we want to manage devices in the future?
2. What compromises can we make for 2.6?

The first question requires a look at how we want to register devices, how 
is device information exported to the user and how the user can access the 
devices.
The second question requires a look at what we already have and what is 
still missing.

I think there is a general agreement that we need to manage more 
dynamically, so what do have already? Block devices are already the 
furthest and also need a larger dev_t the most. A lot of drivers which 
only use add_disk/register_blkdev (but not blk_register_region) care about 
the device number only during registration and don't need it otherwise. 
scsi already exports a lot of information via sysfs.
So if we just look at scsi we already have everything to manage devices 
more dynamically, userspace only has to make use of that information now. 
To manage now a lot of scsi devices, we only have to generate new device 
numbers for them, preferably in a way that a) other drivers can benefit 
from it and b) it doesn't break existing setups. The required kernel 
changes are minimal and certainly no reason to hold up any kernel release, 
but simply changing the kernel major/minor split breaks compatibility and 
should be avoided.

Character devices still need more work and that is mostly 2.7 material, 
but basically it's possible to give more control to user space similiar to 
block devices.

The only questions I still can't answer myself are:
1. What exactly do we need a 64bit dev_t for and what has "collective 
global experience with numberspaces" to do with the local device 
numberspace?
2. What advantage does a more static scheme have and what are the problems 
ignored by the dynamic schemes?
Above examples should help to demonstrate how to deal with the various 
problems.

Peter and Andries, I would really appreciate it, if you would stop 
ignoring me and start answering my questions or explain what is wrong in 
above explanation.
If anyone else can answer these question, you are of course welcome to do 
so, otherwise I hope you have more luck than me to get some answers here.

bye, Roman


  parent reply	other threads:[~2003-04-09 16:30 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-31 23:41 64-bit kdev_t - just for playing Badari Pulavarty
2003-03-31 23:54 ` William Lee Irwin III
2003-03-31 23:55 ` Joel Becker
2003-04-02 12:18 ` Roman Zippel
2003-04-02 17:31   ` Badari Pulavarty
2003-04-02 22:03     ` H. Peter Anvin
2003-04-03 10:09       ` David Lang
2003-04-03 11:14         ` Lars Marowsky-Bree
2003-04-03 12:13     ` Roman Zippel
2003-04-03 13:37       ` Andries Brouwer
2003-04-03 14:01         ` Roman Zippel
2003-04-07 15:02           ` H. Peter Anvin
2003-04-07 20:10             ` Roman Zippel
2003-04-07 21:57               ` Roman Zippel
2003-04-07 22:43                 ` Kevin P. Fleming
2003-04-08 15:22                   ` Roman Zippel
2003-04-08 22:53                 ` Werner Almesberger
2003-04-08 23:11                   ` David Lang
2003-04-08 23:47                     ` Werner Almesberger
2003-04-08 23:58                       ` Kevin P. Fleming
2003-04-08 23:56                     ` H. Peter Anvin
2003-04-08 23:06                       ` Andrew Morton
2003-04-09  0:40                       ` Roman Zippel
2003-04-09  1:02                         ` Joel Becker
2003-04-09  1:25                           ` Roman Zippel
2003-04-09 16:42                       ` Roman Zippel [this message]
2003-04-09  0:21                   ` Roman Zippel
2003-04-11  9:58               ` Pavel Machek
2003-04-08 15:29             ` Roman Zippel
  -- strict thread matches above, loose matches on Subject: below --
2003-04-09 18:40 James Bottomley
2003-04-09 20:54 ` Roman Zippel
2003-04-10  2:19   ` James Bottomley
2003-04-10 12:47     ` Roman Zippel
2003-04-10 15:30       ` James Bottomley
2003-04-10 23:53         ` Roman Zippel
2003-04-11  0:01           ` David Lang
2003-04-11  0:17             ` Roman Zippel
2003-04-11  0:47           ` Joel Becker
2003-04-11  1:11             ` Roman Zippel
2003-04-09 18:36 Andries.Brouwer
2003-04-09 21:11 ` Roman Zippel
2003-04-01 18:32 Andries.Brouwer
2003-03-28 15:33 Andries.Brouwer
2003-03-28 15:49 ` Roman Zippel
2003-03-28 11:46 Andries.Brouwer
2003-03-28 11:57 ` Roman Zippel
2003-03-28 11:10 Andries.Brouwer
2003-03-28 11:36 ` Roman Zippel
2003-03-30 20:05   ` H. Peter Anvin
2003-03-30 20:13     ` Roman Zippel
2003-03-27 22:37 Andries.Brouwer
2003-03-27 22:55 ` Roman Zippel
2003-03-27 20:27 Andries.Brouwer
2003-03-27 22:12 ` Roman Zippel
2003-03-27 22:55   ` Alan Cox
2003-03-27 23:19     ` Roman Zippel
2003-03-27 23:48       ` Greg KH
2003-03-28  9:47         ` Roman Zippel
2003-03-28 18:05           ` Joel Becker
2003-03-28 18:48             ` Roman Zippel
2003-03-31  8:31               ` bert hubert
2003-03-31  8:52                 ` Roman Zippel
2003-03-31 17:24                   ` Joel Becker
2003-03-31 21:32                     ` Roman Zippel
2003-03-31 22:18                       ` Alan Cox
2003-03-31 23:42                         ` Roman Zippel
2003-04-01 14:42                           ` Alan Cox
2003-04-01 16:35                             ` Greg KH
2003-04-02 13:02                               ` Roman Zippel
2003-04-01 14:42                           ` Alan Cox
2003-04-01 16:52                             ` Christoph Hellwig
2003-04-01 21:59                             ` H. Peter Anvin
2003-04-02  7:12                               ` Christoph Hellwig
2003-04-02  7:22                                 ` H. Peter Anvin
2003-03-31 23:45                         ` Joel Becker
2003-03-31 23:07                       ` Joel Becker
2003-03-31 23:35                         ` Roman Zippel
2003-03-27  1:09 Andries.Brouwer
2003-03-27 19:23 ` Roman Zippel
2003-03-30 20: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=Pine.LNX.4.44.0304091415460.12110-100000@serv \
    --to=zippel@linux-m68k.org \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).