Hi, Balbir-san
This is a patch set against memory cgroup I have now.
Reflected comments I got.
=
[1] charge refcnt fix patch - avoid charging against a page which is being
uncharged.
[2] fix-err-handling patch - remove unnecesary unlock_page_cgroup()
.
This patch add a test at charging to verify page_cgroup's refcnt is
greater than 0. If not, unlock and retry.
Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED]
mm/memcontrol.c |9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
Index: linux-2.6.23-rc8-mm2/mm/memcontrol.c
This unlock_page_cgroup() is unnecessary.
Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED]
mm/memcontrol.c |2 --
1 file changed, 2 deletions(-)
Index: linux-2.6.23-rc8-mm2/mm/memcontrol.c
===
--- linux-2.6.23-rc8-mm2.orig
/migration.
__isolate_lru_page() doesn't moves page !PageLRU pages, then, it will
be safe to avoid touching the page and its page_cgroup.
Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED]
mm/memcontrol.c | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
Index: devel-2.6.23
:
- reflected comments.
- divided a patche to !PageLRU patch and migration patch.
Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED]
include/linux/memcontrol.h | 19 +++
mm/memcontrol.c| 43 +++
mm/migrate.c
cgroup successfully.
Tested and worked well on x86_64/fake-NUMA system.
Changelog:
- added a new interface force_relcaim.
- changes spin_lock to spin_lock_irqsave().
Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED]
mm/memcontrol.c | 79
This patch adds follwoing functions.
- clear_page_cgroup(page, pc)
- page_cgroup_assign_new_page_group(page, pc)
Mainly for cleaunp.
A manner check page-cgroup again after lock_page_cgroup() is
implemented in straight way.
Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED]
mm
On Tue, 09 Oct 2007 16:39:48 +0530
Balbir Singh [EMAIL PROTECTED] wrote:
+static inline int
+page_cgroup_assign_new_page_cgroup(struct page *page, struct page_cgroup
*pc)
+{
+ int ret = 0;
+
+ lock_page_cgroup(page);
+ if (!page_get_page_cgroup(page))
+
On Wed, 10 Oct 2007 07:31:38 +0900 (JST)
[EMAIL PROTECTED] (YAMAMOTO Takashi) wrote:
- atomic_inc(pc-ref_cnt);
- goto done;
+ if (unlikely(!atomic_inc_not_zero(pc-ref_cnt))) {
+ /* this page is under being uncharge ? */
+
On Tue, 9 Oct 2007 20:26:42 +0900
KAMEZAWA Hiroyuki [EMAIL PROTECTED] wrote:
+ */
+ if (clear_page_cgroup(page, pc) == pc) {
OK.. so we've come so far and seen that pc has changed underneath us,
what do we do with this pc?
Hmm... How about
Current implementation of memory cgroup controller does following in migration.
1. uncharge when unmapped.
2. charge again when remapped.
Consider migrate a page from OLD to NEW.
In following case, memory (for page_cgroup) will leak.
1. charge OLD page as page-cache. (charge = 1
2. A process
mem_cgroup_isolate_pages() igonres
!PageLRU pages.
Tested and worked well in ia64/NUMA box.
Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED]
---
include/linux/memcontrol.h | 22 +++
mm/memcontrol.c| 62 ++---
mm/migrate.c | 13
by mem_cgroup_prepare_migration().
- move mem_cgroup_prepare_migration() after goto:
Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED]
Index: linux-2.6.23-rc8-mm2/mm/memcontrol.c
===
--- linux-2.6.23-rc8-mm2.orig/mm/memcontrol.c
+++ linux
Hi, thank you for review.
On Mon, 01 Oct 2007 09:46:02 +0530
Balbir Singh [EMAIL PROTECTED] wrote:
@@ -424,17 +424,80 @@ void mem_cgroup_uncharge(struct page_cgr
if (atomic_dec_and_test(pc-ref_cnt)) {
page = pc-page;
lock_page_cgroup(page);
- mem =
-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED]
---
include/linux/memcontrol.h | 13 -
mm/memcontrol.c| 113 +
mm/vmscan.c| 16 +-
3 files changed, 140 insertions(+), 2 deletions(-)
Index: linux-2.6.23-rc8-mm1/mm/memcontrol.c
On Wed, 26 Sep 2007 08:46:20 -0700
Badari Pulavarty [EMAIL PROTECTED] wrote:
On Wed, 2007-09-26 at 18:14 +0900, KAMEZAWA Hiroyuki wrote:
This is an experimental patch for drop pages in empty cgroup.
comments ?
Hmm.. Patch doesn't seems to help :(
elm3b155:/dev/cgroup/xxx # cat
PROTECTED] kamezawa]# cat /opt/cgroup/memory.limit_in_bytes
unlimited
Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED]
include/linux/res_counter.h |1 +
kernel/res_counter.c| 11 ---
2 files changed, 9 insertions(+), 3 deletions(-)
Index: linux-2.6.23-rc8-mm1/include/linux
On Tue, 25 Sep 2007 16:19:18 +0530
Balbir Singh [EMAIL PROTECTED] wrote:
Hi, Kamezawa-San,
Hi,
Your changes make sense, but not CLUI (Command Line Usage) sense.
1. The problem is that when we mix strings with numbers, tools that
parse/use get confused and complicated
yes, maybe.
2.
On Tue, 25 Sep 2007 19:14:53 +0400
Pavel Emelyanov [EMAIL PROTECTED] wrote:
KAMEZAWA Hiroyuki wrote:
On Tue, 25 Sep 2007 17:34:00 +0400
Pavel Emelyanov [EMAIL PROTECTED] wrote:
Well, no container may have the ULLMAX (or what is it?) bytes
touched/allocated :) So I don't see any need
On Mon, 10 Sep 2007 22:40:49 +0530
Srivatsa Vaddagiri [EMAIL PROTECTED] wrote:
+ tg-cfs_rq = kzalloc(sizeof(cfs_rq) * num_possible_cpus(), GFP_KERNEL);
+ if (!tg-cfs_rq)
+ goto err;
+ tg-se = kzalloc(sizeof(se) * num_possible_cpus(), GFP_KERNEL);
+ if (!tg-se)
+
)
Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED]
---
mm/vmscan.c |9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
Index: linux-2.6.23-rc4-mm1.bak/mm/vmscan.c
===
--- linux-2.6.23-rc4-mm1.bak.orig/mm/vmscan.c
+++ linux
On Thu, 13 Sep 2007 13:11:35 +0400
Pavel Emelyanov [EMAIL PROTECTED] wrote:
First of all - why do we need this kind of control. The major
pros is that kernel memory control protects the system
from DoS attacks by processes that live in container. As our
experience shows many exploits simply
Hi,
On Fri, 7 Sep 2007 12:39:42 +0900 (JST)
[EMAIL PROTECTED] (YAMAMOTO Takashi) wrote:
+enum mem_container_stat_index {
+ /*
+ * for MEM_CONTAINER_TYPE_ALL, usage == pagecache + rss
+ */
+ MEMCONT_STAT_PAGECACHE,
+ MEMCONT_STAT_RSS,
+
+ /*
+ * redundant;
On Thu, 30 Aug 2007 04:07:11 +0530
Balbir Singh [EMAIL PROTECTED] wrote:
1. Several people recommended it
2. Herbert mentioned that they've moved to that interface and it
was working fine for them.
I have no strong opinion. But how about Mega bytes ? (too big ?)
There will be no rounding
Thank you for documentaion. How about adding following topics ?
- Benefit and Purpose. When this function help a user.
- What is accounted as RSS.
- What is accounted as page-cache.
- What are not accoutned now.
- When a page is accounted (charged.)
- about mem_control_type
- When a user can
On Sat, 28 Jul 2007 01:39:37 +0530
Balbir Singh [EMAIL PROTECTED] wrote:
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
Can I make a question ? Why limiting RSS instead of # of used pages
On Tue, 10 Jul 2007 16:39:43 -0500
Serge E. Hallyn [EMAIL PROTECTED] wrote:
In the list of stakeholders, I try to guess based on past comments and
contributions what *general* area they are most likely to contribute in.
I may try to narrow those down later, but am just trying to get something
On Mon, 19 Feb 2007 12:20:42 +0530
Balbir Singh [EMAIL PROTECTED] wrote:
+int memctlr_mm_overlimit(struct mm_struct *mm, void *sc_cont)
+{
+ struct container *cont;
+ struct memctlr *mem;
+ long usage, limit;
+ int ret = 1;
+
+ if (!sc_cont)
+ goto out;
+
701 - 728 of 728 matches
Mail list logo