mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Greg KH <greg@kroah.com>
Cc: Roman Zippel <zippel@linux-m68k.org>,
	Andries.Brouwer@cwi.nl, linux-kernel@vger.kernel.org,
	akpm@digeo.com
Subject: Re: [PATCH] alternative dev patch
Date: Sun, 23 Mar 2003 08:50:00 +0000	[thread overview]
Message-ID: <20030323085000.B6788@infradead.org> (raw)
In-Reply-To: <20030321012455.GB10298@kroah.com>; from greg@kroah.com on Thu, Mar 20, 2003 at 05:24:55PM -0800

On Thu, Mar 20, 2003 at 05:24:55PM -0800, Greg KH wrote:
> On Fri, Mar 21, 2003 at 12:03:57AM +0100, Roman Zippel wrote:
> > I'm unsure how your code will scale. It depends on how that code will be 
> > used. If drivers register a lot of devices, your lookup function has to 
> > scan a possibly very long list of minor devices and that function is 
> > difficult to optimize.
> 
> And then we grab the BKL :(

You're thinking the wrnog way around.  Locking reduction / splitting is
trivial, getting the algorithms right is the hard part.  Getting rid
of BKL in chardev open is a matter of simple search and replace and I expect
it to happen before 2.6.

> There are a number of char drivers that have "regions".  The tty layer
> support them, and the usb core supports them as two examples.  I'm sure
> there are others.  Personally, I like the symmetry with the block device
> function the way Andries did it.

No, Andries did not do it symmetric to the block devices.

> > Even for block devices blk_register_region() is not the preferred 
> > interface, you should use alloc_disk/add_disk instead. This will make it 
> > easier to assign dynamic device numbers later.
> 
> True, but dynamic device numbers can be built on top of the *_region()
> calls as it is today.  Anyway, dynamic numbers are for 2.7 :)

Dynamic numbers are there today and have been for ages.

> No, I don't see /proc/misc going away due to the driver model,

I do see it going away.  Dito for /proc/devices.  They already are
inaccurate for those midlevel drivers that partition their major number
themselves and having the ranges properly exported like it's already
done for block devices is the proper replacement.  Yes, this breaks
userspace and we'll have to live with it.


  parent reply	other threads:[~2003-03-23  8:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-20 21:50 Andries.Brouwer
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 [this message]
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=20030323085000.B6788@infradead.org \
    --to=hch@infradead.org \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=akpm@digeo.com \
    --cc=greg@kroah.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®