[prev in list] [next in list] [prev in thread] [next in thread]
List: olpc-linux-mm-cc
Subject: [linux-mm-cc] [PATCH 05/12] avoid OOM : store mapping pointer in
From: IKEDA Munehiro <m-ikeda () ds ! jp ! nec ! com>
Date: 2007-07-23 10:07:16
Message-ID: 46A47DD4.7050701 () ds ! jp ! nec ! com
[Download RAW message or body]
fs_backed_ccache area should be shrunk under memory pressure.
chunk_head has to have a pointer to an address_space which
owns the compressed page cache to be freed.
Signed-off-by: IKEDA, Munehiro <m-ikeda@ds.jp.nec.com>
---
include/linux/ccache.h | 1 +
mm/ccache.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/linux/ccache.h b/include/linux/ccache.h
index 31e3b49..d4c1897 100644
--- a/include/linux/ccache.h
+++ b/include/linux/ccache.h
@@ -112,6 +112,7 @@ struct chunk_head {
* page->private for anon pages */
struct chunk *chunk_list; /* point to first chunk */
struct list_head lru; /* to add to one of LRU lists */
+ struct address_space *mapping;
};
struct chunk {
diff --git a/mm/ccache.c b/mm/ccache.c
index abb866d..a3f591b 100644
--- a/mm/ccache.c
+++ b/mm/ccache.c
@@ -783,6 +783,7 @@ int cc_writepage(struct page *page)
ClearPageLocked(ch); /* NOTE: again, only for chunk_head */
SetPageCompressed(ch);
set_algo_idx(ch, algo_idx);
+ ch->mapping = mapping;
atomic_set(&ch->_count, 1); /* page/swap cache ref */
/* replace radix node with chunk_head */
--
1.4.4.4
_______________________________________________
linux-mm-cc mailing list
linux-mm-cc@lists.laptop.org
http://lists.laptop.org/listinfo/linux-mm-cc
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic