From: Pavel Emelyanov <xemul@parallels.com>
To: Dave Chinner <david@fromorbit.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
Hugh Dickins <hughd@google.com>, Nick Piggin <npiggin@kernel.dk>,
Rik van Riel <riel@redhat.com>,
Dave Hansen <dave@linux.vnet.ibm.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [RFC][PATCH 0/13] Per-container dcache management (and a bit more)
Date: Mon, 04 Jul 2011 09:32:49 +0400 [thread overview]
Message-ID: <4E115081.4040008@parallels.com> (raw)
In-Reply-To: <20110620004946.GL561@dastard>
>> Again I don't think the
>> objective is a perfect accounting but just something that happen to
>> works better, if one wants perfect accounting of the memory and bytes
>> utilized by the on-disk image there are other types of virt available.
>
> IOWs, they want per-container resource limits. I'd suggest that any
> solution along these lines needs to use existing infrastructure (i.e
> cgroups) to control the resource usage of a given container...
The problem is that dcache memory is not tied to ANY group of tasks, while
the cgroups engine's idea is to control the resource consumption of a task
group. Thus the cgroup engine is not suitable for this.
Besides, the dcache is likely to get shared between several tasks (task groups)
and thus we'll face the same problems we're now having the the memory controller.
However, I'm open for discussion if you propose some way for extending it
on resources, that are not directly related to tasks.
> FYI, the way I am trying to solve this problem is as follows:
>
> 1. Encode the reclaim dependency in the VFS cache memory
> reclaim implementation.
>
> -> per-sb shrinker implementation
> -> per-sb LRU lists
> -> per-sb locking
> -> binds dentry, inode and filesystem inode
> cache reclaim together
> -> allows LRU scalability to be adressed
> indepenedently at a future time
> -> patches already out for review
>
> 2. provide global cache limiting at inode/dentry allocation
> time
>
> -> calls per-sb shrinker to free inodes on same sb
> -> can be done asynchrounously
> -> no new locking/lifecycle issues
> -> no cross-sb reference/locking issues
For 1. and 2. do s/per-sb/per-mob/
So how does it differ from the mobs concept?
> 3. add cache size limiting to cgroup infrastructure
> -> just another level of abstraction to existing
> infrastructure
> -> ties in with existing resource limiting
> mechanisms in the kernel
>
> Basically the concept of "mobs" ends up being subsumed by cgroups,
Nope, the mobs are independent from cgroups.
> but only at the LRU level and has no hooks into the dentry
> cache heirarchy at all.
What do you mean by this? The mob is tightly coupled with the dentry cache!
> i.e. reclaim works just like it does now, but it is simply container-aware.
No it is not - it just breaks the global dentry LRU into smaller ones. No
containers at that point at all.
> We're already having to solve
> these issues for cgroup-aware dirty page writeback (i.e. making the
> bdi-flusher infrastructure cgroup aware), so this is not as big a
> leap as you might think. It also avoids the need for a one-off
> configuration ABI just for controlling the dentry cache....
Controlling the dirty sets (of both pages and inodes) is an important task
of course, but putting the dcache management as an essential part of this
is the wrong way to go methinks.
> Cheers,
>
> Dave.
next prev parent reply other threads:[~2011-07-04 5:34 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-03 12:14 [RFC][PATCH 0/13] Per-container dcache management (and a bit more) Pavel Emelyanov
2011-05-03 12:15 ` [PATCH 1/13] vfs: Lighten r/o rename_lock lockers Pavel Emelyanov
2011-05-03 12:15 ` [PATCH 2/13] vfs: Factor out rename_lock locking Pavel Emelyanov
2011-05-03 12:16 ` [PATCH 3/13] vfs: Make the rename_lock per-sb Pavel Emelyanov
2011-05-03 12:16 ` [PATCH 4/13] vfs: Factor out tree (of four) shrinkers code Pavel Emelyanov
2011-05-03 12:17 ` [PATCH 5/13] vfs: Make dentry LRU list global Pavel Emelyanov
2011-05-03 12:17 ` [PATCH 6/13] vfs: Turn the nr_dentry into percpu_counter Pavel Emelyanov
2011-05-03 12:18 ` [PATCH 7/13] vfs: Limit the number of dentries globally Pavel Emelyanov
2011-05-03 12:18 ` [PATCH 8/13] vfs: Introduce the dentry mobs Pavel Emelyanov
2011-06-18 13:40 ` Andrea Arcangeli
2011-05-03 12:18 ` [PATCH 9/13] vfs: More than one mob management Pavel Emelyanov
2011-05-03 12:19 ` [PATCH 10/13] vfs: Routnes for setting mob size and getting stats Pavel Emelyanov
2011-05-03 12:19 ` [PATCH 11/13] vfs: Make shrink_dcache_memory prune dcache from all mobs Pavel Emelyanov
2011-05-03 12:20 ` [PATCH 12/13] vfs: Mobs creation and mgmt API Pavel Emelyanov
2011-05-03 12:20 ` [PATCH 13/13] vfs: Dentry mobs listing in proc Pavel Emelyanov
2011-05-06 1:05 ` [RFC][PATCH 0/13] Per-container dcache management (and a bit more) Dave Chinner
2011-05-06 12:15 ` Pavel Emelyanov
2011-05-07 0:01 ` Dave Chinner
2011-05-10 11:18 ` Pavel Emelyanov
2011-06-18 13:30 ` Andrea Arcangeli
2011-06-20 0:49 ` Dave Chinner
2011-07-04 5:32 ` Pavel Emelyanov [this message]
2011-05-23 6:43 ` Pavel Emelyanov
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=4E115081.4040008@parallels.com \
--to=xemul@parallels.com \
--cc=aarcange@redhat.com \
--cc=dave@linux.vnet.ibm.com \
--cc=david@fromorbit.com \
--cc=hughd@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=npiggin@kernel.dk \
--cc=riel@redhat.com \
--cc=viro@zeniv.linux.org.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.