Re: [PATCH 7/7] mm/balloon_compaction: general cleanup
From: Andrew Morton
Date: Fri Aug 29 2014 - 17:38:27 EST
On Wed, 20 Aug 2014 19:05:09 +0400 Konstantin Khlebnikov <k.khlebnikov@xxxxxxxxxxx> wrote:
> * move special branch for balloon migraion into migrate_pages
> * remove special mapping for balloon and its flag AS_BALLOON_MAP
> * embed struct balloon_dev_info into struct virtio_balloon
> * cleanup balloon_page_dequeue, kill balloon_page_free
Another testing failure. Guys, allnoconfig is really fast.
> --- a/include/linux/balloon_compaction.h
> +++ b/include/linux/balloon_compaction.h
> @@ -54,58 +54,27 @@
> * balloon driver as a page book-keeper for its registered balloon devices.
> */
> struct balloon_dev_info {
> - void *balloon_device; /* balloon device descriptor */
> - struct address_space *mapping; /* balloon special page->mapping */
> unsigned long isolated_pages; /* # of isolated pages for migration */
> spinlock_t pages_lock; /* Protection to pages list */
> struct list_head pages; /* Pages enqueued & handled to Host */
> + int (* migrate_page)(struct balloon_dev_info *, struct page *newpage,
> + struct page *page, enum migrate_mode mode);
> };
If CONFIG_MIGRATION=n this gets turned into "NULL" and chaos ensues. I
think I'll just nuke that #define:
--- a/include/linux/migrate.h~include-linux-migrateh-remove-migratepage-define
+++ a/include/linux/migrate.h
@@ -82,9 +82,6 @@ static inline int migrate_huge_page_move
return -ENOSYS;
}
-/* Possible settings for the migrate_page() method in address_operations */
-#define migrate_page NULL
-
#endif /* CONFIG_MIGRATION */
#ifdef CONFIG_NUMA_BALANCING
--- a/mm/swap_state.c~include-linux-migrateh-remove-migratepage-define
+++ a/mm/swap_state.c
@@ -28,7 +28,9 @@
static const struct address_space_operations swap_aops = {
.writepage = swap_writepage,
.set_page_dirty = swap_set_page_dirty,
+#ifdef CONFIG_MIGRATION
.migratepage = migrate_page,
+#endif
};
static struct backing_dev_info swap_backing_dev_info = {
--- a/mm/shmem.c~include-linux-migrateh-remove-migratepage-define
+++ a/mm/shmem.c
@@ -3075,7 +3075,9 @@ static const struct address_space_operat
.write_begin = shmem_write_begin,
.write_end = shmem_write_end,
#endif
+#ifdef CONFIG_MIGRATION
.migratepage = migrate_page,
+#endif
.error_remove_page = generic_error_remove_page,
};
Our mixture of "migratepage" and "migrate_page" is maddening.
--
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/