LWN.net Logo

Advertisement

E-Commerce & credit card processing - the Open Source way!

Advertise here

Virtual memory topics

Virtual memory topics

Posted Jul 20, 2005 6:10 UTC (Wed) by xoddam (subscriber, #2322)
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!


(Log in to post comments)

Re: allocate some long-lived kernel structures in a virtual address space

Posted Jul 22, 2005 1:30 UTC (Fri) by sweikart (guest, #4276) [Link]

This seems appropriate for data structures that cache disks (dentry, inodes), since the extra overhead for the cached data is a small percentage of the cost for a fetch from disk.

-scott

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds