Memory reclaim: permanently pinned dentries (aka libfs/sysfs) and the blunderbuss effect

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

 



Martin J. Bligh described at OLS the "blunderbuss effect", i.e. the 
inefficiency of the dentry cache shrinker at freeing whole pages, since we 
could leave (worst-case) one dentry per page because it's at the end of the 
LRU list.

Pinned dentries (in first place libfs ones, but he also includes directories 
one - I think they are just hard to free, not really pinned) are allocated 
from the common dentry_cache, i.e. mixed with normal ones - why don't we fix 
that?

It seems that adding an (optional) flag to a new __d_alloc (with d_alloc 
becoming its wrapper) would be enough, since dentries are always allocated 
directly by filesystems (either on lookup or on creation of the pinned 
dentry). Or call it d_alloc_lively().

Also, it seems that the slab allocator willl allocate objects at fixed 
locations inside a page (even with page colouring, colour_offset is fixed 
per-slab and saved)*, once that slab has been allocated... so if we add a 
"DCACHE_FREED" flag and zero slabs content on alloc (at least for this slab), 
we could maybe enumerate all dentries in a page and try to free them, to 
finally free the whole slab.

* Otherwise this problem could probably be fixed some way.
-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade


	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it
-
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