Re: [patch 03/21] use an array for the LRU pagevecs

From: KOSAKI Motohiro
Date: Tue Mar 04 2008 - 06:05:33 EST


Hi Rik

this is fixed patch of Andy Whitcroft's point out.
(at least, I hope it)



Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>

---
include/linux/mmzone.h | 4 +---
mm/swap.c | 15 +++++++++++----
2 files changed, 12 insertions(+), 7 deletions(-)

Index: b/include/linux/mmzone.h
===================================================================
--- a/include/linux/mmzone.h 2008-03-04 19:07:11.000000000 +0900
+++ b/include/linux/mmzone.h 2008-03-04 19:09:06.000000000 +0900
@@ -116,9 +116,7 @@ enum lru_list {

static inline int is_active_lru(enum lru_list l)
{
- if (l == LRU_ACTIVE)
- return 1;
- return 0;
+ return (l == LRU_ACTIVE);
}

enum lru_list page_lru(struct page *page);
Index: b/mm/swap.c
===================================================================
--- a/mm/swap.c 2008-03-04 19:07:11.000000000 +0900
+++ b/mm/swap.c 2008-03-04 20:01:48.000000000 +0900
@@ -96,8 +96,9 @@ void put_pages_list(struct list_head *pa
}
EXPORT_SYMBOL(put_pages_list);

-/*
+/**
* Returns the LRU list a page should be on.
+ * @page: the page we're checking.
*/
enum lru_list page_lru(struct page *page)
{
@@ -222,11 +223,15 @@ void __lru_cache_add(struct page *page,
put_cpu_var(lru_add_pvecs);
}

+/**
+ * lru_cache_add_lru: add a page to the page lists
+ * @page: the page to be added to LRU.
+ * @lru: the lru to which the page is added.
+ */
void lru_cache_add_lru(struct page *page, enum lru_list lru)
{
- if (PageActive(page)) {
+ if (PageActive(page))
ClearPageActive(page);
- }

VM_BUG_ON(PageLRU(page) || PageActive(page));
__lru_cache_add(page, lru);
@@ -397,9 +402,11 @@ void __pagevec_release_nonlru(struct pag
pagevec_reinit(pvec);
}

-/*
+/**
* Add the passed pages to the LRU, then drop the caller's refcount
* on them. Reinitialises the caller's pagevec.
+ * @pvec: the pagevec of pages to be added to LRU.
+ * @lru: the lru to which pages are added.
*/
void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru)
{


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/