public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Olaf Hering <olaf@aepfle.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	Roman Zippel <zippel@linux-m68k.org>,
	linux-kernel@vger.kernel.org, klibc@zytor.com, torvalds@osdl.org
Subject: Re: klibc and what's the next step?
Date: Tue, 11 Jul 2006 14:29:49 +0400	[thread overview]
Message-ID: <44B37D9D.8000505@tls.msk.ru> (raw)
In-Reply-To: <20060711044834.GA11694@suse.de>

Olaf Hering wrote:
> On Tue, Jun 27, 2006 at 03:12:53PM +0200, Roman Zippel wrote:
> 
>> So anyone who likes to see klibc merged, because it will solve some kind 
>> of problem for him, please speak up now. Without this information it's 
>> hard to judge whether we're going to solve the right problems.
> 
> I do not want to see kinit merged.
> It (the merge into linux-2.6.XY) doesnt solve any real problem in the long term.
> Instead, make a kinit distribution. Let it install itself into an obvious
> location on the development box (/usr/lib/kinit/* or whatever), remove all
> code behind prepare_namespace() and put a disclaimer into the Linux 2.6.XY
> releasenote stating where to grab and build a kinit binary:

kinit SHOULD go with kernel. To stay compatible, to be able to move some more
stuff to it from kernelspace with time, and so on.

The question was about klibc, not kinit.

> The rationale is that there are essentially 2 kind of consumers:
> 
> One is the kind that builds static kernels and uses no initrd of any kind.
> For those people, the code and interfaces behind prepare_namespace() has
> not changed in a long time.
> They will install that kinit binary once and it will continue to work with
> kernels from 2.6.6 and later, when "/init" support was merged. Or rather
> from 2.6.1x when CONFIG_INITRAMFS_SOURCE was introduced.

And stuff will break on them after eg uswsusp move into kinit etc.

> The other group is the one that uses some sort of initrd (loop mount or cpio),
> created with tools from their distribution.
> Again, they should install that kinit binary as well because kinit emulates
> the loop mount handling of /initrd.image. This is for older distributions
> that still create a loop mounted initrd.

There's no need for loop-mounting of any initrd.images.  Initramfs (cpio image,
possible gzipped) works just fine, and it will NOT go away because something
should do the unpacking/loading of that image so that kinit &Co will run.
There's no need for old initrd+pivot_root at all.  Only the ones who are,
for some reason, didn't switch to initramfs yet.  And I personally see no
reasons not to switch - initramfs (rootfs) concept is much more clean and
easy to handle and gives more possibilities than initrd.

> A distribution that uses a cpio archive (SuSE does that since 2.6.5 in SLES9,
> and since 2.6.13 in 10.0) has no need for the kinit. mkinitrd creates a
> suitable cpio archive and the contained "/init" executable does all the 
> hard work (as stated in the comment in init/main.c:init())

It does need that.  At least partially.  Or, it should provide compatible
replacement for the next kernel you compile -- See above, with more stuff
moved from kernel to kinit (or utils based on it), the more tricky it will
be to maintain such a beast outside of the kernel.

> In earlier mails you stated that having kinit/klibc in the kernel sources
> would make it easier to keep up with interface changes.
> What interface changes did you have in mind, and can you name any relevant
> interface changes that were made after 2.6.0 which would break an external
> kinit?

Ok.  To be fair, except of swsusp (which i don't use anyway, as it does not
work on VIA C3-based boxes), I can't think of anything more.  The rest (like
dhcp (kernel-level IP autoconfig), etc) is already in kinit, and it should
be compatible with future kernels.

So hmm.  Maybe my arguments above are wrong.

Once that same swsusp is moved to kinit, the latter should be updated --
that's basically all.

> 24-klibc-basic-build-infrastructure.patch forces the klibc build, even for
> setups where it is not required. CONFIG_KLIBC, if it ever gets merged, should
> be optional. usr/initramfs.default as example has a hard requirement.
> If CONFIG_KLIBC is off, only /dev, /dev/console and /root should be part of
> the cpio archive in the .init.ramfs ELF section. The exectuables come from
> the cpio initrd.

Agreed 100%.

> I once looked briefly for a patch that would introduce something like 
> CONFIG_OBSOLETE_PREPARE_NAMESPACE which will make all code behind
> prepare_namespace() optional. For SuSE, this dead code just wastes build time,
> and it increases the vmlinux file size. While looking for ROOT_DEV users,
> it wasnt obvious to me what requirements mtd has, so I postponed that attempt.
> I'm sure ROOT_DEV can go as well in your patch named
> 29-remove-in-kernel-root-mounting-code.patch
> All can be done outside the kernel code, and there is the root= cmdline option.
> 
> 
> As others have stated in this thread, the code behind prepare_namespace() is 
> very simple. It doesnt know anything abould lvm etc, nor about mount by
> filesystem UUID/LABEL nor does it know how to deal with properly with new
> technologies like iSCSI, evms, persistant storage device names, usb-storage,
> sbp2 or async device probing.
> Should all that knowledge end up in the kernel source on day?
> An external kinit for such features sounds more logical.
> If there are no plans to add these features, that just means that kinit
> is real static functionality-wise. So having it as external binary makes
> even more sense, given the amount of build time to spent for every new kernel.

Nod.

/mjt

> Not really related to kinit per se:
> There is also not much distribution specific inside initramfs (beside the file
> locations to actually create a suitable cpio archive). There is still the
> boundary between "/init" and the real init on the final root filesystem.
> Otherwise static kernels would not be usable on these distributions.
> I'm sure a mkinitrd that works for every distribution out there is possible.


  reply	other threads:[~2006-07-11 10:29 UTC|newest]

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-26  0:57 [klibc 00/43] klibc as a historyless patchset H. Peter Anvin
2006-06-27 13:12 ` klibc and what's the next step? Roman Zippel
2006-06-27 13:39   ` Jeff Garzik
2006-06-27 16:42     ` [klibc] " Greg KH
2006-06-28 23:46       ` Roman Zippel
2006-06-27 17:01     ` Andi Kleen
2006-06-27 17:11       ` H. Peter Anvin
2006-06-27 17:40         ` Andi Kleen
2006-06-27 17:45           ` H. Peter Anvin
2006-06-27 20:22             ` Joshua Hudson
2006-06-28  5:47               ` H. Peter Anvin
2006-06-29  0:04             ` Roman Zippel
2006-07-03 18:30               ` Rob Landley
2006-07-03 18:46                 ` [klibc] " maximilian attems
2006-07-04  1:36                   ` Jeff Bailey
2006-07-04  2:02                     ` H. Peter Anvin
2006-06-27 14:07   ` Jon Smirl
2006-06-27 14:40   ` Jeff Bailey
2006-06-27 19:47   ` Milton Miller
2006-06-28 23:56     ` Roman Zippel
2006-06-29  0:34       ` H. Peter Anvin
2006-06-29 23:33         ` Roman Zippel
2006-06-30  8:00           ` Gerd Hoffmann
2006-06-30 18:08             ` H. Peter Anvin
2006-06-30 22:58               ` Michael Tokarev
2006-06-30 18:11   ` Pavel Machek
2006-06-30 23:04     ` Michael Tokarev
2006-06-30 23:15       ` H. Peter Anvin
2006-07-01 10:56         ` [klibc] " Jeff Bailey
2006-07-01 15:05           ` Theodore Tso
2006-07-01 20:08             ` Linus Torvalds
2006-07-01 21:58               ` Al Viro
2006-07-01 22:31               ` H. Peter Anvin
2006-07-02  0:05               ` Theodore Tso
2006-07-02  0:17                 ` H. Peter Anvin
2006-07-02  0:38                   ` Theodore Tso
2006-07-02  0:50                     ` H. Peter Anvin
2006-07-01 22:22             ` H. Peter Anvin
2006-07-03  7:23             ` Gerd Hoffmann
2006-07-03 21:36             ` Pavel Machek
2006-07-01 15:22           ` H. Peter Anvin
2006-07-01 15:47           ` Jeff Garzik
2006-06-30 23:32       ` Pavel Machek
2006-07-11  4:48   ` Olaf Hering
2006-07-11 10:29     ` Michael Tokarev [this message]
2006-07-11 11:27       ` [klibc] " Olaf Hering
2006-07-11 16:24         ` H. Peter Anvin
2006-07-11 16:40           ` Olaf Hering
2006-07-11 17:05             ` Jeff Garzik
2006-07-11 17:16               ` Olaf Hering
2006-07-11 17:23                 ` H. Peter Anvin
2006-07-11 17:30                   ` Olaf Hering
2006-07-11 17:46                     ` H. Peter Anvin
2006-07-11 18:01                       ` Olaf Hering
2006-07-11 18:04                         ` H. Peter Anvin
2006-07-11 18:10                           ` Olaf Hering
2006-07-11 18:17                             ` H. Peter Anvin
2006-07-11 19:15                               ` Olaf Hering
2006-07-11 19:29                                 ` Linus Torvalds
2006-07-11 19:38                                   ` H. Peter Anvin
2006-07-11 19:51                                     ` Linus Torvalds
2006-07-11 19:59                                       ` Jeff Garzik
2006-07-11 20:01                                       ` Theodore Tso
2006-07-11 20:11                                       ` Olaf Hering
2006-07-11 20:57                                       ` H. Peter Anvin
2006-07-11 18:03                 ` H. Peter Anvin
2006-07-11 18:06                   ` Michael Tokarev
2006-07-11 18:15                   ` Olaf Hering
2006-07-11 18:22                     ` H. Peter Anvin
2006-07-11 18:53                       ` Alan Cox
2006-07-11 18:46                         ` H. Peter Anvin
2006-07-11 20:06                       ` Olaf Hering
2006-07-11 20:22                         ` Olaf Hering
2006-07-11 21:22                         ` Greg KH
2006-07-12 16:54                           ` Olaf Hering
2006-07-12 16:58                             ` Arjan van de Ven
2006-07-12 17:01                               ` Olaf Hering
2006-07-12 21:36                             ` Greg KH
2006-07-11 17:55               ` Michael Tokarev
2006-07-11 17:46             ` Michael Tokarev
2006-07-11 17:52               ` Olaf Hering
2006-07-11 18:02                 ` Michael Tokarev
2006-07-11 10:51     ` Sam Ravnborg
2006-07-11 13:45     ` Theodore Tso
2006-07-11 14:28       ` Michael Tokarev
2006-07-11 15:13       ` [klibc] " Olaf Hering
2006-07-11 15:30         ` Adrian Bunk
2006-07-11 15:47           ` Olaf Hering
2006-07-11 16:21         ` Alan Cox
2006-07-11 14:32     ` Rene Herman
2006-07-12 15:23       ` David Lang
2006-07-13 11:58     ` Pavel Machek
2006-06-27 18:59 ` [klibc 00/43] klibc as a historyless patchset Milton Miller
2006-06-27 19:12   ` H. Peter Anvin
2006-06-27 20:39     ` Milton Miller

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=44B37D9D.8000505@tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=hpa@zytor.com \
    --cc=klibc@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olaf@aepfle.de \
    --cc=torvalds@osdl.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