public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vasily Averin <vvs@sw.ru>
To: Neil Brown <neilb@suse.de>
Cc: David Howells <dhowells@redhat.com>, Kirill Korotaev <dev@sw.ru>,
	devel@openvz.org, Andrew Morton <akpm@osdl.org>,
	Kirill Korotaev <dev@openvz.org>,
	Balbir Singh <balbir@in.ibm.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Olaf Hering <olh@suse.de>, Jan Blunck <jblunck@suse.de>
Subject: Re: [Devel] Re: [PATCH 2.6.19-rc3] VFS: per-sb dentry lru list
Date: Wed, 01 Nov 2006 16:32:03 +0300	[thread overview]
Message-ID: <4548A1D3.9070409@sw.ru> (raw)
In-Reply-To: <17736.16278.85405.497875@cse.unsw.edu.au>

Hello Neil,

Neil Brown wrote:
> On Tuesday October 31, dhowells@redhat.com wrote:
>> Neil Brown <neilb@suse.de> wrote:
>>
>>> When we unmount a filesystem we need to release all dentries.
>>> We currently
>>>   - move a collection of dentries to the end of the dentry_unused list
>>>   - call prune_dcache to prune that number of dentries.
>> This is not true anymore.
> 
> True.  That should read:
> 
>  When we remount a filesystem or invalidate a block device which has a
>  mounted filesystem we call shrink dcache_sb which currently:
>      - moves a collection of dentries to the end of the dentry_unused list
>      - calls prune_dcache to prune that number of dentries.
> 
> but the patch is still valid.
> 
> Any objections to it going in to -mm  and maybe .20 ??

Currently we have 3 type of functions that works with dentry_unused list:

1) prune_dcache(NULL) -- called from shrink_dcache_memory, frees the memory and
requires global LRU. works well in current implementation.
2) prune_dcache(sb)  -- called from shrink_dcache_parent(), frees subtree, LRU
is not need here.  Current implementation uses global LRU for these purposes, it
is ineffective, and patch from Neil Brown fixes this issue.
3) shrink_dcache_sb() -- called when we need to free the unused dentries for
given super block. Current implementation is not effective too, and per-sb LRU
would be the best solution here. On the other hand patch from Neil Brown is much
better than current implementation.

In general I think that we should approve Neil Brown's patch. We (I and Kirill
Korotaev) are ready to acknowledge it when the following remarks fill be fixed:

- it seems for me list_splice() is not required inside prune_dcache(),
- DCACHE_REFERENCED dentries should not be removed from private list to
dentry_unused list, this flag should be ignored if the private list is used,
- count argument should be ignored in this case too, we want to free all the
dentries in private list,
- when we shrink the whole super block we should free per-sb anonymous dentries
too (please see Kirill Korotaev's letter)

Then I'm going to prepare new patch that will enhance the shrink_dcache_sb()
performance:
- we can add new list head into struct superblock and use it in
shrink_dcache_sb() instead of temporal private list. We will check is it empty
in dput() and add the new unused dentries to per-sb list instead of
dentry_unused list.

thank you,
	Vasily Averin

SWsoft Virtuozzo/OpenVZ Linux kernel team

  reply	other threads:[~2006-11-01 13:32 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-25 12:30 [Q] missing unused dentry in prune_dcache()? Vasily Averin
2006-10-25 13:51 ` David Howells
2006-10-25 13:58   ` Vasily Averin
2006-10-25 14:23     ` David Howells
2006-10-26 11:36       ` Vasily Averin
2006-10-26 13:25         ` David Howells
2006-10-27  8:05           ` Vasily Averin
2006-10-27 10:42             ` David Howells
2006-10-27 11:50               ` Vasily Averin
2006-10-27 12:11                 ` David Howells
2006-10-27 13:47                   ` Vasily Averin
2006-10-27 14:29                     ` David Howells
2006-10-27 14:39                       ` Kirill Korotaev
2006-10-27 14:05                   ` [PATCH 2.6.19-rc3] VFS: per-sb dentry lru list Vasily Averin
2006-10-27 18:06                     ` Andrew Morton
2006-10-30 14:24                       ` Vasily Averin
2006-10-30 15:08                         ` Eric Dumazet
2006-10-30 15:34                           ` Kirill Korotaev
2006-10-30 16:09                             ` Eric Dumazet
2006-10-30 15:14                       ` Kirill Korotaev
2006-10-30  4:24                     ` David Chinner
2006-10-30  6:28                       ` [Devel] " Kirill Korotaev
2006-10-31  4:38                         ` Neil Brown
2006-10-31 10:40                           ` David Howells
2006-11-01  6:32                             ` Neil Brown
2006-11-01 13:32                               ` Vasily Averin [this message]
2006-11-14  5:44                                 ` Neil Brown
2006-11-14  6:12                                   ` Vasily Averin
2006-10-31 13:08                           ` Vasily Averin
2006-11-01 10:55                           ` [Devel] " Kirill Korotaev
2006-11-14  4:51                             ` Neil Brown
2006-11-14  9:29                               ` David Howells
2006-10-27 13:42       ` [PATCH 2.6.19-rc3] VFS: missing unused dentry in prune_dcache() Vasily Averin
2006-10-27 14:24         ` David Howells
2006-10-26 11:49 ` [Q] missing unused dentry in prune_dcache()? Vasily Averin
2006-10-26 12:33   ` David Howells
2006-10-26 13:23   ` David Howells
2006-10-26 13:58     ` Vasily Averin
2006-10-26 14:07       ` David Howells
2006-10-27  6:32     ` Vasily Averin
2006-10-27  6:50       ` Vasily Averin
2006-10-27  9:36         ` David Howells
2006-10-31 13:24 ` [Q] missing ->d_delete() in shrink_dcache_for_umount()? Vasily Averin
2006-10-31 15:06   ` David Howells

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=4548A1D3.9070409@sw.ru \
    --to=vvs@sw.ru \
    --cc=akpm@osdl.org \
    --cc=balbir@in.ibm.com \
    --cc=dev@openvz.org \
    --cc=dev@sw.ru \
    --cc=devel@openvz.org \
    --cc=dhowells@redhat.com \
    --cc=jblunck@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=olh@suse.de \
    /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