public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] mm/migrate.c: cleanups
@ 2007-07-05 23:23 Adrian Bunk
  2007-07-06 17:50 ` Christoph Lameter
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2007-07-05 23:23 UTC (permalink / raw)
  To: Christoph Lameter; +Cc: linux-kernel

This patch contains the following cleanups:
- every file should include the headers containing the prototypes for
  its global functions
- make the needlessly global putback_lru_pages() static

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 include/linux/migrate.h |    2 --
 mm/migrate.c            |    3 ++-
 2 files changed, 2 insertions(+), 3 deletions(-)

--- linux-2.6.22-rc6-mm1/include/linux/migrate.h.old	2007-07-05 17:10:01.000000000 +0200
+++ linux-2.6.22-rc6-mm1/include/linux/migrate.h	2007-07-05 17:10:10.000000000 +0200
@@ -26,7 +26,6 @@
 }
 
 extern int isolate_lru_page(struct page *p, struct list_head *pagelist);
-extern int putback_lru_pages(struct list_head *l);
 extern int migrate_page(struct address_space *,
 			struct page *, struct page *);
 extern int migrate_pages(struct list_head *l, new_page_t x, unsigned long);
@@ -44,7 +43,6 @@
 
 static inline int isolate_lru_page(struct page *p, struct list_head *list)
 					{ return -ENOSYS; }
-static inline int putback_lru_pages(struct list_head *l) { return 0; }
 static inline int migrate_pages(struct list_head *l, new_page_t x,
 		unsigned long private) { return -ENOSYS; }
 
--- linux-2.6.22-rc6-mm1/mm/migrate.c.old	2007-07-05 17:10:16.000000000 +0200
+++ linux-2.6.22-rc6-mm1/mm/migrate.c	2007-07-05 17:11:43.000000000 +0200
@@ -28,6 +28,7 @@
 #include <linux/mempolicy.h>
 #include <linux/vmalloc.h>
 #include <linux/security.h>
+#include <linux/syscalls.h>
 
 #include "internal.h"
 
@@ -101,7 +102,7 @@
  *
  * returns the number of pages put back.
  */
-int putback_lru_pages(struct list_head *l)
+static int putback_lru_pages(struct list_head *l)
 {
 	struct page *page;
 	struct page *page2;


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

* Re: [2.6 patch] mm/migrate.c: cleanups
  2007-07-05 23:23 [2.6 patch] mm/migrate.c: cleanups Adrian Bunk
@ 2007-07-06 17:50 ` Christoph Lameter
  0 siblings, 0 replies; 6+ messages in thread
From: Christoph Lameter @ 2007-07-06 17:50 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel

On Fri, 6 Jul 2007, Adrian Bunk wrote:

> This patch contains the following cleanups:
> - every file should include the headers containing the prototypes for
>   its global functions
> - make the needlessly global putback_lru_pages() static
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>

Well we may have to re-rexport putback_lru_pages() again soon because
of the hotplug / memory compaction work but until that time.

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


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

* [2.6 patch] mm/migrate.c: cleanups
@ 2007-07-29 15:03 Adrian Bunk
  2007-08-02 10:27 ` Yasunori Goto
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2007-07-29 15:03 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Christoph Lameter, linux-kernel

This patch contains the following cleanups:
- every file should include the headers containing the prototypes for
  its global functions
- make the needlessly global putback_lru_pages() static

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Christoph Lameter <clameter@sgi.com>

---

This patch has been sent on:
- 6 Jul 2007

 include/linux/migrate.h |    2 --
 mm/migrate.c            |    3 ++-
 2 files changed, 2 insertions(+), 3 deletions(-)

--- linux-2.6.22-rc6-mm1/include/linux/migrate.h.old	2007-07-05 17:10:01.000000000 +0200
+++ linux-2.6.22-rc6-mm1/include/linux/migrate.h	2007-07-05 17:10:10.000000000 +0200
@@ -26,7 +26,6 @@
 }
 
 extern int isolate_lru_page(struct page *p, struct list_head *pagelist);
-extern int putback_lru_pages(struct list_head *l);
 extern int migrate_page(struct address_space *,
 			struct page *, struct page *);
 extern int migrate_pages(struct list_head *l, new_page_t x, unsigned long);
@@ -44,7 +43,6 @@
 
 static inline int isolate_lru_page(struct page *p, struct list_head *list)
 					{ return -ENOSYS; }
-static inline int putback_lru_pages(struct list_head *l) { return 0; }
 static inline int migrate_pages(struct list_head *l, new_page_t x,
 		unsigned long private) { return -ENOSYS; }
 
--- linux-2.6.22-rc6-mm1/mm/migrate.c.old	2007-07-05 17:10:16.000000000 +0200
+++ linux-2.6.22-rc6-mm1/mm/migrate.c	2007-07-05 17:11:43.000000000 +0200
@@ -28,6 +28,7 @@
 #include <linux/mempolicy.h>
 #include <linux/vmalloc.h>
 #include <linux/security.h>
+#include <linux/syscalls.h>
 
 #include "internal.h"
 
@@ -101,7 +102,7 @@
  *
  * returns the number of pages put back.
  */
-int putback_lru_pages(struct list_head *l)
+static int putback_lru_pages(struct list_head *l)
 {
 	struct page *page;
 	struct page *page2;


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

* Re: [2.6 patch] mm/migrate.c: cleanups
  2007-07-29 15:03 Adrian Bunk
@ 2007-08-02 10:27 ` Yasunori Goto
  2007-08-02 18:43   ` Christoph Lameter
  0 siblings, 1 reply; 6+ messages in thread
From: Yasunori Goto @ 2007-08-02 10:27 UTC (permalink / raw)
  To: Adrian Bunk, Andrew Morton
  Cc: Christoph Lameter, linux-kernel, Hiroyuki KAMEZAWA

Sorry for late response.

But, this patch is the cause of compile error of memory unplug code of
2.6.23-rc1-mm2. It uses putback_lru_pages(). 
Don't make it static please... :-(

Bye.

----
 CC      mm/memory_hotplug.o
mm/memory_hotplug.c: In function ‘do_migrate_range’:
mm/memory_hotplug.c:402: error: implicit declaration of function ‘putback_lru_pages’
make[1]: *** [mm/memory_hotplug.o] Error 1

----


> This patch contains the following cleanups:
> - every file should include the headers containing the prototypes for
>   its global functions
> - make the needlessly global putback_lru_pages() static
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
> Acked-by: Christoph Lameter <clameter@sgi.com>
> 
> ---
> 
> This patch has been sent on:
> - 6 Jul 2007
> 
>  include/linux/migrate.h |    2 --
>  mm/migrate.c            |    3 ++-
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> --- linux-2.6.22-rc6-mm1/include/linux/migrate.h.old	2007-07-05 17:10:01.000000000 +0200
> +++ linux-2.6.22-rc6-mm1/include/linux/migrate.h	2007-07-05 17:10:10.000000000 +0200
> @@ -26,7 +26,6 @@
>  }
>  
>  extern int isolate_lru_page(struct page *p, struct list_head *pagelist);
> -extern int putback_lru_pages(struct list_head *l);
>  extern int migrate_page(struct address_space *,
>  			struct page *, struct page *);
>  extern int migrate_pages(struct list_head *l, new_page_t x, unsigned long);
> @@ -44,7 +43,6 @@
>  
>  static inline int isolate_lru_page(struct page *p, struct list_head *list)
>  					{ return -ENOSYS; }
> -static inline int putback_lru_pages(struct list_head *l) { return 0; }
>  static inline int migrate_pages(struct list_head *l, new_page_t x,
>  		unsigned long private) { return -ENOSYS; }
>  
> --- linux-2.6.22-rc6-mm1/mm/migrate.c.old	2007-07-05 17:10:16.000000000 +0200
> +++ linux-2.6.22-rc6-mm1/mm/migrate.c	2007-07-05 17:11:43.000000000 +0200
> @@ -28,6 +28,7 @@
>  #include <linux/mempolicy.h>
>  #include <linux/vmalloc.h>
>  #include <linux/security.h>
> +#include <linux/syscalls.h>
>  
>  #include "internal.h"
>  
> @@ -101,7 +102,7 @@
>   *
>   * returns the number of pages put back.
>   */
> -int putback_lru_pages(struct list_head *l)
> +static int putback_lru_pages(struct list_head *l)
>  {
>  	struct page *page;
>  	struct page *page2;
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Yasunori Goto 



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

* Re: [2.6 patch] mm/migrate.c: cleanups
  2007-08-02 10:27 ` Yasunori Goto
@ 2007-08-02 18:43   ` Christoph Lameter
  2007-08-03  0:19     ` KAMEZAWA Hiroyuki
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Lameter @ 2007-08-02 18:43 UTC (permalink / raw)
  To: Yasunori Goto; +Cc: Adrian Bunk, Andrew Morton, linux-kernel, Hiroyuki KAMEZAWA

On Thu, 2 Aug 2007, Yasunori Goto wrote:

> But, this patch is the cause of compile error of memory unplug code of
> 2.6.23-rc1-mm2. It uses putback_lru_pages(). 
> Don't make it static please... :-(

Right. But Adrian insisted since it was currently not used upstream.

So I guess you will have to revert this piece in your unplug code.


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

* Re: [2.6 patch] mm/migrate.c: cleanups
  2007-08-02 18:43   ` Christoph Lameter
@ 2007-08-03  0:19     ` KAMEZAWA Hiroyuki
  0 siblings, 0 replies; 6+ messages in thread
From: KAMEZAWA Hiroyuki @ 2007-08-03  0:19 UTC (permalink / raw)
  To: Christoph Lameter; +Cc: Yasunori Goto, Adrian Bunk, Andrew Morton, linux-kernel

On Thu, 2 Aug 2007 11:43:21 -0700 (PDT)
Christoph Lameter <clameter@sgi.com> wrote:

> On Thu, 2 Aug 2007, Yasunori Goto wrote:
> 
> > But, this patch is the cause of compile error of memory unplug code of
> > 2.6.23-rc1-mm2. It uses putback_lru_pages(). 
> > Don't make it static please... :-(
> 
> Right. But Adrian insisted since it was currently not used upstream.
> 
> So I guess you will have to revert this piece in your unplug code.
> 
Okay, I'll take are.
But I'm too busy in these days.

Andrew, If you have to drop unplug patch set, please do.
I'll rework all when I find time.

Thanks,
-Kame


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

end of thread, other threads:[~2007-08-03  0:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-05 23:23 [2.6 patch] mm/migrate.c: cleanups Adrian Bunk
2007-07-06 17:50 ` Christoph Lameter
  -- strict thread matches above, loose matches on Subject: below --
2007-07-29 15:03 Adrian Bunk
2007-08-02 10:27 ` Yasunori Goto
2007-08-02 18:43   ` Christoph Lameter
2007-08-03  0:19     ` KAMEZAWA Hiroyuki

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