linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/3] Hotcold removal completion
@ 2008-02-12  0:36 Christoph Lameter
  2008-02-12  0:36 ` [patch 1/3] Eliminate the hot/cold distinction in the page allocator Christoph Lameter
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Christoph Lameter @ 2008-02-12  0:36 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, Mel Gorman

The patch that we had in mm for the removal of the cold page queue was merged.
However, there were 3 more pages that I think are necessary to complete
the work. Mel's testing indicated that the patch in mm is inferior to simply
removing the hot cold distinction in the VM altogether
(see http://marc.info/?t=119507025400001&r=1&w=2).

These 3 patches get rid of cold page handling in the VM.

--
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>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [patch 1/3] Eliminate the hot/cold distinction in the page allocator
  2008-02-12  0:36 [patch 0/3] Hotcold removal completion Christoph Lameter
@ 2008-02-12  0:36 ` Christoph Lameter
  2008-02-12  0:36 ` [patch 2/3] Remove GFP_COLD Christoph Lameter
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Christoph Lameter @ 2008-02-12  0:36 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, Mel Gorman

[-- Attachment #1: hotcold_1 --]
[-- Type: text/plain, Size: 4526 bytes --]

2.6.25-rc1 contains only a part of the patches that were done to get
rid of the cold/hot distinction. Performance tests showed that the list
operations added to simulate the hot/cold distinction using a single
list are worse than not having that distinction at all.

See the discussion and the tests that Mel Gorman performed with this patch at

http://marc.info/?t=119507025400001&r=1&w=2

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Mel Gorman <mel@csn.ul.ie>

---
 include/linux/gfp.h |    3 +--
 mm/page_alloc.c     |   34 +++++++---------------------------
 mm/swap.c           |    2 +-
 3 files changed, 9 insertions(+), 30 deletions(-)

Index: linux-2.6/include/linux/gfp.h
===================================================================
--- linux-2.6.orig/include/linux/gfp.h	2008-02-11 15:53:12.000000000 -0800
+++ linux-2.6/include/linux/gfp.h	2008-02-11 16:18:36.000000000 -0800
@@ -214,8 +214,7 @@ extern unsigned long FASTCALL(get_zeroed
 
 extern void FASTCALL(__free_pages(struct page *page, unsigned int order));
 extern void FASTCALL(free_pages(unsigned long addr, unsigned int order));
-extern void FASTCALL(free_hot_page(struct page *page));
-extern void FASTCALL(free_cold_page(struct page *page));
+extern void FASTCALL(free_a_page(struct page *page));
 
 #define __free_page(page) __free_pages((page), 0)
 #define free_page(addr) free_pages((addr),0)
Index: linux-2.6/mm/page_alloc.c
===================================================================
--- linux-2.6.orig/mm/page_alloc.c	2008-02-08 13:22:14.000000000 -0800
+++ linux-2.6/mm/page_alloc.c	2008-02-11 16:18:36.000000000 -0800
@@ -975,7 +975,7 @@ void mark_free_pages(struct zone *zone)
 /*
  * Free a 0-order page
  */
-static void free_hot_cold_page(struct page *page, int cold)
+void free_a_page(struct page *page)
 {
 	struct zone *zone = page_zone(page);
 	struct per_cpu_pages *pcp;
@@ -995,10 +995,7 @@ static void free_hot_cold_page(struct pa
 	pcp = &zone_pcp(zone, get_cpu())->pcp;
 	local_irq_save(flags);
 	__count_vm_event(PGFREE);
-	if (cold)
-		list_add_tail(&page->lru, &pcp->list);
-	else
-		list_add(&page->lru, &pcp->list);
+	list_add(&page->lru, &pcp->list);
 	set_page_private(page, get_pageblock_migratetype(page));
 	pcp->count++;
 	if (pcp->count >= pcp->high) {
@@ -1009,16 +1006,6 @@ static void free_hot_cold_page(struct pa
 	put_cpu();
 }
 
-void free_hot_page(struct page *page)
-{
-	free_hot_cold_page(page, 0);
-}
-	
-void free_cold_page(struct page *page)
-{
-	free_hot_cold_page(page, 1);
-}
-
 /*
  * split_page takes a non-compound higher-order page, and splits it into
  * n (1<<order) sub-pages: page[0..n]
@@ -1047,7 +1034,6 @@ static struct page *buffered_rmqueue(str
 {
 	unsigned long flags;
 	struct page *page;
-	int cold = !!(gfp_flags & __GFP_COLD);
 	int cpu;
 	int migratetype = allocflags_to_migratetype(gfp_flags);
 
@@ -1066,15 +1052,9 @@ again:
 		}
 
 		/* Find a page of the appropriate migrate type */
-		if (cold) {
-			list_for_each_entry_reverse(page, &pcp->list, lru)
-				if (page_private(page) == migratetype)
-					break;
-		} else {
-			list_for_each_entry(page, &pcp->list, lru)
-				if (page_private(page) == migratetype)
-					break;
-		}
+		list_for_each_entry(page, &pcp->list, lru)
+			if (page_private(page) == migratetype)
+				break;
 
 		/* Allocate more to the pcp list if necessary */
 		if (unlikely(&page->lru == &pcp->list)) {
@@ -1677,14 +1657,14 @@ void __pagevec_free(struct pagevec *pvec
 	int i = pagevec_count(pvec);
 
 	while (--i >= 0)
-		free_hot_cold_page(pvec->pages[i], pvec->cold);
+		free_a_page(pvec->pages[i]);
 }
 
 void __free_pages(struct page *page, unsigned int order)
 {
 	if (put_page_testzero(page)) {
 		if (order == 0)
-			free_hot_page(page);
+			free_a_page(page);
 		else
 			__free_pages_ok(page, order);
 	}
Index: linux-2.6/mm/swap.c
===================================================================
--- linux-2.6.orig/mm/swap.c	2008-02-07 19:07:05.000000000 -0800
+++ linux-2.6/mm/swap.c	2008-02-11 16:18:36.000000000 -0800
@@ -54,7 +54,7 @@ static void __page_cache_release(struct 
 		del_page_from_lru(zone, page);
 		spin_unlock_irqrestore(&zone->lru_lock, flags);
 	}
-	free_hot_page(page);
+	free_a_page(page);
 }
 
 static void put_compound_page(struct page *page)

-- 

--
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>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [patch 2/3] Remove GFP_COLD
  2008-02-12  0:36 [patch 0/3] Hotcold removal completion Christoph Lameter
  2008-02-12  0:36 ` [patch 1/3] Eliminate the hot/cold distinction in the page allocator Christoph Lameter
@ 2008-02-12  0:36 ` Christoph Lameter
  2008-02-12  0:36 ` [patch 3/3] Remove cold field from pagevec Christoph Lameter
  2008-02-12  6:32 ` [patch 0/3] Hotcold removal completion Nick Piggin
  3 siblings, 0 replies; 7+ messages in thread
From: Christoph Lameter @ 2008-02-12  0:36 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, Mel Gorman

[-- Attachment #1: hotcold_2 --]
[-- Type: text/plain, Size: 6128 bytes --]

On top of the patch that eliminates the hot/cold distinction:

There is no point in having GFP_COLD if we do not have a hot/cold distinction
in the pcp lists. Remove __GFP_COLD and the use of page_cache_alloc_cold().

Signed-off-by: Christoph Lameter <clameter@sgi.com>

---
 fs/splice.c             |    2 +-
 include/linux/gfp.h     |    1 -
 include/linux/pagemap.h |    5 -----
 include/linux/slab.h    |    3 ---
 kernel/power/snapshot.c |    8 ++++----
 mm/filemap.c            |    6 +++---
 mm/readahead.c          |    2 +-
 7 files changed, 9 insertions(+), 18 deletions(-)

Index: linux-2.6/fs/splice.c
===================================================================
--- linux-2.6.orig/fs/splice.c	2008-02-11 11:03:08.000000000 -0800
+++ linux-2.6/fs/splice.c	2008-02-11 16:18:47.000000000 -0800
@@ -315,7 +315,7 @@ __generic_file_splice_read(struct file *
 			/*
 			 * page didn't exist, allocate one.
 			 */
-			page = page_cache_alloc_cold(mapping);
+			page = page_cache_alloc(mapping);
 			if (!page)
 				break;
 
Index: linux-2.6/include/linux/gfp.h
===================================================================
--- linux-2.6.orig/include/linux/gfp.h	2008-02-11 16:18:36.000000000 -0800
+++ linux-2.6/include/linux/gfp.h	2008-02-11 16:18:47.000000000 -0800
@@ -38,7 +38,6 @@ struct vm_area_struct;
 #define __GFP_HIGH	((__force gfp_t)0x20u)	/* Should access emergency pools? */
 #define __GFP_IO	((__force gfp_t)0x40u)	/* Can start physical IO? */
 #define __GFP_FS	((__force gfp_t)0x80u)	/* Can call down to low-level FS? */
-#define __GFP_COLD	((__force gfp_t)0x100u)	/* Cache-cold page required */
 #define __GFP_NOWARN	((__force gfp_t)0x200u)	/* Suppress page allocation failure warning */
 #define __GFP_REPEAT	((__force gfp_t)0x400u)	/* Retry the allocation.  Might fail */
 #define __GFP_NOFAIL	((__force gfp_t)0x800u)	/* Retry for ever.  Cannot fail */
Index: linux-2.6/include/linux/pagemap.h
===================================================================
--- linux-2.6.orig/include/linux/pagemap.h	2008-01-31 19:06:09.000000000 -0800
+++ linux-2.6/include/linux/pagemap.h	2008-02-11 16:18:47.000000000 -0800
@@ -76,11 +76,6 @@ static inline struct page *page_cache_al
 	return __page_cache_alloc(mapping_gfp_mask(x));
 }
 
-static inline struct page *page_cache_alloc_cold(struct address_space *x)
-{
-	return __page_cache_alloc(mapping_gfp_mask(x)|__GFP_COLD);
-}
-
 typedef int filler_t(void *, struct page *);
 
 extern struct page * find_get_page(struct address_space *mapping,
Index: linux-2.6/include/linux/slab.h
===================================================================
--- linux-2.6.orig/include/linux/slab.h	2008-01-29 18:17:22.000000000 -0800
+++ linux-2.6/include/linux/slab.h	2008-02-11 16:18:47.000000000 -0800
@@ -154,9 +154,6 @@ size_t ksize(const void *);
  * Also it is possible to set different flags by OR'ing
  * in one or more of the following additional @flags:
  *
- * %__GFP_COLD - Request cache-cold pages instead of
- *   trying to return cache-warm pages.
- *
  * %__GFP_HIGH - This allocation has high priority and may use emergency pools.
  *
  * %__GFP_NOFAIL - Indicate that this allocation is in no way allowed to fail
Index: linux-2.6/kernel/power/snapshot.c
===================================================================
--- linux-2.6.orig/kernel/power/snapshot.c	2008-02-07 19:07:05.000000000 -0800
+++ linux-2.6/kernel/power/snapshot.c	2008-02-11 16:18:47.000000000 -0800
@@ -1102,7 +1102,7 @@ static int enough_free_mem(unsigned int 
 
 static inline int get_highmem_buffer(int safe_needed)
 {
-	buffer = get_image_page(GFP_ATOMIC | __GFP_COLD, safe_needed);
+	buffer = get_image_page(GFP_ATOMIC, safe_needed);
 	return buffer ? 0 : -ENOMEM;
 }
 
@@ -1154,11 +1154,11 @@ swsusp_alloc(struct memory_bitmap *orig_
 {
 	int error;
 
-	error = memory_bm_create(orig_bm, GFP_ATOMIC | __GFP_COLD, PG_ANY);
+	error = memory_bm_create(orig_bm, GFP_ATOMIC, PG_ANY);
 	if (error)
 		goto Free;
 
-	error = memory_bm_create(copy_bm, GFP_ATOMIC | __GFP_COLD, PG_ANY);
+	error = memory_bm_create(copy_bm, GFP_ATOMIC, PG_ANY);
 	if (error)
 		goto Free;
 
@@ -1170,7 +1170,7 @@ swsusp_alloc(struct memory_bitmap *orig_
 		nr_pages += alloc_highmem_image_pages(copy_bm, nr_highmem);
 	}
 	while (nr_pages-- > 0) {
-		struct page *page = alloc_image_page(GFP_ATOMIC | __GFP_COLD);
+		struct page *page = alloc_image_page(GFP_ATOMIC);
 
 		if (!page)
 			goto Free;
Index: linux-2.6/mm/readahead.c
===================================================================
--- linux-2.6.orig/mm/readahead.c	2007-11-09 19:30:31.000000000 -0800
+++ linux-2.6/mm/readahead.c	2008-02-11 16:18:47.000000000 -0800
@@ -153,7 +153,7 @@ __do_page_cache_readahead(struct address
 		if (page)
 			continue;
 
-		page = page_cache_alloc_cold(mapping);
+		page = page_cache_alloc(mapping);
 		if (!page)
 			break;
 		page->index = page_offset;
Index: linux-2.6/mm/filemap.c
===================================================================
--- linux-2.6.orig/mm/filemap.c	2008-02-08 13:22:14.000000000 -0800
+++ linux-2.6/mm/filemap.c	2008-02-11 16:18:47.000000000 -0800
@@ -1058,7 +1058,7 @@ no_cached_page:
 		 * Ok, it wasn't cached, so we need to create a new
 		 * page..
 		 */
-		page = page_cache_alloc_cold(mapping);
+		page = page_cache_alloc(mapping);
 		if (!page) {
 			desc->error = -ENOMEM;
 			goto out;
@@ -1285,7 +1285,7 @@ static int page_cache_read(struct file *
 	int ret;
 
 	do {
-		page = page_cache_alloc_cold(mapping);
+		page = page_cache_alloc(mapping);
 		if (!page)
 			return -ENOMEM;
 
@@ -1519,7 +1519,7 @@ static struct page *__read_cache_page(st
 repeat:
 	page = find_get_page(mapping, index);
 	if (!page) {
-		page = page_cache_alloc_cold(mapping);
+		page = page_cache_alloc(mapping);
 		if (!page)
 			return ERR_PTR(-ENOMEM);
 		err = add_to_page_cache_lru(page, mapping, index, GFP_KERNEL);

-- 

--
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>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [patch 3/3] Remove cold field from pagevec
  2008-02-12  0:36 [patch 0/3] Hotcold removal completion Christoph Lameter
  2008-02-12  0:36 ` [patch 1/3] Eliminate the hot/cold distinction in the page allocator Christoph Lameter
  2008-02-12  0:36 ` [patch 2/3] Remove GFP_COLD Christoph Lameter
@ 2008-02-12  0:36 ` Christoph Lameter
  2008-02-12  6:32 ` [patch 0/3] Hotcold removal completion Nick Piggin
  3 siblings, 0 replies; 7+ messages in thread
From: Christoph Lameter @ 2008-02-12  0:36 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, Mel Gorman

[-- Attachment #1: hotcold_3 --]
[-- Type: text/plain, Size: 13407 bytes --]

We have removed the distinction between hot/cold in the page
allocator and also the use of GFP_COLD. Then we also do not need the
cold field in the pagevecs anymore.

Signed-off-by: Christoph Lameter <clameter@sgi.com>

---
 fs/afs/write.c                |    4 ++--
 fs/cifs/file.c                |    4 ++--
 fs/gfs2/ops_address.c         |    2 +-
 fs/hugetlbfs/inode.c          |    2 +-
 fs/nfs/dir.c                  |    2 +-
 fs/ntfs/file.c                |    2 +-
 fs/ramfs/file-nommu.c         |    2 +-
 fs/reiser4/plugin/file/file.c |    2 +-
 fs/xfs/linux-2.6/xfs_aops.c   |    4 ++--
 include/linux/pagemap.h       |    2 +-
 include/linux/pagevec.h       |    4 +---
 mm/filemap.c                  |    2 +-
 mm/page-writeback.c           |    2 +-
 mm/swap.c                     |   14 +++++++-------
 mm/swap_state.c               |    2 +-
 mm/truncate.c                 |    6 +++---
 mm/vmscan.c                   |    6 +++---
 17 files changed, 30 insertions(+), 32 deletions(-)

Index: linux-2.6/include/linux/pagemap.h
===================================================================
--- linux-2.6.orig/include/linux/pagemap.h	2008-02-11 16:18:47.000000000 -0800
+++ linux-2.6/include/linux/pagemap.h	2008-02-11 16:19:00.000000000 -0800
@@ -60,7 +60,7 @@ static inline void mapping_set_gfp_mask(
 
 #define page_cache_get(page)		get_page(page)
 #define page_cache_release(page)	put_page(page)
-void release_pages(struct page **pages, int nr, int cold);
+void release_pages(struct page **pages, int nr);
 
 #ifdef CONFIG_NUMA
 extern struct page *__page_cache_alloc(gfp_t gfp);
Index: linux-2.6/include/linux/pagevec.h
===================================================================
--- linux-2.6.orig/include/linux/pagevec.h	2007-12-20 14:58:40.000000000 -0800
+++ linux-2.6/include/linux/pagevec.h	2008-02-11 16:19:00.000000000 -0800
@@ -16,7 +16,6 @@ struct address_space;
 
 struct pagevec {
 	unsigned long nr;
-	unsigned long cold;
 	struct page *pages[PAGEVEC_SIZE];
 };
 
@@ -32,10 +31,9 @@ unsigned pagevec_lookup_tag(struct pagev
 		struct address_space *mapping, pgoff_t *index, int tag,
 		unsigned nr_pages);
 
-static inline void pagevec_init(struct pagevec *pvec, int cold)
+static inline void pagevec_init(struct pagevec *pvec)
 {
 	pvec->nr = 0;
-	pvec->cold = cold;
 }
 
 static inline void pagevec_reinit(struct pagevec *pvec)
Index: linux-2.6/mm/filemap.c
===================================================================
--- linux-2.6.orig/mm/filemap.c	2008-02-11 16:18:47.000000000 -0800
+++ linux-2.6/mm/filemap.c	2008-02-11 16:19:00.000000000 -0800
@@ -276,7 +276,7 @@ int wait_on_page_writeback_range(struct 
 	if (end < start)
 		return 0;
 
-	pagevec_init(&pvec, 0);
+	pagevec_init(&pvec);
 	index = start;
 	while ((index <= end) &&
 			(nr_pages = pagevec_lookup_tag(&pvec, mapping, &index,
Index: linux-2.6/mm/page-writeback.c
===================================================================
--- linux-2.6.orig/mm/page-writeback.c	2008-02-07 19:07:05.000000000 -0800
+++ linux-2.6/mm/page-writeback.c	2008-02-11 16:19:00.000000000 -0800
@@ -813,7 +813,7 @@ int write_cache_pages(struct address_spa
 		return 0;
 	}
 
-	pagevec_init(&pvec, 0);
+	pagevec_init(&pvec);
 	if (wbc->range_cyclic) {
 		index = mapping->writeback_index; /* Start from prev offset */
 		end = -1;
Index: linux-2.6/mm/swap.c
===================================================================
--- linux-2.6.orig/mm/swap.c	2008-02-11 16:18:36.000000000 -0800
+++ linux-2.6/mm/swap.c	2008-02-11 16:19:00.000000000 -0800
@@ -125,7 +125,7 @@ static void pagevec_move_tail(struct pag
 	if (zone)
 		spin_unlock(&zone->lru_lock);
 	__count_vm_events(PGROTATED, pgmoved);
-	release_pages(pvec->pages, pvec->nr, pvec->cold);
+	release_pages(pvec->pages, pvec->nr);
 	pagevec_reinit(pvec);
 }
 
@@ -296,14 +296,14 @@ int lru_add_drain_all(void)
  * page count inside the lock to see whether shrink_cache grabbed the page
  * via the LRU.  If it did, give up: shrink_cache will free it.
  */
-void release_pages(struct page **pages, int nr, int cold)
+void release_pages(struct page **pages, int nr)
 {
 	int i;
 	struct pagevec pages_to_free;
 	struct zone *zone = NULL;
 	unsigned long uninitialized_var(flags);
 
-	pagevec_init(&pages_to_free, cold);
+	pagevec_init(&pages_to_free);
 	for (i = 0; i < nr; i++) {
 		struct page *page = pages[i];
 
@@ -361,7 +361,7 @@ void release_pages(struct page **pages, 
 void __pagevec_release(struct pagevec *pvec)
 {
 	lru_add_drain();
-	release_pages(pvec->pages, pagevec_count(pvec), pvec->cold);
+	release_pages(pvec->pages, pagevec_count(pvec));
 	pagevec_reinit(pvec);
 }
 
@@ -377,7 +377,7 @@ void __pagevec_release_nonlru(struct pag
 	int i;
 	struct pagevec pages_to_free;
 
-	pagevec_init(&pages_to_free, pvec->cold);
+	pagevec_init(&pages_to_free);
 	for (i = 0; i < pagevec_count(pvec); i++) {
 		struct page *page = pvec->pages[i];
 
@@ -414,7 +414,7 @@ void __pagevec_lru_add(struct pagevec *p
 	}
 	if (zone)
 		spin_unlock_irq(&zone->lru_lock);
-	release_pages(pvec->pages, pvec->nr, pvec->cold);
+	release_pages(pvec->pages, pvec->nr);
 	pagevec_reinit(pvec);
 }
 
@@ -443,7 +443,7 @@ void __pagevec_lru_add_active(struct pag
 	}
 	if (zone)
 		spin_unlock_irq(&zone->lru_lock);
-	release_pages(pvec->pages, pvec->nr, pvec->cold);
+	release_pages(pvec->pages, pvec->nr);
 	pagevec_reinit(pvec);
 }
 
Index: linux-2.6/mm/truncate.c
===================================================================
--- linux-2.6.orig/mm/truncate.c	2008-02-07 19:07:05.000000000 -0800
+++ linux-2.6/mm/truncate.c	2008-02-11 16:19:00.000000000 -0800
@@ -173,7 +173,7 @@ void truncate_inode_pages_range(struct a
 	BUG_ON((lend & (PAGE_CACHE_SIZE - 1)) != (PAGE_CACHE_SIZE - 1));
 	end = (lend >> PAGE_CACHE_SHIFT);
 
-	pagevec_init(&pvec, 0);
+	pagevec_init(&pvec);
 	next = start;
 	while (next <= end &&
 	       pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) {
@@ -274,7 +274,7 @@ unsigned long __invalidate_mapping_pages
 	unsigned long ret = 0;
 	int i;
 
-	pagevec_init(&pvec, 0);
+	pagevec_init(&pvec);
 	while (next <= end &&
 			pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) {
 		for (i = 0; i < pagevec_count(&pvec); i++) {
@@ -395,7 +395,7 @@ int invalidate_inode_pages2_range(struct
 	int did_range_unmap = 0;
 	int wrapped = 0;
 
-	pagevec_init(&pvec, 0);
+	pagevec_init(&pvec);
 	next = start;
 	while (next <= end && !wrapped &&
 		pagevec_lookup(&pvec, mapping, next,
Index: linux-2.6/mm/vmscan.c
===================================================================
--- linux-2.6.orig/mm/vmscan.c	2008-02-07 19:07:05.000000000 -0800
+++ linux-2.6/mm/vmscan.c	2008-02-11 16:19:00.000000000 -0800
@@ -472,7 +472,7 @@ static unsigned long shrink_page_list(st
 
 	cond_resched();
 
-	pagevec_init(&freed_pvec, 1);
+	pagevec_init(&freed_pvec);
 	while (!list_empty(page_list)) {
 		struct address_space *mapping;
 		struct page *page;
@@ -834,7 +834,7 @@ static unsigned long shrink_inactive_lis
 	unsigned long nr_scanned = 0;
 	unsigned long nr_reclaimed = 0;
 
-	pagevec_init(&pvec, 1);
+	pagevec_init(&pvec);
 
 	lru_add_drain();
 	spin_lock_irq(&zone->lru_lock);
@@ -1116,7 +1116,7 @@ static void shrink_active_list(unsigned 
 		list_add(&page->lru, &l_inactive);
 	}
 
-	pagevec_init(&pvec, 1);
+	pagevec_init(&pvec);
 	pgmoved = 0;
 	spin_lock_irq(&zone->lru_lock);
 	while (!list_empty(&l_inactive)) {
Index: linux-2.6/fs/afs/write.c
===================================================================
--- linux-2.6.orig/fs/afs/write.c	2007-11-09 19:30:29.000000000 -0800
+++ linux-2.6/fs/afs/write.c	2008-02-11 16:19:00.000000000 -0800
@@ -330,7 +330,7 @@ static void afs_kill_pages(struct afs_vn
 	_enter("{%x:%u},%lx-%lx",
 	       vnode->fid.vid, vnode->fid.vnode, first, last);
 
-	pagevec_init(&pv, 0);
+	pagevec_init(&pv);
 
 	do {
 		_debug("kill %lx-%lx", first, last);
@@ -666,7 +666,7 @@ void afs_pages_written_back(struct afs_v
 
 	ASSERT(wb != NULL);
 
-	pagevec_init(&pv, 0);
+	pagevec_init(&pv);
 
 	do {
 		_debug("done %lx-%lx", first, last);
Index: linux-2.6/fs/cifs/file.c
===================================================================
--- linux-2.6.orig/fs/cifs/file.c	2008-01-29 18:17:21.000000000 -0800
+++ linux-2.6/fs/cifs/file.c	2008-02-11 16:19:00.000000000 -0800
@@ -1248,7 +1248,7 @@ static int cifs_writepages(struct addres
 
 	xid = GetXid();
 
-	pagevec_init(&pvec, 0);
+	pagevec_init(&pvec);
 	if (wbc->range_cyclic) {
 		index = mapping->writeback_index; /* Start from prev offset */
 		end = -1;
@@ -1813,7 +1813,7 @@ static int cifs_readpages(struct file *f
 	cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);
 	pTcon = cifs_sb->tcon;
 
-	pagevec_init(&lru_pvec, 0);
+	pagevec_init(&lru_pvec);
 #ifdef CONFIG_CIFS_DEBUG2
 		cFYI(1, ("rpages: num pages %d", num_pages));
 #endif
Index: linux-2.6/fs/hugetlbfs/inode.c
===================================================================
--- linux-2.6.orig/fs/hugetlbfs/inode.c	2008-02-08 13:22:14.000000000 -0800
+++ linux-2.6/fs/hugetlbfs/inode.c	2008-02-11 16:19:00.000000000 -0800
@@ -345,7 +345,7 @@ static void truncate_hugepages(struct in
 	pgoff_t next;
 	int i, freed = 0;
 
-	pagevec_init(&pvec, 0);
+	pagevec_init(&pvec);
 	next = start;
 	while (1) {
 		if (!pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) {
Index: linux-2.6/fs/nfs/dir.c
===================================================================
--- linux-2.6.orig/fs/nfs/dir.c	2008-01-30 12:05:02.000000000 -0800
+++ linux-2.6/fs/nfs/dir.c	2008-02-11 16:19:00.000000000 -0800
@@ -1519,7 +1519,7 @@ static int nfs_symlink(struct inode *dir
 	 * No big deal if we can't add this page to the page cache here.
 	 * READLINK will get the missing page from the server if needed.
 	 */
-	pagevec_init(&lru_pvec, 0);
+	pagevec_init(&lru_pvec);
 	if (!add_to_page_cache(page, dentry->d_inode->i_mapping, 0,
 							GFP_KERNEL)) {
 		pagevec_add(&lru_pvec, page);
Index: linux-2.6/fs/ntfs/file.c
===================================================================
--- linux-2.6.orig/fs/ntfs/file.c	2008-02-07 19:07:04.000000000 -0800
+++ linux-2.6/fs/ntfs/file.c	2008-02-11 16:19:00.000000000 -0800
@@ -1911,7 +1911,7 @@ static ssize_t ntfs_file_buffered_write(
 			}
 		}
 	}
-	pagevec_init(&lru_pvec, 0);
+	pagevec_init(&lru_pvec);
 	written = 0;
 	/*
 	 * If the write starts beyond the initialized size, extend it up to the
Index: linux-2.6/fs/ramfs/file-nommu.c
===================================================================
--- linux-2.6.orig/fs/ramfs/file-nommu.c	2007-11-09 19:30:29.000000000 -0800
+++ linux-2.6/fs/ramfs/file-nommu.c	2008-02-11 16:19:00.000000000 -0800
@@ -102,7 +102,7 @@ static int ramfs_nommu_expand_for_mappin
 	memset(data, 0, newsize);
 
 	/* attach all the pages to the inode's address space */
-	pagevec_init(&lru_pvec, 0);
+	pagevec_init(&lru_pvec);
 	for (loop = 0; loop < npages; loop++) {
 		struct page *page = pages + loop;
 
Index: linux-2.6/fs/reiser4/plugin/file/file.c
===================================================================
--- linux-2.6.orig/fs/reiser4/plugin/file/file.c	2007-08-27 22:03:53.000000000 -0700
+++ linux-2.6/fs/reiser4/plugin/file/file.c	2008-02-11 16:19:00.000000000 -0800
@@ -989,7 +989,7 @@ capture_anonymous_pages(struct address_s
 	unsigned int i, count;
 	int nr;
 
-	pagevec_init(&pvec, 0);
+	pagevec_init(&pvec);
 	count = min(pagevec_space(&pvec), to_capture);
 	nr = 0;
 
Index: linux-2.6/fs/xfs/linux-2.6/xfs_aops.c
===================================================================
--- linux-2.6.orig/fs/xfs/linux-2.6/xfs_aops.c	2008-02-08 13:22:14.000000000 -0800
+++ linux-2.6/fs/xfs/linux-2.6/xfs_aops.c	2008-02-11 16:19:00.000000000 -0800
@@ -651,7 +651,7 @@ xfs_probe_cluster(
 	/* Prune this back to avoid pathological behavior */
 	tloff = min(tlast, startpage->index + 64);
 
-	pagevec_init(&pvec, 0);
+	pagevec_init(&pvec);
 	while (!done && tindex <= tloff) {
 		unsigned len = min_t(pgoff_t, PAGEVEC_SIZE, tlast - tindex + 1);
 
@@ -882,7 +882,7 @@ xfs_cluster_write(
 	struct pagevec		pvec;
 	int			done = 0, i;
 
-	pagevec_init(&pvec, 0);
+	pagevec_init(&pvec);
 	while (!done && tindex <= tlast) {
 		unsigned len = min_t(pgoff_t, PAGEVEC_SIZE, tlast - tindex + 1);
 
Index: linux-2.6/mm/swap_state.c
===================================================================
--- linux-2.6.orig/mm/swap_state.c	2008-02-07 19:07:05.000000000 -0800
+++ linux-2.6/mm/swap_state.c	2008-02-11 16:19:00.000000000 -0800
@@ -223,7 +223,7 @@ void free_pages_and_swap_cache(struct pa
 
 		for (i = 0; i < todo; i++)
 			free_swap_cache(pagep[i]);
-		release_pages(pagep, todo, 0);
+		release_pages(pagep, todo);
 		pagep += todo;
 		nr -= todo;
 	}
Index: linux-2.6/fs/gfs2/ops_address.c
===================================================================
--- linux-2.6.orig/fs/gfs2/ops_address.c	2008-02-11 16:23:10.000000000 -0800
+++ linux-2.6/fs/gfs2/ops_address.c	2008-02-11 16:23:17.000000000 -0800
@@ -360,7 +360,7 @@ static int gfs2_write_cache_jdata(struct
 		return 0;
 	}
 
-	pagevec_init(&pvec, 0);
+	pagevec_init(&pvec);
 	if (wbc->range_cyclic) {
 		index = mapping->writeback_index; /* Start from prev offset */
 		end = -1;

-- 

--
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>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch 0/3] Hotcold removal completion
  2008-02-12  0:36 [patch 0/3] Hotcold removal completion Christoph Lameter
                   ` (2 preceding siblings ...)
  2008-02-12  0:36 ` [patch 3/3] Remove cold field from pagevec Christoph Lameter
@ 2008-02-12  6:32 ` Nick Piggin
  2008-02-12  7:57   ` Andrew Morton
  3 siblings, 1 reply; 7+ messages in thread
From: Nick Piggin @ 2008-02-12  6:32 UTC (permalink / raw)
  To: Christoph Lameter; +Cc: akpm, linux-mm, Mel Gorman

On Tuesday 12 February 2008 11:36, Christoph Lameter wrote:
> The patch that we had in mm for the removal of the cold page queue was
> merged.

That patch to merge the hot and cold lists has obvious problems.
It pulls cold pages off the list in the opposite order that hot
pages come off the list (which is obviously bad); and also it
allows cold allocations to deplete hot pages (which may not be a
good idea).

Obviously the half baked code that's there now should be fixed...
But whether it is to fix hot/cold properly, or to remove it
completely, I don't really know.


> However, there were 3 more pages that I think are necessary to 
> complete the work. Mel's testing indicated that the patch in mm is inferior
> to simply removing the hot cold distinction in the VM altogether
> (see http://marc.info/?t=119507025400001&r=1&w=2).
>
> These 3 patches get rid of cold page handling in the VM.

I'm all in favour of removing these. But honestly, I don't think
kernbench, [td]bench, and aim9 are really great tests when it
comes to subtle cache behaviour... OTOH, that didn't stop the
last patch being merged. May as well do it.

--
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>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch 0/3] Hotcold removal completion
  2008-02-12  6:32 ` [patch 0/3] Hotcold removal completion Nick Piggin
@ 2008-02-12  7:57   ` Andrew Morton
  2008-02-12 20:12     ` Christoph Lameter
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2008-02-12  7:57 UTC (permalink / raw)
  To: Nick Piggin; +Cc: Christoph Lameter, linux-mm, Mel Gorman

On Tue, 12 Feb 2008 17:32:29 +1100 Nick Piggin <nickpiggin@yahoo.com.au> wrote:

> On Tuesday 12 February 2008 11:36, Christoph Lameter wrote:
> > The patch that we had in mm for the removal of the cold page queue was
> > merged.
> 
> That patch to merge the hot and cold lists has obvious problems.
> It pulls cold pages off the list in the opposite order that hot
> pages come off the list (which is obviously bad); and also it
> allows cold allocations to deplete hot pages (which may not be a
> good idea).
> 
> Obviously the half baked code that's there now should be fixed...
> But whether it is to fix hot/cold properly, or to remove it
> completely, I don't really know.
> 

Well that sounds bad.

> 
> > However, there were 3 more pages that I think are necessary to 
> > complete the work. Mel's testing indicated that the patch in mm is inferior
> > to simply removing the hot cold distinction in the VM altogether
> > (see http://marc.info/?t=119507025400001&r=1&w=2).
> >
> > These 3 patches get rid of cold page handling in the VM.
> 
> I'm all in favour of removing these. But honestly, I don't think
> kernbench, [td]bench, and aim9 are really great tests when it
> comes to subtle cache behaviour... OTOH, that didn't stop the
> last patch being merged. May as well do it.

I think I'd prefer that we convince ourselves that we didn't just merge a
regression rather than merging more stuff on top of it.  Because right now,
page-allocator-get-rid-of-the-list-of-cold-pages.patch reverts cleanly.


--
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>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch 0/3] Hotcold removal completion
  2008-02-12  7:57   ` Andrew Morton
@ 2008-02-12 20:12     ` Christoph Lameter
  0 siblings, 0 replies; 7+ messages in thread
From: Christoph Lameter @ 2008-02-12 20:12 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Nick Piggin, linux-mm, Mel Gorman

On Mon, 11 Feb 2008, Andrew Morton wrote:

> I think I'd prefer that we convince ourselves that we didn't just merge a
> regression rather than merging more stuff on top of it.  Because right now,
> page-allocator-get-rid-of-the-list-of-cold-pages.patch reverts cleanly.

Well Mel and I discussed this extensively and I have tried to get these 
patches merged before (early Jan) because I saw the danger of the half 
assed stuff getting merged. Either we should backout the half baked stuff 
upstream now or go the full way and remove the hot/cold distinction.
\

--
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>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-02-12 20:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-12  0:36 [patch 0/3] Hotcold removal completion Christoph Lameter
2008-02-12  0:36 ` [patch 1/3] Eliminate the hot/cold distinction in the page allocator Christoph Lameter
2008-02-12  0:36 ` [patch 2/3] Remove GFP_COLD Christoph Lameter
2008-02-12  0:36 ` [patch 3/3] Remove cold field from pagevec Christoph Lameter
2008-02-12  6:32 ` [patch 0/3] Hotcold removal completion Nick Piggin
2008-02-12  7:57   ` Andrew Morton
2008-02-12 20:12     ` Christoph Lameter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).