All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20160610003304.GE29779@bbox>

diff --git a/a/1.txt b/N1/1.txt
index d113985..55d5742 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -66,177 +66,3 @@ On Fri, Jun 10, 2016 at 08:51:41AM +0900, Minchan Kim wrote:
 > 
 
 Andrew, it's quick fix. How about this?
-
-
->From ef5fb1b2ecfd2143700977c8cf089ee6ca6cdd17 Mon Sep 17 00:00:00 2001
-From: Minchan Kim <minchan@kernel.org>
-Date: Fri, 10 Jun 2016 09:12:08 +0900
-Subject: [PATCH] mm: fix build warnings in <linux/compaction.h>
-
-Randy reported below build error.
-
-> In file included from ../include/linux/balloon_compaction.h:48:0,
->                  from ../mm/balloon_compaction.c:11:
-> ../include/linux/compaction.h:237:51: warning: 'struct node' declared inside parameter list [enabled by default]
->  static inline int compaction_register_node(struct node *node)
-> ../include/linux/compaction.h:237:51: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
-> ../include/linux/compaction.h:242:54: warning: 'struct node' declared inside parameter list [enabled by default]
->  static inline void compaction_unregister_node(struct node *node)
->
-
-It was caused by non-lru page migration which needs compaction.h but
-compaction.h doesn't include any header to be standalone.
-
-I think proper header for non-lru page migration is migrate.h rather
-than compaction.h because migrate.h has already headers needed to work
-non-lru page migration indirectly like isolate_mode_t, migrate_mode
-MIGRATEPAGE_SUCCESS.
-
-Cc: Konstantin Khlebnikov <koct9i@gmail.com>
-Cc: Vlastimil Babka <vbabka@suse.cz>
-Cc: Gioh Kim <gi-oh.kim@profitbricks.com>
-Cc: Rafael Aquini <aquini@redhat.com>
-Cc: Andrew Morton <akpm@linux-foundation.org>
-Reported-by: Randy Dunlap <rdunlap@infradead.org>
-Signed-off-by: Minchan Kim <minchan@kernel.org>
----
- Documentation/vm/page_migration    | 11 ++++++-----
- drivers/virtio/virtio_balloon.c    |  2 +-
- include/linux/balloon_compaction.h |  2 +-
- include/linux/compaction.h         | 16 ----------------
- include/linux/migrate.h            | 15 +++++++++++++++
- mm/zsmalloc.c                      |  4 ++--
- 6 files changed, 25 insertions(+), 25 deletions(-)
-
-diff --git a/Documentation/vm/page_migration b/Documentation/vm/page_migration
-index 18d37c7ac50b..94bd9c11c4e0 100644
---- a/Documentation/vm/page_migration
-+++ b/Documentation/vm/page_migration
-@@ -181,11 +181,12 @@ After isolation, VM calls migratepage of driver with isolated page.
- The function of migratepage is to move content of the old page to new page
- and set up fields of struct page newpage. Keep in mind that you should
- indicate to the VM the oldpage is no longer movable via __ClearPageMovable()
--under page_lock if you migrated the oldpage successfully and returns 0.
--If driver cannot migrate the page at the moment, driver can return -EAGAIN.
--On -EAGAIN, VM will retry page migration in a short time because VM interprets
---EAGAIN as "temporal migration failure". On returning any error except -EAGAIN,
--VM will give up the page migration without retrying in this time.
-+under page_lock if you migrated the oldpage successfully and returns
-+MIGRATEPAGE_SUCCESS. If driver cannot migrate the page at the moment, driver
-+can return -EAGAIN. On -EAGAIN, VM will retry page migration in a short time
-+because VM interprets -EAGAIN as "temporal migration failure". On returning
-+any error except -EAGAIN, VM will give up the page migration without retrying
-+in this time.
- 
- Driver shouldn't touch page.lru field VM using in the functions.
- 
-diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
-index 88d5609375de..888d5f8322ce 100644
---- a/drivers/virtio/virtio_balloon.c
-+++ b/drivers/virtio/virtio_balloon.c
-@@ -493,7 +493,7 @@ static int virtballoon_migratepage(struct balloon_dev_info *vb_dev_info,
- 
- 	put_page(page); /* balloon reference */
- 
--	return 0;
-+	return MIGRATEPAGE_SUCCESS;
- }
- 
- static struct dentry *balloon_mount(struct file_system_type *fs_type,
-diff --git a/include/linux/balloon_compaction.h b/include/linux/balloon_compaction.h
-index c0c430d06a9b..79542b2698ec 100644
---- a/include/linux/balloon_compaction.h
-+++ b/include/linux/balloon_compaction.h
-@@ -45,7 +45,7 @@
- #define _LINUX_BALLOON_COMPACTION_H
- #include <linux/pagemap.h>
- #include <linux/page-flags.h>
--#include <linux/compaction.h>
-+#include <linux/migrate.h>
- #include <linux/gfp.h>
- #include <linux/err.h>
- #include <linux/fs.h>
-diff --git a/include/linux/compaction.h b/include/linux/compaction.h
-index c6b47c861cea..1a02dab16646 100644
---- a/include/linux/compaction.h
-+++ b/include/linux/compaction.h
-@@ -54,9 +54,6 @@ enum compact_result {
- struct alloc_context; /* in mm/internal.h */
- 
- #ifdef CONFIG_COMPACTION
--extern int PageMovable(struct page *page);
--extern void __SetPageMovable(struct page *page, struct address_space *mapping);
--extern void __ClearPageMovable(struct page *page);
- extern int sysctl_compact_memory;
- extern int sysctl_compaction_handler(struct ctl_table *table, int write,
- 			void __user *buffer, size_t *length, loff_t *ppos);
-@@ -154,19 +151,6 @@ extern void kcompactd_stop(int nid);
- extern void wakeup_kcompactd(pg_data_t *pgdat, int order, int classzone_idx);
- 
- #else
--static inline int PageMovable(struct page *page)
--{
--	return 0;
--}
--static inline void __SetPageMovable(struct page *page,
--			struct address_space *mapping)
--{
--}
--
--static inline void __ClearPageMovable(struct page *page)
--{
--}
--
- static inline enum compact_result try_to_compact_pages(gfp_t gfp_mask,
- 			unsigned int order, int alloc_flags,
- 			const struct alloc_context *ac,
-diff --git a/include/linux/migrate.h b/include/linux/migrate.h
-index 404fbfefeb33..ae8d475a9385 100644
---- a/include/linux/migrate.h
-+++ b/include/linux/migrate.h
-@@ -71,6 +71,21 @@ static inline int migrate_huge_page_move_mapping(struct address_space *mapping,
- 
- #endif /* CONFIG_MIGRATION */
- 
-+#ifdef CONFIG_COMPACTION
-+extern int PageMovable(struct page *page);
-+extern void __SetPageMovable(struct page *page, struct address_space *mapping);
-+extern void __ClearPageMovable(struct page *page);
-+#else
-+static inline int PageMovable(struct page *page) { return 0; };
-+static inline void __SetPageMovable(struct page *page,
-+				struct address_space *mapping)
-+{
-+}
-+static inline void __ClearPageMovable(struct page *page)
-+{
-+}
-+#endif
-+
- #ifdef CONFIG_NUMA_BALANCING
- extern bool pmd_trans_migrating(pmd_t pmd);
- extern int migrate_misplaced_page(struct page *page,
-diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
-index 213d0e12fe82..502db584237b 100644
---- a/mm/zsmalloc.c
-+++ b/mm/zsmalloc.c
-@@ -50,7 +50,7 @@
- #include <linux/zsmalloc.h>
- #include <linux/zpool.h>
- #include <linux/mount.h>
--#include <linux/compaction.h>
-+#include <linux/migrate.h>
- #include <linux/pagemap.h>
- 
- #define ZSPAGE_MAGIC	0x58
-@@ -2119,7 +2119,7 @@ int zs_page_migrate(struct address_space *mapping, struct page *newpage,
- 	put_page(page);
- 	page = newpage;
- 
--	ret = 0;
-+	ret = MIGRATEPAGE_SUCCESS;
- unpin_objects:
- 	for (addr = s_addr + offset; addr < s_addr + pos;
- 						addr += class->size) {
--- 
-1.9.1
diff --git a/a/content_digest b/N1/content_digest
index aba747f..193d91c 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -84,180 +84,6 @@
  "> Anyway, I will work for it.\n"
  "> \n"
  "\n"
- "Andrew, it's quick fix. How about this?\n"
- "\n"
- "\n"
- ">From ef5fb1b2ecfd2143700977c8cf089ee6ca6cdd17 Mon Sep 17 00:00:00 2001\n"
- "From: Minchan Kim <minchan@kernel.org>\n"
- "Date: Fri, 10 Jun 2016 09:12:08 +0900\n"
- "Subject: [PATCH] mm: fix build warnings in <linux/compaction.h>\n"
- "\n"
- "Randy reported below build error.\n"
- "\n"
- "> In file included from ../include/linux/balloon_compaction.h:48:0,\n"
- ">                  from ../mm/balloon_compaction.c:11:\n"
- "> ../include/linux/compaction.h:237:51: warning: 'struct node' declared inside parameter list [enabled by default]\n"
- ">  static inline int compaction_register_node(struct node *node)\n"
- "> ../include/linux/compaction.h:237:51: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]\n"
- "> ../include/linux/compaction.h:242:54: warning: 'struct node' declared inside parameter list [enabled by default]\n"
- ">  static inline void compaction_unregister_node(struct node *node)\n"
- ">\n"
- "\n"
- "It was caused by non-lru page migration which needs compaction.h but\n"
- "compaction.h doesn't include any header to be standalone.\n"
- "\n"
- "I think proper header for non-lru page migration is migrate.h rather\n"
- "than compaction.h because migrate.h has already headers needed to work\n"
- "non-lru page migration indirectly like isolate_mode_t, migrate_mode\n"
- "MIGRATEPAGE_SUCCESS.\n"
- "\n"
- "Cc: Konstantin Khlebnikov <koct9i@gmail.com>\n"
- "Cc: Vlastimil Babka <vbabka@suse.cz>\n"
- "Cc: Gioh Kim <gi-oh.kim@profitbricks.com>\n"
- "Cc: Rafael Aquini <aquini@redhat.com>\n"
- "Cc: Andrew Morton <akpm@linux-foundation.org>\n"
- "Reported-by: Randy Dunlap <rdunlap@infradead.org>\n"
- "Signed-off-by: Minchan Kim <minchan@kernel.org>\n"
- "---\n"
- " Documentation/vm/page_migration    | 11 ++++++-----\n"
- " drivers/virtio/virtio_balloon.c    |  2 +-\n"
- " include/linux/balloon_compaction.h |  2 +-\n"
- " include/linux/compaction.h         | 16 ----------------\n"
- " include/linux/migrate.h            | 15 +++++++++++++++\n"
- " mm/zsmalloc.c                      |  4 ++--\n"
- " 6 files changed, 25 insertions(+), 25 deletions(-)\n"
- "\n"
- "diff --git a/Documentation/vm/page_migration b/Documentation/vm/page_migration\n"
- "index 18d37c7ac50b..94bd9c11c4e0 100644\n"
- "--- a/Documentation/vm/page_migration\n"
- "+++ b/Documentation/vm/page_migration\n"
- "@@ -181,11 +181,12 @@ After isolation, VM calls migratepage of driver with isolated page.\n"
- " The function of migratepage is to move content of the old page to new page\n"
- " and set up fields of struct page newpage. Keep in mind that you should\n"
- " indicate to the VM the oldpage is no longer movable via __ClearPageMovable()\n"
- "-under page_lock if you migrated the oldpage successfully and returns 0.\n"
- "-If driver cannot migrate the page at the moment, driver can return -EAGAIN.\n"
- "-On -EAGAIN, VM will retry page migration in a short time because VM interprets\n"
- "--EAGAIN as \"temporal migration failure\". On returning any error except -EAGAIN,\n"
- "-VM will give up the page migration without retrying in this time.\n"
- "+under page_lock if you migrated the oldpage successfully and returns\n"
- "+MIGRATEPAGE_SUCCESS. If driver cannot migrate the page at the moment, driver\n"
- "+can return -EAGAIN. On -EAGAIN, VM will retry page migration in a short time\n"
- "+because VM interprets -EAGAIN as \"temporal migration failure\". On returning\n"
- "+any error except -EAGAIN, VM will give up the page migration without retrying\n"
- "+in this time.\n"
- " \n"
- " Driver shouldn't touch page.lru field VM using in the functions.\n"
- " \n"
- "diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c\n"
- "index 88d5609375de..888d5f8322ce 100644\n"
- "--- a/drivers/virtio/virtio_balloon.c\n"
- "+++ b/drivers/virtio/virtio_balloon.c\n"
- "@@ -493,7 +493,7 @@ static int virtballoon_migratepage(struct balloon_dev_info *vb_dev_info,\n"
- " \n"
- " \tput_page(page); /* balloon reference */\n"
- " \n"
- "-\treturn 0;\n"
- "+\treturn MIGRATEPAGE_SUCCESS;\n"
- " }\n"
- " \n"
- " static struct dentry *balloon_mount(struct file_system_type *fs_type,\n"
- "diff --git a/include/linux/balloon_compaction.h b/include/linux/balloon_compaction.h\n"
- "index c0c430d06a9b..79542b2698ec 100644\n"
- "--- a/include/linux/balloon_compaction.h\n"
- "+++ b/include/linux/balloon_compaction.h\n"
- "@@ -45,7 +45,7 @@\n"
- " #define _LINUX_BALLOON_COMPACTION_H\n"
- " #include <linux/pagemap.h>\n"
- " #include <linux/page-flags.h>\n"
- "-#include <linux/compaction.h>\n"
- "+#include <linux/migrate.h>\n"
- " #include <linux/gfp.h>\n"
- " #include <linux/err.h>\n"
- " #include <linux/fs.h>\n"
- "diff --git a/include/linux/compaction.h b/include/linux/compaction.h\n"
- "index c6b47c861cea..1a02dab16646 100644\n"
- "--- a/include/linux/compaction.h\n"
- "+++ b/include/linux/compaction.h\n"
- "@@ -54,9 +54,6 @@ enum compact_result {\n"
- " struct alloc_context; /* in mm/internal.h */\n"
- " \n"
- " #ifdef CONFIG_COMPACTION\n"
- "-extern int PageMovable(struct page *page);\n"
- "-extern void __SetPageMovable(struct page *page, struct address_space *mapping);\n"
- "-extern void __ClearPageMovable(struct page *page);\n"
- " extern int sysctl_compact_memory;\n"
- " extern int sysctl_compaction_handler(struct ctl_table *table, int write,\n"
- " \t\t\tvoid __user *buffer, size_t *length, loff_t *ppos);\n"
- "@@ -154,19 +151,6 @@ extern void kcompactd_stop(int nid);\n"
- " extern void wakeup_kcompactd(pg_data_t *pgdat, int order, int classzone_idx);\n"
- " \n"
- " #else\n"
- "-static inline int PageMovable(struct page *page)\n"
- "-{\n"
- "-\treturn 0;\n"
- "-}\n"
- "-static inline void __SetPageMovable(struct page *page,\n"
- "-\t\t\tstruct address_space *mapping)\n"
- "-{\n"
- "-}\n"
- "-\n"
- "-static inline void __ClearPageMovable(struct page *page)\n"
- "-{\n"
- "-}\n"
- "-\n"
- " static inline enum compact_result try_to_compact_pages(gfp_t gfp_mask,\n"
- " \t\t\tunsigned int order, int alloc_flags,\n"
- " \t\t\tconst struct alloc_context *ac,\n"
- "diff --git a/include/linux/migrate.h b/include/linux/migrate.h\n"
- "index 404fbfefeb33..ae8d475a9385 100644\n"
- "--- a/include/linux/migrate.h\n"
- "+++ b/include/linux/migrate.h\n"
- "@@ -71,6 +71,21 @@ static inline int migrate_huge_page_move_mapping(struct address_space *mapping,\n"
- " \n"
- " #endif /* CONFIG_MIGRATION */\n"
- " \n"
- "+#ifdef CONFIG_COMPACTION\n"
- "+extern int PageMovable(struct page *page);\n"
- "+extern void __SetPageMovable(struct page *page, struct address_space *mapping);\n"
- "+extern void __ClearPageMovable(struct page *page);\n"
- "+#else\n"
- "+static inline int PageMovable(struct page *page) { return 0; };\n"
- "+static inline void __SetPageMovable(struct page *page,\n"
- "+\t\t\t\tstruct address_space *mapping)\n"
- "+{\n"
- "+}\n"
- "+static inline void __ClearPageMovable(struct page *page)\n"
- "+{\n"
- "+}\n"
- "+#endif\n"
- "+\n"
- " #ifdef CONFIG_NUMA_BALANCING\n"
- " extern bool pmd_trans_migrating(pmd_t pmd);\n"
- " extern int migrate_misplaced_page(struct page *page,\n"
- "diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c\n"
- "index 213d0e12fe82..502db584237b 100644\n"
- "--- a/mm/zsmalloc.c\n"
- "+++ b/mm/zsmalloc.c\n"
- "@@ -50,7 +50,7 @@\n"
- " #include <linux/zsmalloc.h>\n"
- " #include <linux/zpool.h>\n"
- " #include <linux/mount.h>\n"
- "-#include <linux/compaction.h>\n"
- "+#include <linux/migrate.h>\n"
- " #include <linux/pagemap.h>\n"
- " \n"
- " #define ZSPAGE_MAGIC\t0x58\n"
- "@@ -2119,7 +2119,7 @@ int zs_page_migrate(struct address_space *mapping, struct page *newpage,\n"
- " \tput_page(page);\n"
- " \tpage = newpage;\n"
- " \n"
- "-\tret = 0;\n"
- "+\tret = MIGRATEPAGE_SUCCESS;\n"
- " unpin_objects:\n"
- " \tfor (addr = s_addr + offset; addr < s_addr + pos;\n"
- " \t\t\t\t\t\taddr += class->size) {\n"
- "-- \n"
- 1.9.1
+ Andrew, it's quick fix. How about this?
 
-5d9f3212858bb9d0e44b204aad0775f33896bee80e1ecd8aee8b19246b256594
+11fde533d841f9dd585b5b34d16a8095e11cbb0e56b50ff1a9e5d1b05e4f1d6f

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.