Messages in this thread | | | Date | Tue, 26 Jul 2005 15:16:58 -0700 | From | Mike Mohr <> | Subject | Reclaim space from unused ramdisk? |
| |
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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |