linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: The Next Generation
Date: Sat, 26 Feb 2005 00:18:52 +0000	[thread overview]
Message-ID: <1109377132.7242.141.camel@localhost.localdomain> (raw)
In-Reply-To: <20050217190941.GA1561@vrfy.org>

On Fri, 2005-02-25 at 15:17 -0800, Greg KH wrote:
>On Thu, Feb 17, 2005 at 08:09:41PM +0100, Kay Sievers wrote:
>> After the recent discussion about a possible new hotplug handler layout
>> I see the need for a completely different approach. We need to clean
>> up the current mess, reduce all the silly options and give a sane
>> environment without all the hacks and shortcomings.
>
>I agree.
>
>> A real "next generation" can only be sane with managed hotplug events,
>> which prevents races with sysfs timing and cares about order and
>> dependencies between the events.
>
>Ok.
>
>> The directory device match logic, even the more advanced one proposed
>> yesterday, will never meet our requirements to limit system usage
>> at event time. We should expect a ever growing number of hotplug events
>> and need to be prepared to execute only the stuff which is really needed
>> for a specific device.
>
>Ok.
>
>> For that reason, we should get rid of all the just too simple
>> brute-force logic in /etc/hotplug/*, /etc/hotplug.d/ and /etc/dev.d/, which
>> requires scripts to check if they are called for the right device.
>
>No, we can't break backward compatiblity like that.  We need to always
>support the /etc/hotplug.d/ way, as we've already told too many people
>they can rely on that always working.
>
>We _can_ change the /etc/hotplug/ stuff, and I'm all for throwing the
>mass of shell scripts there away.  I don't think there are very many
>remaining external programs that still rely on putting themselves in
>that directory.
>
>And /etc/dev.d/ is also a good thing to have.

No, I didn't like it from the first day on. :)
We should remove that crap and emulate dev.d/ with a external helper,
which is optional. A simple rule like:
  HOTPLUG="/sbin/dev_d-execute"

should do it.

>> I propose to make the udev architecture _the_ generic hotplug handler.
>
>As much as I would _love_ to do this, we can't.  Too many people would
>reject it.  We can't force udev onto everyone, no matter how many times
>I tell them it's the right thing to do.

SuSE and Fedora will never support any system without udev again. The
people who don't like udev can switch off the node creation or still
stick with todays hotplug. There will never be a sane Next Hotplug
without event management like udevd is doing. That will never work
reliable, like it was with the old multiplexer.

>Now we _can_ build hotplug-ng out of udev pieces and parts, that I don't
>have a problem with.  And, if udev is running on a box, have it handle
>the hotplug functionality is also an acceptable thing (as long as
>nothing external to udev has to change, like the scripts in
>/etc/hotplug.d/).  But we can't mandate that udev must be used, sorry.

They can stick with the old things, what's wrong with that? We can even
emulate the hotplug.d/ with your tiny multiplexer, by plugging it in
with a rule, the same way we can emulate dev.d/.

>> We use the same rules which we are using today to compose a name for a
>> specific device. We just need something like a POSTPROCESS="/sbin/some-program"
>> key for our rules which adds a program to a list of programs to be executed
>> after the device node is created.
>
>Now I don't have a problem with this, but that's a udev specific thing,
>not a hotplug handler thing.

But we already handle hotplug.d/ with udev today. There is not much of a
difference. :)

>> This way we would get a nice, clean and understandable rule based event handling
>> with a single source of policy, and not the current mess with confusing directories
>> spreaded all over the system. And sure, it would give us the efficiency one can
>> expect from a "next generation" thing. :)
>
>The main hotplug handling shouldn't be rule based, it should be driven
>off of the subsystem and environment variables passed to it, like today.
>
>What I want to see the hotplug-ng stuff handle is this:
>	- not being a shell script, we need tiny and fast for both huge
>	  boxes, and tiny embedded systems.
>	- be a drop in replacement for the current /sbin/hotplug
>	  multiplexer.
>	- be a drop in replacement (through other helper programs) to
>	  the existing linux-hotplug module loading scripts.
>	- Extend the current hotplug functionality with a finer grained
>	  way of executing other programs (like going off of the DEVPATH
>	  or bus specific values, like was proposed on the
>	  linux-hotplug-devel list.)
>	- Possibly handle the wait-for-sysfs and reording logic that
>	  udev currently does.

All that is already there in udev/udevd. You just need to be able to
switch the node creation/removal off.

>While not as far-reaching as your proposal, I think it is a good step
>forward, as it addresses a number of issues that people have today with
>the current hotplug setup, while not forcing anyone to convert to using
>udev.

And again, I really don't know what we can do _with_ udev for people who
don't want it. There will never be a Next Generation without sequence
reordering and sysfs waiting.

Thanks,
Kay



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2005-02-26  0:18 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-17 19:09 The Next Generation Kay Sievers
2005-02-17 20:21 ` Marco d'Itri
2005-02-17 20:35 ` Kay Sievers
2005-02-18  5:26 ` Alexander E. Patrakov
2005-02-24 11:29 ` Roman Kagan
2005-02-24 12:26 ` Kay Sievers
2005-02-24 17:51 ` Roman Kagan
2005-02-24 19:37 ` Kay Sievers
2005-02-24 20:39 ` Roman Kagan
2005-02-25 12:54 ` Kevin P. Fleming
2005-02-25 23:17 ` Greg KH
2005-02-25 23:59 ` Marco d'Itri
2005-02-26  0:07 ` Greg KH
2005-02-26  0:18 ` Kay Sievers [this message]
2005-02-27 20:13 ` David Brownell
2005-02-27 23:34 ` Kay Sievers
2005-02-28 17:02 ` Roman Kagan
2005-02-28 17:38 ` Kay Sievers
2005-02-28 18:41 ` Kay Sievers
2005-02-28 19:11 ` Roman Kagan
2005-02-28 19:49 ` Marco d'Itri
2005-02-28 20:37 ` Kay Sievers
2005-02-28 20:42 ` Chris Larson
2005-02-28 20:46 ` Kay Sievers
2005-02-28 20:50 ` Marco d'Itri
2005-02-28 21:01 ` Kay Sievers
2005-02-28 21:14 ` Erik van Konijnenburg
2005-02-28 21:25 ` Roman Kagan
2005-03-01 20:17 ` Tobias Klauser
2005-03-02  7:13 ` David Brownell

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=1109377132.7242.141.camel@localhost.localdomain \
    --to=kay.sievers@vrfy.org \
    --cc=linux-hotplug@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).