From: Rohit Seth <rohitseth@google.com>
To: sekharan@us.ibm.com
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
devel@openvz.org, CKRM-Tech <ckrm-tech@lists.sourceforge.net>
Subject: Re: [ckrm-tech] [patch00/05]: Containers(V2)- Introduction
Date: Wed, 27 Sep 2006 14:28:06 -0700 [thread overview]
Message-ID: <1159392487.23458.70.camel@galaxy.corp.google.com> (raw)
In-Reply-To: <1159386644.4773.80.camel@linuxchandra>
On Wed, 2006-09-27 at 12:50 -0700, Chandra Seetharaman wrote:
> Rohit,
>
> I finally looked into your memory controller patches. Here are some of
> the issues I see:
> (All points below are in the context of page limit of containers being
> hit and the new code starts freeing up pages)
>
> 1. LRU is ignored totally thereby thrashing the working set (as pointed
> by Peter Zijlstra).
As the container goes over the limit, this algorithm deactivates some of
the pages. I agree that the logic to find out the correct pages to
deactivate needs to be improved. But the idea is that these pages go in
front of inactive list so that if there is any memory pressure system
wide then these pages can easily be reclaimed.
> 2. Frees up file pages first when hitting the page limit thereby making
> vm_swappiness ineffective.
Not sure if I understood this part correctly. But the choice when the
container goes over its limit is between swap out some of the anonymous
memory first or writeback some of the dirty file pages belonging to this
container.
> 3. Starts writing back pages when the # of file pages is close to the
> limit, thereby breaking the current writeback algorithm/logic.
That is done so as to ensure processes belonging to container (Whose
limit is hit) are the first ones getting penalized. For example, if you
run a tar in a container with 100MB limit then the dirty file pages will
be written back to disk when 100MB limit is hit). Though I will be
adding a HARD_LIMIT on page cache flag and the strict limit will be only
maintained if this container flag is set.
> 4. MAPPED files are not counted against the page limit. why ?. This
> affects reclamation behavior and makes vm_swappiness ineffective.
num_mapped_pages only indicates how many page cache pages are mapped in
user page tables. More of an accounting variable.
> 5. Starts freeing up pages from the first task or the first file in the
> linked list. This logic unfairly penalizes the early members of the
> list.
This is the part that I've to fix. Some per container variables that
remembers the last values will help here.
> 6. Both active and inactive pages use physical pages. But, the
> controller only counts active pages and not inactive pages. why ?
The thought is, it is okay for containers to go over its limit as long
as there is enough memory in the system. When there is any memory
pressure then the inactive (+ dereferenced) pages get swapped out thus
penalizing the container. I'm also thinking of having hard limit for
anonymous pages beyond which the container will not be able to grow its
anonymous pages.
> 7. Page limit is checked against the sum of (anon and file pages) in
> some places and against active pages at some other places. IMO, it
> should be always compared to the same value.
>
It is checked against sum of anon+file pages at the time when new pages
is getting allocated. But as the reclaimer activate the pages, so it is
also important to make sure the number of active pages is not going
above its limit.
Thanks for your comments,
-rohit
next prev parent reply other threads:[~2006-09-27 21:28 UTC|newest]
Thread overview: 125+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-20 2:16 Rohit Seth
2006-09-20 13:06 ` [Devel] " Cedric Le Goater
2006-09-20 16:45 ` Rohit Seth
2006-09-20 16:25 ` Christoph Lameter
2006-09-20 16:44 ` Nick Piggin
2006-09-20 16:48 ` Christoph Lameter
2006-09-20 17:07 ` Nick Piggin
2006-09-20 17:12 ` Christoph Lameter
2006-09-20 22:27 ` Paul Jackson
2006-09-20 22:59 ` Christoph Lameter
2006-09-20 17:26 ` Rohit Seth
2006-09-20 17:37 ` [ckrm-tech] " Paul Menage
2006-09-20 17:38 ` Christoph Lameter
2006-09-20 17:42 ` [ckrm-tech] " Paul Menage
2006-09-20 18:07 ` Rohit Seth
2006-09-20 19:51 ` Christoph Lameter
2006-09-20 20:06 ` Paul Jackson
2006-09-20 22:58 ` Paul Jackson
2006-09-20 23:02 ` Christoph Lameter
2006-09-20 23:33 ` Rohit Seth
2006-09-20 23:36 ` Christoph Lameter
2006-09-20 23:39 ` Rohit Seth
2006-09-20 23:51 ` Christoph Lameter
2006-09-21 0:05 ` Paul Jackson
2006-09-21 0:09 ` [ckrm-tech] " Paul Menage
2006-09-20 23:26 ` Rohit Seth
2006-09-20 23:31 ` Christoph Lameter
2006-09-21 0:51 ` [Lhms-devel] " KAMEZAWA Hiroyuki
2006-09-21 1:33 ` KAMEZAWA Hiroyuki
2006-09-21 1:36 ` [ckrm-tech] " Paul Menage
2006-09-20 22:51 ` Paul Jackson
2006-09-20 23:01 ` Christoph Lameter
2006-09-20 23:22 ` Rohit Seth
2006-09-20 23:45 ` Paul Jackson
2006-09-20 17:34 ` Alan Cox
2006-09-20 17:15 ` Christoph Lameter
2006-09-20 17:48 ` Alan Cox
2006-09-20 17:35 ` Christoph Lameter
2006-09-20 23:29 ` Paul Jackson
2006-09-20 23:18 ` Paul Jackson
2006-09-20 17:30 ` [ckrm-tech] " Paul Menage
2006-09-20 23:37 ` Paul Jackson
2006-09-20 23:53 ` Paul Menage
2006-09-21 0:07 ` Paul Jackson
2006-09-21 0:10 ` Paul Menage
2006-09-21 0:17 ` Paul Jackson
2006-09-20 18:34 ` Chandra Seetharaman
2006-09-20 18:43 ` Paul Menage
2006-09-20 18:54 ` Chandra Seetharaman
2006-09-20 19:25 ` Paul Menage
2006-09-20 19:35 ` Chandra Seetharaman
2006-09-20 19:57 ` Paul Menage
2006-09-21 0:30 ` Chandra Seetharaman
2006-09-21 0:33 ` Paul Jackson
2006-09-21 0:50 ` Chandra Seetharaman
2006-09-21 0:34 ` Paul Menage
2006-09-20 20:49 ` Paul Jackson
2006-09-20 20:51 ` Paul Menage
2006-09-20 21:04 ` Paul Jackson
[not found] ` <6599ad830609201605s2fc1ccbdse31e3e60a50d56bc@mail.google.com>
2006-09-20 23:54 ` Paul Jackson
2006-09-20 23:57 ` Paul Menage
2006-09-21 0:09 ` Paul Jackson
2006-09-21 1:25 ` Chandra Seetharaman
2006-09-21 0:45 ` Chandra Seetharaman
2006-09-21 0:51 ` Paul Jackson
2006-09-20 19:55 ` Christoph Lameter
2006-09-20 20:27 ` Paul Jackson
2006-09-21 17:02 ` Srivatsa Vaddagiri
2006-09-21 19:29 ` Paul Jackson
2006-09-20 20:11 ` Paul Jackson
2006-09-20 20:17 ` Paul Menage
2006-09-20 19:52 ` Christoph Lameter
2006-09-21 0:31 ` Chandra Seetharaman
2006-09-21 0:36 ` Paul Jackson
2006-09-21 0:42 ` Paul Menage
2006-09-21 1:45 ` Chandra Seetharaman
2006-09-21 1:52 ` Paul Menage
2006-09-21 20:06 ` Chandra Seetharaman
2006-09-21 20:10 ` Paul Menage
2006-09-21 21:44 ` Chandra Seetharaman
2006-09-21 22:09 ` Paul Menage
2006-09-22 0:06 ` Chandra Seetharaman
2006-09-22 0:13 ` Paul Menage
2006-09-22 0:55 ` Chandra Seetharaman
2006-09-22 0:24 ` Paul Jackson
2006-09-22 0:57 ` Chandra Seetharaman
2006-09-22 1:11 ` Paul Jackson
2006-09-21 21:59 ` Paul Jackson
2006-09-21 22:07 ` Paul Menage
2006-09-21 22:48 ` Paul Jackson
2006-09-20 19:09 ` Chandra Seetharaman
[not found] ` <4510D3F4.1040009@yahoo.com.au>
2006-09-20 16:26 ` Christoph Lameter
2006-09-20 16:56 ` Nick Piggin
2006-09-20 17:08 ` Christoph Lameter
2006-09-20 17:19 ` Nick Piggin
2006-09-20 17:30 ` Christoph Lameter
2006-09-20 18:03 ` Nick Piggin
2006-09-20 17:40 ` Alan Cox
2006-09-20 16:27 ` Rohit Seth
[not found] ` <1158751720.8970.67.camel@twins>
[not found] ` <4511626B.9000106@yahoo.com.au>
[not found] ` <1158767787.3278.103.camel@taijtu>
2006-09-20 17:00 ` Nick Piggin
2006-09-20 17:23 ` [ckrm-tech] " Paul Menage
2006-09-20 17:36 ` Alan Cox
2006-09-20 17:30 ` Nick Piggin
2006-09-20 17:50 ` Rohit Seth
2006-09-20 17:52 ` Christoph Lameter
2006-09-20 18:06 ` Peter Zijlstra
2006-09-20 18:14 ` Rohit Seth
2006-09-20 18:27 ` Peter Zijlstra
2006-09-20 18:33 ` [ckrm-tech] " Paul Menage
2006-09-20 18:38 ` Rohit Seth
2006-09-20 19:48 ` Paul Jackson
2006-09-20 19:48 ` Christoph Lameter
2006-09-20 19:51 ` [ckrm-tech] " Paul Menage
2006-09-20 18:37 ` Peter Zijlstra
2006-09-20 18:57 ` Rohit Seth
2006-09-27 19:50 ` [ckrm-tech] " Chandra Seetharaman
2006-09-27 21:28 ` Rohit Seth [this message]
2006-09-27 22:24 ` Chandra Seetharaman
2006-09-28 8:01 ` Balbir Singh
2006-09-28 18:31 ` Rohit Seth
2006-09-28 21:53 ` Balbir Singh
2006-09-29 0:22 ` Rohit Seth
2006-09-28 18:12 ` Rohit Seth
2006-09-28 20:23 ` Chandra Seetharaman
2006-09-28 21:38 ` Rohit Seth
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=1159392487.23458.70.camel@galaxy.corp.google.com \
--to=rohitseth@google.com \
--cc=ckrm-tech@lists.sourceforge.net \
--cc=devel@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sekharan@us.ibm.com \
/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
Powered by JetHome