[lkml]   [2006]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Per-superblock unused dentry LRU lists V3
David Chinner wrote:
> On Tue, May 30, 2006 at 05:04:38PM +0200, Jan Blunck wrote:
>>> David Chinner <> wrote:
>>> -
>>> void shrink_dcache_sb(struct super_block * sb)
>>> {
> ....
>>> + __shrink_dcache_sb(sb, &sb->s_dentry_lru_nr, 0);
>>> }
>> This doesn't prune all the dentries on the unused list. The parents of the
>> pruned dentries are added to the unused list. Therefore just shrinking
>> sb->s_dentry_lru_nr dentries isn't enough.
> Yes, you are right, Jan. I'm surprised I didn't see problems due to this.
> The original patch got this right by shrinking in this case until the list
> was empty. I'll wrap this one in a while loop...
> Cheers,
> Dave.

Good catch,

I suspect the reason why the problem never showed up is because select_parent()
would take care of ensuring that the parent entries move to LRU list (this is
the case of regular umounts, which do not call shrink_dcache_sb() directly).

Maybe even the dentry_unused list should be per-superblock now.

Balbir Singh,
Linux Technology Center,
IBM Software Labs
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-05-31 05:05    [W:0.048 / U:0.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site