public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [ANNOUNCE] udev 0.1 release
@ 2003-04-12 12:18 Arnd Bergmann
  0 siblings, 0 replies; 107+ messages in thread
From: Arnd Bergmann @ 2003-04-12 12:18 UTC (permalink / raw)
  To: linux-kernel, Steven Dake; +Cc: Greg KH, linux-hotplug-devel

Steven Dake wrote:

> I have not tried it, but dnotify should be generic and not fs specific.  
> If it doesn't work, it could be fixed to match other filesystem types...

It currently does not work for files that are modified by sysfs itself,
because the generic dnotify mechanism only works for file system operations
initiated by the user.

I have verified that adding calls to dnotify_parent() to sysfs_create and
sysfs_hash_and_remove makes it work. I'm not sure about the locking rules
there, so I'm not sending a patch but it should be trivial to do for
someone more familiar with the sysfs code.

	Arnd <><

^ permalink raw reply	[flat|nested] 107+ messages in thread
* RE: [ANNOUNCE] udev 0.1 release
@ 2003-04-12  4:22 Perez-Gonzalez, Inaky
  0 siblings, 0 replies; 107+ messages in thread
From: Perez-Gonzalez, Inaky @ 2003-04-12  4:22 UTC (permalink / raw)
  To: 'Steven Dake', 'Greg KH'
  Cc: 'Kevin P. Fleming',
	'lkml (linux-kernel@vger.kernel.org)'



> -----Original Message-----
> From: Steven Dake [mailto:sdake@mvista.com]
>
> Without blocking until the device is created and ready to be used, it
> becomes difficult to actually "hotswap insert" and then immediatly use
> the device, requiring polling.  Most users would like to wait for the
> event to complete, or have a select()able fd to wait on to know when the
> event has been completed.
> 
> This might be possible to emulate through dnotify, but would still
> require a rescan of the dev directory, causing poor performance. 

Would you take a look at the patch I just sent and tell me if something
along the lines of that would help? [the subject is Simple Kernel-User
Event Interface]

Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own
(and my fault)

^ permalink raw reply	[flat|nested] 107+ messages in thread
* RE: [ANNOUNCE] udev 0.1 release
@ 2003-04-11 22:59 Perez-Gonzalez, Inaky
  0 siblings, 0 replies; 107+ messages in thread
From: Perez-Gonzalez, Inaky @ 2003-04-11 22:59 UTC (permalink / raw)
  To: 'Greg KH'
  Cc: 'oliver@neukum.name',
	'linux-kernel@vger.kernel.org',
	'linux-hotplug-devel@lists.sourceforge.net',
	'message-bus-list@redhat.com', 'Daniel Stekloff'



> From: Greg KH [mailto:greg@kroah.com]


> > > From: Greg KH [mailto:greg@kroah.com]
> > >
> > > But I can do a lot to prevent losses.  A lot of people around here
point
> > > to the old way PTX used to regenerate the device naming database on
the
> > > fly.  We could do that by periodically scanning sysfs to make sure we
> > > are keeping /dev in sync with what the system has physically present.
> > > That's one way, I'm sure there are others.
> >
> > This might be a tad over-simplification, but sysfs knows by heart when
> > anything is modified, because it goes through it's interface. If we
> > only care about, for example, devices, we could hook up into
> > device_create() [was this the name?]; line up in a queue all the
> > devices for which an plug/unplug event hasn't been delivered to user
> > space and create symlinks in /sysfs/hotplug-events/.
> >
> > Each entry in there is a symlink to the new device directory, named with
an
> > increasing integer for easy serialization. When the event is fully
> > processed, remove the entry from user space.
> 
> Um, how do you show a symlink to a device that is no long there when the
> device is removed?  :)

Broken link - removal event [my fault, should have explained];
still, this is kind of broken because of what you mention in
the next paragraph and because it limits you to just two types
of events - addition and removal.

I like better the having of a file where you can get events
from (that at the end goes with the select() thingie).

> In the end, it's a nice idea, but the current one is much simpler, and
> works today :)

Sure - let's just not forget it and build on top of it little
by little.

Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own
(and my fault)

^ permalink raw reply	[flat|nested] 107+ messages in thread
* RE: [ANNOUNCE] udev 0.1 release
@ 2003-04-11 22:42 Perez-Gonzalez, Inaky
  0 siblings, 0 replies; 107+ messages in thread
From: Perez-Gonzalez, Inaky @ 2003-04-11 22:42 UTC (permalink / raw)
  To: 'Steven Dake', 'Greg KH'
  Cc: 'Kevin P. Fleming',
	'linux-hotplug-devel@lists.sourceforge.net',
	'linux-kernel@vger.kernel.org',
	'message-bus-list@redhat.com'



> -----Original Message-----
> From: Steven Dake [mailto:sdake@mvista.com]
> 
> There is no "spec" that states this is a requirement, however, telecom
> customers require the elapsed time from the time they request the disk
> to be used, to the disk being usable by the operating system to be 20
msec.

How do you qualify "request"?

Is it plug the cable? Insert the disk into the bay? 
Flip a switch on? Manually? Computer controlled?

I cannot think of a physical action to plug a disk to a system that
is going to take an amount of time small enough so that 20 msec is
not noise.

A computer controlled switch might make sense, assuming the disk is
already powered, spinning and ready to rock - still, I guess SCSI
would like to enumerate it ... dunno how that works.

Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own
(and my fault)

^ permalink raw reply	[flat|nested] 107+ messages in thread
* RE: [ANNOUNCE] udev 0.1 release
@ 2003-04-11 22:36 Perez-Gonzalez, Inaky
  2003-04-12  7:53 ` Oliver Neukum
  0 siblings, 1 reply; 107+ messages in thread
From: Perez-Gonzalez, Inaky @ 2003-04-11 22:36 UTC (permalink / raw)
  To: 'oliver@neukum.name', 'Greg KH'
  Cc: 'linux-kernel@vger.kernel.org',
	'linux-hotplug-devel@lists.sourceforge.net',
	'message-bus-list@redhat.com', 'Daniel Stekloff'

> From: Oliver Neukum [mailto:oliver@neukum.org]
>
> > Ok, if you are worried about these kinds of things, then use the
> > in-kernel devfs.  I'm not going to dispute that userspace faults can
> > happen.
> 
> Yes, in my oppinion putting such things into user space is stupid.
> Your considerable talents would be better used to help Adam getting
> his simplified devfs ready.

Fixating naming policy in the kernel goes along the lines too; 
unless kdevfs gets the ability to be policy-configurable, it is no use.

Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own
(and my fault)

^ permalink raw reply	[flat|nested] 107+ messages in thread
* RE: [ANNOUNCE] udev 0.1 release
@ 2003-04-11 20:42 Perez-Gonzalez, Inaky
  2003-04-11 20:48 ` David Lang
  0 siblings, 1 reply; 107+ messages in thread
From: Perez-Gonzalez, Inaky @ 2003-04-11 20:42 UTC (permalink / raw)
  To: 'Jeremy Jackson', 'Greg KH'
  Cc: 'linux-kernel@vger.kernel.org',
	'linux-hotplug-devel@lists.sourceforge.net'


> From: Jeremy Jackson [mailto:jerj@coplanar.net]
>
> What about read-only root fs?  

/dev on a tmpfs?

Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own
(and my fault)

^ permalink raw reply	[flat|nested] 107+ messages in thread
[parent not found: <200304112018.11931.freesoftwaredeveloper@web.de>]
* [ANNOUNCE] udev 0.1 release
@ 2003-04-11  3:24 Greg KH
  2003-04-11  6:37 ` Oliver Neukum
                   ` (2 more replies)
  0 siblings, 3 replies; 107+ messages in thread
From: Greg KH @ 2003-04-11  3:24 UTC (permalink / raw)
  To: linux-kernel, linux-hotplug-devel, message-bus-list; +Cc: Daniel Stekloff

[-- Attachment #1: Type: text/plain, Size: 1906 bytes --]


Hi all,

I'd like to finally announce the previously vapor-ware udev program that
I've talked a lot about with a lot of people over the past months.  The
first, very rough cut is at:
	kernel.org/pub/linux/utils/kernel/hotplug/udev-0.1.tar.gz

But what is it?  I've included an initial design document below that was
originally written by Dan Stekloff, and hacked up a bit by me.  But in
short, udev is a userspace replacement for devfs.  It will create and
destroy /dev entries based on the current system configuration.  It does
this by watching the /sbin/hotplug events on the system, and reading
information about these events from sysfs.

Right now the program is only in 1 piece, not the 3 pieces that the
design document talks about, but it does work with the default Linux
/dev naming scheme that almost everyone uses.  It can only work for
devices that create a dev file in sysfs, exposing their major/minor
number, so this is limited (currently only block and usb-serial devices
do this.)

If you want to test this with block devices, you will need the kobject
hotplug patches previously posted here for 2.5.67, which are also
available at:
	kernel.org/pub/linux/kernel/people/gregkh/misc/kobject-hotplug-?-2.5.67.patch

Anyway, this works for me, on my machines, and I am very interested in
feedback from everyone about both this concept, and the implementation
of this.  I've cced a lot of different lists, as they have all expressed
interest in this project.

Yes, I know there's still a lot of work to do (serialization, symlinks,
hooking hotplug so that others can also use it, etc.) but it's a first
step :)

I'd like to thank Dan Stekloff for constantly badgering me about this
project and for writing lots of good design documentation, it is greatly
appreciated.  Also, thanks to Pat Mochel for coming up with sysfs which
allows this project to be able to work at all.

thanks,

greg k-h

[-- Attachment #2: overview --]
[-- Type: text/plain, Size: 4078 bytes --]


We've got a couple goals for udev:

1) dynamic replacement for /dev
2) device naming
3) API to access info about current system devices

Splitting these goals into separate subsystems:

1) udev - dynamic replacement for /dev
2) namedev - device naming
3) libsysfs - a standard library for accessing device information on the
              system.

Udev
------

Udev will be responsible for responding to /sbin/hotplug on device
events.  It will receive the device class information along with
device's sysfs directory.  Udev will call the name_device function from
the naming device subsystem with that information and receive a unique
device name in return.  Udev will then query sysfs through the libsysfs
for specific device information required for creating the /dev node like
major and minor number.  Once it has the important information, udev
will create a /dev entry for the device, add the device to the in memory
table of current devices, and send notification of the successful event
through a D-BUS message.  On a remove call, udev will remove the /dev
entry, remove the device from the in memory table, and send
notification.

Udev will consist of a command udev - to be called from /sbin/hotplug.
It will require the in memory dynamic database/table for keeping track
of current system devices, and a library of routines for accessing that
database/table.  Udev will not care about "how" devices are named, that
will be separated into the device naming subsystem.  It's presented a
common device naming API by the device naming subsystem to use for
naming devices.



namedev
----------

>From comments people have made, the device naming part of udev has been
pushed into its own "subsystem".  The reason is to make this as flexible
and pluggable as possible.  The device naming subsystem, or namedev, will
present a standard interface for udev to call for naming a particular
device.  Under that interface, system administrators can plug in their
own methods for device naming.

We would provide a default naming scheme. The first prototype
implementation could simply take the sysfs directory passed in with the
device name function, query sysfs for the major and minor numbers, and
then look up in a static device name mapping file the name of the
device. The static device naming file could look just like devices.txt
in the Linux kernel's Documentation directory.  Obviously, this isn't a
great implementation because eventually we'd like major an minor numbers
to be dynamic.

The default naming scheme in the future would have a set of policies to
go through in order to determine the name of the device.  The device
naming subsystem would get the sysfs directory of the to be named device
and would use the following information in order to map the device's
name:

1) Label info - like SCSI's UUID
2) Bus Device Number
3) Topology on Bus
4) Kernel Name - DEFAULT

System administrators could use the default naming system or enterprise
computing environments could plug in their Universal Unique Identifier
(UUID) policies.  The idea is to make the device naming as flexible and
pluggable as possible.

The device naming subsystem would require accessing sysfs for device
information.  It will receive the device's sysfs directory in the call
from udev and use it to get more information to determine naming.  The
namedev subsystem will include a standard naming API for udev to use.
The default naming scheme will include a set of functions and a static
device naming file, which will reside in /etc or /var.



libsysfs
--------

There is a need for a common API to access device information in sysfs.
The device naming subsystem and the udev subsystem need to take the
sysfs directory path and query device information.  Instead of copying
code so each one will have to readdir, etc., splitting this logic of
sysfs calls into a separate library that will sit atop sysfs makes more
sense.  Sysfs callbacks aren't standard across devices, so this is
another reason for creating a common and standard library interface for
querying device information. 


^ permalink raw reply	[flat|nested] 107+ messages in thread

end of thread, other threads:[~2003-04-19  4:59 UTC | newest]

Thread overview: 107+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20030411173018$2695@gated-at.bofh.it>
     [not found] ` <20030411175011$3d7e@gated-at.bofh.it>
     [not found]   ` <20030411182022$7f7a@gated-at.bofh.it>
     [not found]     ` <20030411184016$1180@gated-at.bofh.it>
     [not found]       ` <20030411204006$0496@gated-at.bofh.it>
     [not found]         ` <20030411205018$7440@gated-at.bofh.it>
2003-04-11 21:09           ` [ANNOUNCE] udev 0.1 release Arnd Bergmann
2003-04-11 21:57             ` Greg KH
2003-04-11 22:12               ` Arnd Bergmann
2003-04-12  7:39               ` John Bradford
2003-04-11 22:35             ` Steven Dake
2003-04-11 23:05               ` Greg KH
2003-04-11 23:30                 ` Arnd Bergmann
2003-04-12 12:18 Arnd Bergmann
  -- strict thread matches above, loose matches on Subject: below --
2003-04-12  4:22 Perez-Gonzalez, Inaky
2003-04-11 22:59 Perez-Gonzalez, Inaky
2003-04-11 22:42 Perez-Gonzalez, Inaky
2003-04-11 22:36 Perez-Gonzalez, Inaky
2003-04-12  7:53 ` Oliver Neukum
2003-04-11 20:42 Perez-Gonzalez, Inaky
2003-04-11 20:48 ` David Lang
2003-04-11 20:59   ` Greg KH
2003-04-11 22:32     ` Steven Dake
2003-04-11 22:41       ` David Lang
2003-04-11 22:51       ` Greg KH
2003-04-11 23:27         ` Steven Dake
2003-04-11 23:32           ` Greg KH
2003-04-11 23:39             ` Steven Dake
2003-04-12  0:04     ` Joel Becker
     [not found] <200304112018.11931.freesoftwaredeveloper@web.de>
2003-04-11 18:50 ` Steve Lee
2003-04-11 19:09   ` Michael Buesch
2003-04-11  3:24 Greg KH
2003-04-11  6:37 ` Oliver Neukum
2003-04-11 17:20   ` Greg KH
2003-04-11 17:46     ` John Bradford
2003-04-11 18:03       ` Michael Buesch
2003-04-11 18:12         ` Nicholas Berry
2003-04-11 18:41           ` Eric Weigle
2003-04-11 21:54           ` Alex Bligh - linux-kernel
2003-04-11 18:23       ` Antonio Vargas
2003-04-11 18:31         ` Kevin P. Fleming
2003-04-11 19:07           ` Greg KH
2003-04-11 19:29             ` Havoc Pennington
2003-04-12  8:07               ` Greg KH
2003-04-12 23:27                 ` Havoc Pennington
2003-04-11 23:39             ` Miquel van Smoorenburg
2003-04-12  0:08               ` Greg KH
2003-04-12  0:21                 ` Miquel van Smoorenburg
2003-04-12  8:40                   ` Oliver Neukum
2003-04-12  8:52                     ` Andrew Morton
2003-04-11 19:28           ` Joel Becker
2003-04-11 19:38             ` Kevin P. Fleming
2003-04-11 23:26               ` Joel Becker
2003-04-11 19:58             ` Greg KH
2003-04-11 23:25               ` Joel Becker
2003-04-11 23:37                 ` Greg KH
2003-04-12  0:19                   ` Joel Becker
2003-04-12  1:06                     ` H. Peter Anvin
2003-04-12  4:43                       ` Greg KH
2003-04-12 12:56                       ` Roman Zippel
2003-04-12  4:20                     ` Greg KH
2003-04-11 20:29           ` Steven Dake
2003-04-11 20:43             ` Greg KH
2003-04-11 22:30               ` Steven Dake
2003-04-11 22:38                 ` Lars Marowsky-Bree
2003-04-11 22:43                   ` Steven Dake
2003-04-11 22:58                     ` Greg KH
2003-04-11 23:32                       ` Steven Dake
2003-04-11 23:45                         ` Greg KH
2003-04-11 22:56                 ` Greg KH
2003-04-11 23:31                   ` Steven Dake
2003-04-12  6:45                     ` Lars Marowsky-Bree
2003-04-12 14:45                 ` Alan Cox
2003-04-11 22:09             ` Andrew Morton
2003-04-11 22:19               ` Tim Hockin
2003-04-11 22:47                 ` Andrew Morton
2003-04-11 23:03                   ` Greg KH
2003-04-12  8:04                   ` Oliver Neukum
2003-04-11 23:01               ` Greg KH
2003-04-11 23:23                 ` Andrew Morton
2003-04-11 23:35                   ` Greg KH
2003-04-11 23:37                 ` Steven Dake
2003-04-12  7:49                 ` Oliver Neukum
2003-04-19  4:39               ` David Brownell
2003-04-19  4:16           ` David Brownell
2003-04-11 18:30       ` Oliver Neukum
2003-04-11 19:00         ` Oliver Neukum
2003-04-11 19:09       ` Mike Dresser
2003-04-11 19:54         ` Richard B. Johnson
2003-04-11 19:59           ` Mike Dresser
2003-04-11 20:16             ` John Bradford
2003-04-11 20:16               ` Mike Dresser
2003-04-11 20:23                 ` Chris Hanson
2003-04-11 20:32                   ` Mike Dresser
2003-04-11 20:47                     ` Richard B. Johnson
2003-04-11 20:39               ` Richard B. Johnson
2003-04-11 22:03                 ` Alex Bligh - linux-kernel
2003-04-11 22:00             ` Alex Bligh - linux-kernel
2003-04-11 21:28         ` Martin Mares
2003-04-11 18:12     ` Oliver Neukum
2003-04-11 18:52       ` Greg KH
2003-04-11 19:31         ` Oliver Neukum
2003-04-11 20:10           ` Greg KH
2003-04-11 20:56             ` Oliver Neukum
2003-04-11 21:03             ` Oliver Neukum
2003-04-11 22:27             ` Perez-Gonzalez, Inaky
2003-04-11 22:53               ` Greg KH
2003-04-11 17:10 ` Jeremy Jackson
2003-04-11 17:18   ` Justin Cormack
2003-04-11 17:21   ` Greg KH
2003-04-11 18:02 ` Roman Zippel
2003-04-11 18:12   ` Greg KH
2003-04-11 20:09     ` Nick Craig-Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox