Reclaim space from unused ramdisk?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I wonder if it would be possible to somehow reclaim space that has
been previously reserved for a ramdisk without rebooting.  I read the
ramdisk docs in the latest kernel source and it seems that it is not
currently possible.  However, the kernel keeps track of the memory
allocated for said ramdisks; would it not be possible with root (or
even kernel) permissions to remove the flag that prevents the VM
subsystem from reclaiming that space?  I realize that rot permissions
may not be high enough.  In that case, could a module be written that
takes a device name as a parameter then uses it to look up the
reserved memory that device uses, then resets the necessary flag and
finally unloads itself?  It would have to check that the filesystem
was unmounted, of course.

How difficult would this be to write?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux