mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Peter Zijlstra <peterz@infradead.org>, Greg KH <gregkh@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Fabio Comolli <fabio.comolli@gmail.com>, Greg KH <greg@kroah.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch 00/13] devtmpfs
Date: Mon, 11 May 2009 16:59:47 +0200	[thread overview]
Message-ID: <ac3eb2510905110759v296ff487paa59d7a7539e9e01@mail.gmail.com> (raw)
In-Reply-To: <20090511064904.3e1d6c34@infradead.org>

On Mon, May 11, 2009 at 15:49, Arjan van de Ven <arjan@infradead.org> wrote:
>> On Mon, May 11, 2009 at 15:05, Arjan van de Ven <arjan@infradead.org>
>> wrote:
>> > On Mon, 11 May 2009 13:34:52 +0200
>> > Kay Sievers <kay.sievers@vrfy.org> wrote:
>> >>
>> >> > - That the other proposals are worse than yours.
>> >>
>> >> I also did, in exactly this thread.
>> >
>> > no you have not. But I'd like you to ;)
>>
>> I did. It's reliability, the race for new devices coming in when you
>> start reading your list and finishing creating the nodes. You will
>> miss these device, which we don't want to work around with another
>> hack. You will have to bring up the machinery that listens to events
>> for new devices, before synthesizing the stuff that is already there.
>
> and this is hard because ?

No, I just object to the "it's free" statement. :)

> (and you are right, while this is not an issue without initramfs,
> because the kernel doesn't return until all probing activity has
> finished, it might be a problem for initramfs, because that executes
> before all the probing is done. But it's not a hard issue, just a
> sequencing issue)

Right, and we would like to get the freedom of doing anything in
parallel to that step. If it's done race-free, it's not really cheap
anymore.

> I personally don't think the 0.06 seconds are a problem, but I got the
> impression that you were trying to optimize this path with your patch.
> (After all, it is pretty much the cost of the thing you're optimizing)

Nah, I wanted to de-couple userspace dependencies to get a working
/dev, so userspace can go ahead and do as many tasks as possible, as
early as possible, without the restrictions to wait for another
process to synthesize a working /dev first. We are optimizing for
robustness and simplicity, and not for speed, that's just the
side-effect, and what motivated us.

>> And the main point is the reliability, let all the weird speed
>> arguments and made-up numbers alone.
>
> I'm sorry, but you're either trying to be obnoxious or telling us your
> own numbers are made up. Since I doubt the former, and neither my nor
> Erics numbers are made up, I'll assume the later...

Sorry, if that was reading wrong. I meant replies like:

"I think your justification for this ``feature'' is strongly flawed.
You claim to save 2 seconds of a process that should take less than a
tenth of a second. You claim flexibility while removing user space
from the policy loop. You claim speed increases when comparing to a
dog slow non-tuned implementation."

I don't even know from what we could save 2 full seconds today.

>> You depend on whatever rather
>> complex userspace to bring your box. And people complain about that
>> for years, and for good reason.
>
> prior to sysfs people depended on MAKEDEV (and the fact that they chose
> to not use tmpfs but a real fs for /dev) for this. It's not that much
> different today. Using tmpfs for /dev is a local choice. It's fully
> optional in fact.. and that's a good thing.

Sure, that's good.

>> On my box we create 12152 files in /sys on bootup, and with devtmps
>> the same code creates 218 simple device nodes with the same call, and
>> this makes bootup reliable, more self-contained, and as a nice side
>> effect makes it faster. Just focus on init=/bin/sh, if you want to see
>> the reason behind all this.
>
> init=/bin/sh is an interesting subcase, sure. It means in the "before
> your patch" scenario that people get the "real /dev directory", and not
> the tmpfs overmount. It's a distro choice what to put there. Fedora puts
> nothing there, Moblin puts only all static-allocated device nodes there.
> I don't know what openSuSE puts there.

Usually it contained a few nodes, but I've seen an empty /dev too.

> People who use init=/bin/sh don't expect a full system, yet they expect
> a certain amount of system that allows them to do system recovery I
> suppose. I don't consider the delta between "static nodes only" and
> "devshmfs" to be significant here. In a recovery scenario, if you WANT
> something dynamic you start the thing to do dynamic by hand. Otherwise
> you want something predictable.

I think it fits nicely to sysfs, and solves the init=/bin/sh problem
quit nicely, and is more "predictable" than the usual /dev content, in
the light of the current state of dynamic numbers.

It's not worth too much to have something predictably non-working. :)

>> We focused on the speed here, because we want to solve the initramfs
>> problem, a problem you solved by getting rid of it entirely, which is
>> what I do on all my own boxes too, but what the distro guys
>> never want to accept.
>
> Now you've lost me. I am missing the link between this and initramfs
> entirely. How you do /dev has extremely little to do with initramfs or
> not. Sure you need the rootfs device node before you can mount root for
> the initramfs case, just like you need the rootfs device node before
> you can fsck it in the non-initramfs case.

Yeah, and random tools you want to start as early as possible, you
need to delay until /dev is working.

> In both cases you want all
> the device nodes as fast as you can,

Which can never be faster than using devtmpfs. :)

> but within the system policy of
> ownership, permissions, selinux contexts, tmpfs mount options etc.

That's what udev still does, and will continue to do so. It's just
de-coupled from bringing up the mandatory basics of the system. All
the policy still lives in udev as it does today, it can just be
applied in the background unlike today.

> And Eric showed that that is a 0.06 second thing.. not a big deal in
> the grand scheme of things, even if you want to boot the whole system
> in 2 seconds like we do.

Yeah, and I object to just another userspace hack which makes things
even more complex as they already are. And it will always be slower
and less robust than the devtmpfs thing too.

> Also you're rather generalizing with "the distro guys"... the Moblin
> distribution already does this for the cases where it is possible. I
> wouldn't be surprised if other distros figured out how to detect this
> case and ditch the initramfs when it's possible, while keeping it and
> doing it cheaply when it's required to have an initramfs.

Yeah, that might be nice to have, but there are not many boxes that
can not get a disk added, and you need a reliable way to cope with
that, and today that is initramfs. It's great that Moblin can do that,
but I meant general purpose distros, which can not know much of the
environment in advance they will run on.

Thanks,
Kay

  reply	other threads:[~2009-05-11 15:00 UTC|newest]

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090509142601.874865281@blue.kroah.org>
2009-05-09 14:37 ` [patch 00/13] devtmpfs patches Greg KH
2009-05-09 14:26   ` [patch 01/13] Driver Core: add nodename callbacks Greg KH
2009-05-10 12:52     ` Stephen Rothwell
2009-05-10 13:19       ` Kay Sievers
2009-05-11 20:51         ` Greg KH
2009-05-09 14:26   ` [patch 02/13] Driver Core: misc: add nodename support for misc devices Greg KH
2009-05-15 19:58     ` Pavel Machek
2009-05-18 14:34       ` Greg KH
2009-05-18 19:59         ` Pavel Machek
2009-05-18 20:28       ` Alan Cox
2009-05-09 14:26   ` [patch 03/13] Driver Core: usb: add nodename support for usb drivers Greg KH
2009-05-09 14:26   ` [patch 04/13] Driver Core: block: add nodename support for block drivers Greg KH
2009-05-09 14:26   ` [patch 05/13] Driver Core: x86: add nodename for cpuid and msr drivers Greg KH
2009-05-09 14:26   ` [patch 06/13] Driver Core: dvb: add nodename for dvb drivers Greg KH
2009-05-09 14:26   ` [patch 07/13] Driver Core: input: add nodename for input drivers Greg KH
2009-05-09 14:26   ` [patch 08/13] Driver Core: sound: add nodename for sound drivers Greg KH
2009-05-09 14:26   ` [patch 09/13] Driver Core: raw: add nodename for raw devices Greg KH
2009-05-09 14:26   ` [patch 10/13] Driver Core: drm: add nodename for drm devices Greg KH
2009-05-09 14:26   ` [patch 11/13] Driver Core: aoe: add nodename for aoe devices Greg KH
2009-05-09 14:26   ` [patch 12/13] Driver Core: bsg: add nodename for bsg driver Greg KH
2009-05-09 14:26   ` [patch 13/13] Driver Core: devtmpfs - driver core maintained /dev tmpfs Greg KH
2009-05-09 15:10   ` [patch 00/13] devtmpfs patches Fabio Comolli
2009-05-09 15:08     ` Greg KH
2009-05-09 15:22       ` Arjan van de Ven
2009-05-09 16:19         ` Greg KH
2009-05-09 19:09           ` Arjan van de Ven
2009-05-10  4:34           ` Arjan van de Ven
2009-05-10  7:48             ` Eric W. Biederman
2009-05-10 14:56               ` Eric W. Biederman
2009-05-10  5:34           ` Andrew Morton
2009-05-10 15:20             ` Greg KH
2009-05-10 15:59               ` Arjan van de Ven
2009-05-10 18:31               ` Peter Zijlstra
2009-05-10 21:19                 ` Alan Cox
2009-05-10 23:47                   ` Kay Sievers
2009-05-11  0:00                     ` Arjan van de Ven
     [not found]                       ` <ac3eb2510905101822t7fde14b3nf2c689621f69c925@mail.gmail.com>
2009-05-11  2:36                         ` Eric W. Biederman
2009-05-11 10:46                           ` Kay Sievers
2009-05-11 10:55                             ` Alan Cox
2009-05-11 11:34                               ` Kay Sievers
2009-05-11 13:05                                 ` [patch 00/13] devtmpfs Arjan van de Ven
2009-05-11 13:28                                   ` Kay Sievers
2009-05-11 13:49                                     ` Arjan van de Ven
2009-05-11 14:59                                       ` Kay Sievers [this message]
2009-05-11 13:10                                 ` [patch 00/13] devtmpfs patches Alan Cox
2009-05-11 14:14                                   ` Kay Sievers
2009-05-11 14:30                                     ` Arjan van de Ven
2009-05-11 14:42                                       ` Kay Sievers
2009-05-11 15:53                                     ` Alan Cox
2009-05-11 16:28                                       ` Kay Sievers
2009-05-11 16:41                                         ` Arjan van de Ven
2009-05-11 17:32                                           ` Kay Sievers
2009-05-11 17:55                                             ` Alan Cox
2009-05-11 18:04                                               ` Kay Sievers
2009-05-11 18:40                                                 ` Alan Cox
2009-05-11 16:56                                         ` Alan Cox
2009-05-11 18:13                             ` Eric W. Biederman
2009-05-11  3:55                         ` Arjan van de Ven
2009-05-11 11:49                         ` Fabio Comolli
2009-05-11 17:47                           ` Greg KH
2009-05-11 16:40                         ` Eric W. Biederman
2009-05-11 17:16                           ` Kay Sievers
2009-05-11 21:13                             ` Eric W. Biederman
2009-05-11  1:00                     ` Andrew Morton
2009-05-11  3:58                       ` Arjan van de Ven
2009-05-11 17:45                       ` Greg KH
2009-05-09 16:46         ` Kay Sievers
2009-05-09 17:11           ` Alan Cox
2009-05-09 18:09             ` Kay Sievers
2009-05-11 17:40   ` David P. Quigley
2009-05-11 17:56     ` Greg KH
2009-05-11 20:41       ` David P. Quigley
2009-05-11 21:05         ` Kay Sievers
2009-05-11 21:19           ` Alan Cox
2009-05-11 21:27             ` Kay Sievers
2009-05-12 12:45           ` Stephen Smalley
2009-05-12 15:10             ` Kay Sievers
2009-05-12 15:35               ` Stephen Smalley
2009-05-12 15:54                 ` Kay Sievers
2009-05-12 22:55                   ` Kay Sievers
2009-05-12 23:22                     ` David P. Quigley
2009-05-12 23:34                       ` Kay Sievers
2009-05-12 23:50                         ` Greg KH
2009-05-13 12:22                     ` Stephen Smalley
2009-05-13 12:58                       ` Kay Sievers
2009-05-13 12:57                         ` Stephen Smalley
2009-05-13 13:09                           ` Kay Sievers
2009-05-13 12:59                       ` Alan Cox
2009-05-13 13:20                   ` David Howells
2009-05-13 13:34                     ` Kay Sievers
2009-05-13 14:20                       ` Kay Sievers
2009-05-13 14:35                         ` Stephen Smalley
2009-05-13 16:45                           ` Kay Sievers
2009-05-13 22:43                             ` Eric W. Biederman
2009-05-13 23:10                               ` Greg KH

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=ac3eb2510905110759v296ff487paa59d7a7539e9e01@mail.gmail.com \
    --to=kay.sievers@vrfy.org \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arjan@infradead.org \
    --cc=ebiederm@xmission.com \
    --cc=fabio.comolli@gmail.com \
    --cc=greg@kroah.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.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®