Comment # 11 on bug 1048190 from
(In reply to Franck Bui from comment #10)
> (In reply to Michal Hocko from comment #9)
> > 
> > I do not think so because, again that is not a generally advisable thing to
> > do. I can imagine somebody not wanting to increase shmem size when a new
> > memory is added or allow smaller or large portion of new memory to be
> > considered. Kernel doesn't know about that.
> 
> In this case, the issue is not about policy but the way it's implemented: 
> remounting all the tmpfs fs from userspace seems pretty ugly.

Ohh, I do not pretend this is an art of beauty at all. But it would be even
more uggly to do from the kernel IMHO. That would basically require kernel
hooking into the memory hotplug and rebinding each shmem filesystem from there.
Now the maximum size can be specified in an absolute size or in % and we lose
that information during the mount so we do not know whether the change the
limit at all. Now you could rightfully object that increasing the size
unconditionally from the udev rule is not correct for the same reason. I would
agree. The only reason we do so is because some systems online a large part of
memory too late after most shmem filesystems are mounted already. So it is a
workaround. If somebody dislikes this decision it is trivial to override this
policy because it is in userspace. If it was in the kernel our chances would be
worse (there would have to be an explicit tunable to control this behavior).


You are receiving this mail because: