Virtual memory topics
Posted Jul 20, 2005 6:10 UTC (Wed) by xoddam
Parent article: Kernel Summit 2005: Virtual memory topics
A number of kernel structures - dentries, inodes, and address_space structures in particular - are widespread, interdependent, and hard to get rid of. There are ways to ask the system to reduce the numbers of such structures, but it's still hard to free full pages (much less groups of pages) this way.
The kernel data which contributes most to memory fragmentation is particularly these long-lived, heap-allocated objects. Rather than adding a fixed-size 'zone' for all kernel heap memory, would it not make sense to allocate such long-lived structures in a virtual address space (thus relocatable and resizable, if not swappable) rather than in the kernel's direct-mapped space? Such a space could be treated like user memory and require copy_*_user(), or (at the cost of some complexity) the kernel mapping could acquire a new virtual region.
*Particular* objects -- the inodes of swap devices, some address_spaces -- must be available at all times on pain of deadlock, but there's no reason to privilege all objects of the same type with the ability to pin memory for the lifetime of the kernel!
to post comments)