Re: mem=16MB laptop testing

From: Andrew Morton
Date: Tue Oct 14 2003 - 07:28:42 EST


Russell King <rmk+lkml@xxxxxxxxxxxxxxxx> wrote:
>
> On Tue, Oct 14, 2003 at 05:10:31AM -0700, Andrew Morton wrote:
> > Russell King <rmk+lkml@xxxxxxxxxxxxxxxx> wrote:
> > > On Tue, Oct 14, 2003 at 04:56:14AM -0700, Andrew Morton wrote:
> > > > I guess not mounting /sys doesn't help here. It would be nice. Maybe with
> > > > a CONFIG_I_WILL_NEVER_MOUNT_SYSFS we could avoid all those allocations.
> > >
> > > I believe sysfs is required for mounting the root filesystem - see
> > > name_to_dev_t in init/do_mounts.c.
> >
> > OK. But it looks like if /sys is empty and you provide "root=03:02" then
> > things will still work. It's a matter of trying it...
>
> Uhh?
>
> dev_t name_to_dev_t(char *name)
> {
> dev_t res = 0;
>
> sys_mkdir("/sys", 0700);
> if (sys_mount("sysfs", "/sys", "sysfs", 0, NULL) < 0)
> goto out;
>
> ...
>
> out:
> sys_rmdir("/sys");
> return res;
> }
>
> If sysfs can't be mounted, then it looks like we can't even decode a
> numeric major:minor root device specification.

Well I was proposing that sysfs be present and mountable, but empty. ie:
make sysfs_create() a no-op. Something like that. Additional touchups may
be needed of course.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/