Re: mem=16MB laptop testing

Andrew Morton
2003-10-14T12:27:43Z

Russell King <rmk+lkml@arm.linux.org.uk> wrote:
>
> On Tue, Oct 14, 2003 at 05:10:31AM -0700, Andrew Morton wrote:
> > Russell King <rmk+lkml@arm.linux.org.uk> 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.