From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Linux Containers <containers@lists.osdl.org>,
YAMAMOTO Takashi <yamamoto@valinux.co.jp>,
Paul Menage <menage@google.com>,
Dave Hansen <haveblue@us.ibm.com>,
Linux MM Mailing List <linux-mm@kvack.org>,
Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
Pavel Emelianov <xemul@openvz.org>,
Dhaval Giani <dhaval@linux.vnet.ibm.com>,
Balbir Singh <balbir@linux.vnet.ibm.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Eric W Biederman <ebiederm@xmission.com>
Subject: [-mm PATCH 0/9] Memory controller introduction (v4)
Date: Sat, 28 Jul 2007 01:39:37 +0530 [thread overview]
Message-ID: <20070727200937.31565.78623.sendpatchset@balbir-laptop> (raw)
Here's version 4 of the memory controller.
Changelog since version 3
1. Ported to v11 of the containers patchset (2.6.23-rc1-mm1). Paul Menage
helped immensely with a detailed review of v3
2. Reclaim is retried to allow reclaim of pages coming in as a result
of mapped pages reclaim (swap cache growing as a result of RSS reclaim)
3. page_referenced() is now container aware. During container reclaim,
references from other containers do not prevent a page from being
reclaimed from a non-referencing container
4. Fixed a possible race condition spotted by YAMAMOTO Takashi
Changelog since version 2
1. Improved error handling in mm/memory.c (spotted by YAMAMOTO Takashi)
2. Test results included
3. try_to_free_mem_container_pages() bug fix (sc->may_writepage is now
set to !laptop_mode)
Changelog since version 1
1. Fixed some compile time errors (in mm/migrate.c from Vaidyanathan S)
2. Fixed a panic seen when LIST_DEBUG is enabled
3. Added a mechanism to control whether we track page cache or both
page cache and mapped pages (as requested by Pavel)
4. Dave Hansen provided detail review comments on the code.
This patchset implements another version of the memory controller. These
patches have been through a big churn, the first set of patches were posted
last year and earlier this year at
http://lkml.org/lkml/2007/2/19/10
This patchset draws from the patches listed above and from some of the
contents of the patches posted by Vaidyanathan for page cache control.
http://lkml.org/lkml/2007/6/20/92
At OLS, the resource management BOF, it was discussed that we need to manage
RSS and unmapped page cache together. This patchset is a step towards that
TODO's
1. Add memory controller water mark support. Reclaim on high water mark
2. Add support for shrinking on limit change
3. Add per zone per container LRU lists (this is being actively worked
on by Pavel Emelianov)
4. Figure out a better CLUI for the controller
5. Add better statistics
6. Explore using read_unit64() as recommended by Paul Menage
(NOTE: read_ulong() would also be nice to have)
In case you have been using/testing the RSS controller, you'll find that
this controller works slower than the RSS controller. The reason being
that both swap cache and page cache is accounted for, so pages do go
out to swap upon reclaim (they cannot live in the swap cache).
Any test output, feedback, comments, suggestions are welcome! I am committed
to fixing any bugs and improving the performance of the memory controller.
Do not hesitate to send any fixes, request for fixes that is required.
Using the patches
1. Enable Memory controller configuration
2. Compile and boot the new kernel
3. mount -t container container -o mem_container /container
will mount the memory controller to the /container mount point
4. mkdir /container/a
5. echo $$ > /container/a/tasks (add tasks to the new container)
6. echo -n <num_pages> > /container/a/mem_limit
example
echo -n 204800 > /container/a/mem_limit, sets the limit to 800 MB
on a system with 4K page size
7. run tasks, see the memory controller work
8. Report results, provide feedback
9. Develop/use new patches and go to step 1
Test Results
Results for version 3 of the patch were posted at
http://lwn.net/Articles/242554/
The code was also tested on a power box with regular machine usage scenarios,
the config disabled and with a stress suite that touched all the memory
in the system and was limited in a container.
series
res_counters_infra.patch
mem-control-setup.patch
mem-control-accounting-setup.patch
mem-control-accounting.patch
mem-control-task-migration.patch
mem-control-lru-and-reclaim.patch
mem-control-out-of-memory.patch
mem-control-choose-rss-vs-rss-and-pagecache.patch
mem-control-per-container-page-referenced.patch
--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2007-07-27 20:11 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-27 20:09 Balbir Singh [this message]
2007-07-27 20:09 ` [-mm PATCH 1/9] Memory controller resource counters (v4) Balbir Singh
2007-07-27 20:09 ` [-mm PATCH 2/9] Memory controller containers setup (v4) Balbir Singh
2007-07-27 20:10 ` [-mm PATCH 3/9] Memory controller accounting " Balbir Singh
2007-07-27 20:10 ` [-mm PATCH 4/9] Memory controller memory accounting (v4) Balbir Singh
2007-07-31 3:38 ` YAMAMOTO Takashi
2007-07-31 12:44 ` Vaidyanathan Srinivasan
2007-08-15 8:44 ` YAMAMOTO Takashi
2007-08-15 10:02 ` Balbir Singh
2007-07-27 20:10 ` [-mm PATCH 5/9] Memory controller task migration (v4) Balbir Singh
2007-07-27 20:10 ` [-mm PATCH 6/9] Memory controller add per container LRU and reclaim (v4) Balbir Singh
2007-07-30 13:37 ` Dhaval Giani
2007-07-30 13:59 ` Peter Zijlstra
2007-07-30 14:28 ` Gautham R Shenoy
2007-07-31 5:14 ` YAMAMOTO Takashi
2007-07-31 12:55 ` Vaidyanathan Srinivasan
2007-08-07 18:30 ` Vaidyanathan Srinivasan
2007-07-27 20:10 ` [-mm PATCH 7/9] Memory controller OOM handling (v4) Balbir Singh
2007-07-27 20:11 ` [-mm PATCH 8/9] Memory controller add switch to control what type of pages to limit (v4) Balbir Singh
2007-08-13 0:33 ` YAMAMOTO Takashi
2007-08-13 5:38 ` Balbir Singh
2007-08-13 6:04 ` YAMAMOTO Takashi
2007-08-13 6:17 ` Balbir Singh
2007-07-27 20:11 ` [-mm PATCH 9/9] Memory controller make page_referenced() container aware (v4) Balbir Singh
2007-08-08 3:51 ` [-mm PATCH 0/9] Memory controller introduction (v4) KAMEZAWA Hiroyuki
2007-08-08 7:51 ` KAMEZAWA Hiroyuki
2007-08-10 4:49 ` Vaidyanathan Srinivasan
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=20070727200937.31565.78623.sendpatchset@balbir-laptop \
--to=balbir@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=containers@lists.osdl.org \
--cc=dhaval@linux.vnet.ibm.com \
--cc=ebiederm@xmission.com \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=menage@google.com \
--cc=svaidy@linux.vnet.ibm.com \
--cc=xemul@openvz.org \
--cc=yamamoto@valinux.co.jp \
/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