From: Blaisorblade <blaisorblade@yahoo.it>
To: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>,
"Martin J. Bligh" <mbligh@mbligh.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Memory reclaim: permanently pinned dentries (aka libfs/sysfs) and the blunderbuss effect
Date: Thu, 1 Sep 2005 15:23:22 +0200 [thread overview]
Message-ID: <200509011523.23168.blaisorblade@yahoo.it> (raw)
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
reply other threads:[~2005-09-01 14:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200509011523.23168.blaisorblade@yahoo.it \
--to=blaisorblade@yahoo.it \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@mbligh.org \
--cc=viro@parcelfarce.linux.theplanet.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®