linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm:  remove unevictable_migrate_page function
@ 2009-12-02 18:35 Lee Schermerhorn
  2009-12-02 19:44 ` Christoph Lameter
  2009-12-05 13:09 ` Hugh Dickins
  0 siblings, 2 replies; 3+ messages in thread
From: Lee Schermerhorn @ 2009-12-02 18:35 UTC (permalink / raw)
  To: linux-mm; +Cc: Hugh Dickins, KOSAKI Motohiro, Andrew Morton, Mel Gorman


unevictable_migrate_page() in mm/internal.h is a relic of the
since removed UNEVICTABLE_LRU Kconfig option.  This patch removes
the function and open codes the test in migrate_page_copy().

Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>

 mm/internal.h |   12 ------------
 mm/migrate.c  |    4 ++--
 2 files changed, 2 insertions(+), 14 deletions(-)

Index: linux-2.6.32-rc8/mm/internal.h
===================================================================
--- linux-2.6.32-rc8.orig/mm/internal.h	2009-11-24 13:19:58.000000000 -0500
+++ linux-2.6.32-rc8/mm/internal.h	2009-12-01 13:33:11.000000000 -0500
@@ -74,18 +74,6 @@ static inline void munlock_vma_pages_all
 }
 #endif
 
-/*
- * unevictable_migrate_page() called only from migrate_page_copy() to
- * migrate unevictable flag to new page.
- * Note that the old page has been isolated from the LRU lists at this
- * point so we don't need to worry about LRU statistics.
- */
-static inline void unevictable_migrate_page(struct page *new, struct page *old)
-{
-	if (TestClearPageUnevictable(old))
-		SetPageUnevictable(new);
-}
-
 #ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
 /*
  * Called only in fault path via page_evictable() for a new page
Index: linux-2.6.32-rc8/mm/migrate.c
===================================================================
--- linux-2.6.32-rc8.orig/mm/migrate.c	2009-11-24 13:19:58.000000000 -0500
+++ linux-2.6.32-rc8/mm/migrate.c	2009-12-01 13:32:48.000000000 -0500
@@ -341,8 +341,8 @@ static void migrate_page_copy(struct pag
 	if (TestClearPageActive(page)) {
 		VM_BUG_ON(PageUnevictable(page));
 		SetPageActive(newpage);
-	} else
-		unevictable_migrate_page(newpage, page);
+	} else if (TestClearPageUnevictable(page))
+		SetPageUnevictable(newpage);
 	if (PageChecked(page))
 		SetPageChecked(newpage);
 	if (PageMappedToDisk(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] 3+ messages in thread

* Re: [PATCH] mm:  remove unevictable_migrate_page function
  2009-12-02 18:35 [PATCH] mm: remove unevictable_migrate_page function Lee Schermerhorn
@ 2009-12-02 19:44 ` Christoph Lameter
  2009-12-05 13:09 ` Hugh Dickins
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Lameter @ 2009-12-02 19:44 UTC (permalink / raw)
  To: Lee Schermerhorn
  Cc: linux-mm, Hugh Dickins, KOSAKI Motohiro, Andrew Morton, Mel Gorman


Reviewed-by: Christoph Lameter <cl@linux-foundation.org>


--
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] 3+ messages in thread

* Re: [PATCH] mm:  remove unevictable_migrate_page function
  2009-12-02 18:35 [PATCH] mm: remove unevictable_migrate_page function Lee Schermerhorn
  2009-12-02 19:44 ` Christoph Lameter
@ 2009-12-05 13:09 ` Hugh Dickins
  1 sibling, 0 replies; 3+ messages in thread
From: Hugh Dickins @ 2009-12-05 13:09 UTC (permalink / raw)
  To: Lee Schermerhorn; +Cc: linux-mm, KOSAKI Motohiro, Andrew Morton, Mel Gorman

On Wed, 2 Dec 2009, Lee Schermerhorn wrote:
> 
> unevictable_migrate_page() in mm/internal.h is a relic of the
> since removed UNEVICTABLE_LRU Kconfig option.  This patch removes
> the function and open codes the test in migrate_page_copy().
> 
> Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>

Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>

(and Andrew has already put this in mmotm, thanks)

More obfuscation gone: good, thanks.

> 
>  mm/internal.h |   12 ------------
>  mm/migrate.c  |    4 ++--
>  2 files changed, 2 insertions(+), 14 deletions(-)
> 
> Index: linux-2.6.32-rc8/mm/internal.h
> ===================================================================
> --- linux-2.6.32-rc8.orig/mm/internal.h	2009-11-24 13:19:58.000000000 -0500
> +++ linux-2.6.32-rc8/mm/internal.h	2009-12-01 13:33:11.000000000 -0500
> @@ -74,18 +74,6 @@ static inline void munlock_vma_pages_all
>  }
>  #endif
>  
> -/*
> - * unevictable_migrate_page() called only from migrate_page_copy() to
> - * migrate unevictable flag to new page.
> - * Note that the old page has been isolated from the LRU lists at this
> - * point so we don't need to worry about LRU statistics.
> - */
> -static inline void unevictable_migrate_page(struct page *new, struct page *old)
> -{
> -	if (TestClearPageUnevictable(old))
> -		SetPageUnevictable(new);
> -}
> -
>  #ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
>  /*
>   * Called only in fault path via page_evictable() for a new page
> Index: linux-2.6.32-rc8/mm/migrate.c
> ===================================================================
> --- linux-2.6.32-rc8.orig/mm/migrate.c	2009-11-24 13:19:58.000000000 -0500
> +++ linux-2.6.32-rc8/mm/migrate.c	2009-12-01 13:32:48.000000000 -0500
> @@ -341,8 +341,8 @@ static void migrate_page_copy(struct pag
>  	if (TestClearPageActive(page)) {
>  		VM_BUG_ON(PageUnevictable(page));
>  		SetPageActive(newpage);
> -	} else
> -		unevictable_migrate_page(newpage, page);
> +	} else if (TestClearPageUnevictable(page))
> +		SetPageUnevictable(newpage);
>  	if (PageChecked(page))
>  		SetPageChecked(newpage);
>  	if (PageMappedToDisk(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] 3+ messages in thread

end of thread, other threads:[~2009-12-05 13:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-02 18:35 [PATCH] mm: remove unevictable_migrate_page function Lee Schermerhorn
2009-12-02 19:44 ` Christoph Lameter
2009-12-05 13:09 ` Hugh Dickins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox