Re: hundreds of mount --bind mountpoints?

David L. Parsley
2001-04-23T13:55:56Z

Christoph Rohland wrote:
>
> Hi David,
>
> On Sun, 22 Apr 2001, David L. Parsley wrote:
> > I'm still working on a packaging system for diskless
> > (quasi-embedded) devices. The root filesystem is all tmpfs, and I
> > attach packages inside it. Since symlinks in a tmpfs filesystem
> > cost 4k each (ouch!), I'm considering using mount --bind for
> > everything.
>
> What about fixing tmpfs instead?

That would be great - are you volunteering? ;-) Seriously - I might be
able to look at what ramfs does and port that to tmpfs for my needs, but
that's about the extent of my kernel hacking skills. For now, mount
--bind looks like it'll work just fine. If somebody wants to fix tmpfs,
I'll be happy to test patches; it'll just change a couple of lines in my
package loading logic (mount --bind x y -> ln -s x y).

What I'm not sure of is which solution is actually 'better' - I'm
guessing that performance-wise, neither will make a noticable
difference, so I guess memory usage would be the deciding factor. If I
can get a lot closer to the size of a symlink (10-20 bytes) that would
be best. The issue with /proc/mounts really shouldn't hurt anything - I
could almost get by without mounting /proc anyway, it's mainly a
convenience.

regards,
David

--
David L. Parsley
Network Administrator
Roanoke College