Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe73de29 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mm, page_isolation: remove bogus tests for isolated pages"

parents 5562f34e 20b8c69f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -722,7 +722,11 @@ static void free_pcppages_bulk(struct zone *zone, int count,
			page = list_entry(list->prev, struct page, lru);
			/* must delete as __free_one_page list manipulates */
			list_del(&page->lru);

			mt = get_freepage_migratetype(page);
			/* MIGRATE_ISOLATE page should not go to pcplists */
			VM_BUG_ON_PAGE(is_migrate_isolate(mt), page);
			/* Pageblock could have been isolated meanwhile */
			if (unlikely(has_isolate_pageblock(zone)))
				mt = get_pageblock_migratetype(page);

+6 −24
Original line number Diff line number Diff line
@@ -222,34 +222,16 @@ __test_page_isolated_in_pageblock(unsigned long pfn, unsigned long end_pfn,
			continue;
		}
		page = pfn_to_page(pfn);
		if (PageBuddy(page)) {
		if (PageBuddy(page))
			/*
			 * If race between isolatation and allocation happens,
			 * some free pages could be in MIGRATE_MOVABLE list
			 * although pageblock's migratation type of the page
			 * is MIGRATE_ISOLATE. Catch it and move the page into
			 * MIGRATE_ISOLATE list.
			 * If the page is on a free list, it has to be on
			 * the correct MIGRATE_ISOLATE freelist. There is no
			 * simple way to verify that as VM_BUG_ON(), though.
			 */
			if (get_freepage_migratetype(page) != MIGRATE_ISOLATE) {
				struct page *end_page;

				end_page = page + (1 << page_order(page)) - 1;
				move_freepages(page_zone(page), page, end_page,
						MIGRATE_ISOLATE);
			}
			pfn += 1 << page_order(page);
		}
		else if (page_count(page) == 0 &&
			get_freepage_migratetype(page) == MIGRATE_ISOLATE)
			pfn += 1;
		else if (skip_hwpoisoned_pages && PageHWPoison(page)) {
			/*
			 * The HWPoisoned page may be not in buddy
			 * system, and page_count() is not 0.
			 */
		else if (skip_hwpoisoned_pages && PageHWPoison(page))
			/* A HWPoisoned page cannot be also PageBuddy */
			pfn++;
			continue;
		}
		else
			break;
	}