public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Boyd Stephen Smith Jr." <bss03@volumehost.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Semi OT: hotplug / coldplug / udev ...
Date: Thu, 9 Nov 2006 10:57:02 -0600	[thread overview]
Message-ID: <200611091057.02691.bss03@volumehost.net> (raw)
In-Reply-To: <20061109170150.644aa997@lx-arnau.pic.es>

On Thursday 09 November 2006 10:01, Arnau Bria <arnau@emergetux.net> wrote 
about '[gentoo-user] Semi OT: hotplug / coldplug / udev ...':
> I have some doubts about the way hotplug / coldplug / udev work.
>
> What really happen when you plug a (again,
> i.e.) pendrive in your computer? Which programs take care in that
> process? What about kernel?

Here's my understanding, I'm sure others will correct me, and possibly 
exapnd on it:

First, there's either a HW interrupt or the kernel scans the bus and sees a 
new device.  Then, the kernel queries the device and populates /sys (and 
possibly /proc) and notifies udev. udev is responsible for loading the 
appropriate module, if not already loaded, and creating the device nodes.

In the past, hotplug and coldplug where responsible for loading the module, 
and devfs would create device nodes under control of the module.  Neither 
hotplug nor coldplug are required with recent udev (w/ module loading 
support).  Hotplug and/or coldplug can provide module loading for early 
versions of udev (in addition to their role with devfs).

In ancient times, device nodes had to be created by the user (static /dev), 
possibly in response to kernel events (put that would require a module for 
the kernel hooks) or en masse for all possible devices.  One 
(dis?)advantage to static /dev was that device nodes would persist across 
reboots, which does not happen under devfs or udev -- unless your distro. 
provided /dev tarballs (ala Gentoo) or another method to save /dev on 
shutdown and restore it on startup.

-- 
"If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability."
-- Gentoo Developer Ciaran McCreesh
-- 
gentoo-user@gentoo.org mailing list



  reply	other threads:[~2006-11-09 17:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-09 16:01 [gentoo-user] Semi OT: hotplug / coldplug / udev Arnau Bria
2006-11-09 16:57 ` Boyd Stephen Smith Jr. [this message]
2006-11-10 10:44   ` Arnau Bria
2006-11-14 19:45 ` Mark Shields
2006-11-14 20:23   ` Neil Bothwick
2006-11-15  8:24     ` Mick
2006-11-15 13:18       ` Neil Bothwick
2006-11-15 20:18         ` Mick
2006-11-15 10:20   ` Arnau Bria
2006-11-15 15:58     ` Mark Shields

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=200611091057.02691.bss03@volumehost.net \
    --to=bss03@volumehost.net \
    --cc=gentoo-user@lists.gentoo.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