Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2017-10-20 13:20:45 +0200
committerJiri Kosina <jkosina@suse.cz>2017-10-20 13:20:45 +0200
commitb0c30e4605e34d6450a73048bdd6aef734dec675 (patch)
tree1a8f8823ca5d18747ac24b4f60ee17c5cf8fa900
parent39c49a86f05a6fa4c021c7bb2d10ea20b3eac0bd (diff)
parent1709b312346d9dedb2f4df868e252cd0896947a4 (diff)
Merge remote-tracking branch 'origin/users/mgorman/SLE15/for-next' into SLE15
-rw-r--r--include/linux/pagevec.h4
-rw-r--r--mm/page_alloc.c18
-rw-r--r--mm/swap.c4
3 files changed, 13 insertions, 13 deletions
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h
index 640b7cd07802..aee66230c564 100644
--- a/include/linux/pagevec.h
+++ b/include/linux/pagevec.h
@@ -16,7 +16,7 @@ struct address_space;
struct pagevec {
unsigned long nr;
- bool drained;
+ bool percpu_pvec_drained;
struct page *pages[PAGEVEC_SIZE];
};
@@ -36,7 +36,7 @@ unsigned pagevec_lookup_tag(struct pagevec *pvec,
static inline void pagevec_init(struct pagevec *pvec)
{
pvec->nr = 0;
- pvec->drained = false;
+ pvec->percpu_pvec_drained = false;
}
static inline void pagevec_reinit(struct pagevec *pvec)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 8652527c1e85..d3edb83107ad 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2290,16 +2290,16 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order,
continue;
/*
- * Split buddy pages returned by expand() are received here
- * in physical page order. The page is added to the callers and
- * list and the list head then moves forward. From the callers
- * perspective, the linked list is ordered by page number in
- * some conditions. This is useful for IO devices that can
- * merge IO requests if the physical pages are ordered
- * properly.
+ * Split buddy pages returned by expand() are received here in
+ * physical page order. The page is added to the tail of
+ * caller's list. From the callers perspective, the linked list
+ * is ordered by page number under some conditions. This is
+ * useful for IO devices that can forward direction from the
+ * head, thus also in the physical page order. This is useful
+ * for IO devices that can merge IO requests if the physical
+ * pages are ordered properly.
*/
- list_add(&page->lru, list);
- list = &page->lru;
+ list_add_tail(&page->lru, list);
alloced++;
if (is_migrate_cma(get_pcppage_migratetype(page)))
__mod_zone_page_state(zone, NR_FREE_CMA_PAGES,
diff --git a/mm/swap.c b/mm/swap.c
index 5ebc0d8c0ea2..0411c6e50e93 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -816,9 +816,9 @@ EXPORT_SYMBOL(release_pages);
*/
void __pagevec_release(struct pagevec *pvec)
{
- if (!pvec->drained) {
+ if (!pvec->percpu_pvec_drained) {
lru_add_drain();
- pvec->drained = true;
+ pvec->percpu_pvec_drained = true;
}
release_pages(pvec->pages, pagevec_count(pvec));
pagevec_reinit(pvec);