[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20121210191120.d6984a1183c969ff2bb91d5a@canb.auug.org.au>
Date: Mon, 10 Dec 2012 19:11:20 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
Rafael Aquini <aquini@...hat.com>,
Mel Gorman <mgorman@...e.de>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: linux-next: manual merge of the akpm tree with the tip tree
Hi Andrew,
Today's linux-next merge of the akpm tree got conflicts in mm/migrate.c
and include/linux/migrate.h between commits 070059b28578 ("mm/compaction:
Move migration fail/success stats to migrate.c") and 2d85cca46951
("mm/migrate: Add a tracepoint for migrate_pages") from the tip tree and
commit "mm: adjust address_space_operations.migratepage() return code"
from the akpm tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@...b.auug.org.au
diff --cc include/linux/migrate.h
index bcb5ddc,50d2974..0000000
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@@ -7,16 -7,13 +7,23 @@@
typedef struct page *new_page_t(struct page *, unsigned long private, int **);
+enum migrate_reason {
+ MR_COMPACTION,
+ MR_MEMORY_FAILURE,
+ MR_MEMORY_HOTPLUG,
+ MR_SYSCALL, /* also applies to cpusets */
+ MR_MEMPOLICY_MBIND,
+ MR_NUMA_MISPLACED,
+ MR_CMA
+};
+
+ /*
+ * Return values from addresss_space_operations.migratepage():
+ * - negative errno on page migration failure;
+ * - zero on page migration success;
+ */
+ #define MIGRATEPAGE_SUCCESS 0
+
#ifdef CONFIG_MIGRATION
extern void putback_lru_pages(struct list_head *l);
diff --cc mm/migrate.c
index c0afe60,c3724b6..0000000
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@@ -981,8 -977,7 +981,8 @@@ int migrate_pages(struct list_head *fro
case -EAGAIN:
retry++;
break;
- case 0:
+ case MIGRATEPAGE_SUCCESS:
+ nr_succeeded++;
break;
default:
/* Permanent failure */
@@@ -991,14 -986,8 +991,14 @@@
}
}
}
- rc = 0;
+ rc = nr_failed + retry;
out:
+ if (nr_succeeded)
+ count_vm_events(PGMIGRATE_SUCCESS, nr_succeeded);
+ if (nr_failed)
+ count_vm_events(PGMIGRATE_FAIL, nr_failed);
+ trace_mm_migrate_pages(nr_succeeded, nr_failed, mode, reason);
+
if (!swapwrite)
current->flags &= ~PF_SWAPWRITE;
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists