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

Commit 2873fe0a authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Revert "mm, page_alloc: fix core hung in free_pcppages_bulk()""

parents d61c2f58 3bb7dc3b
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -3036,7 +3036,7 @@ static void free_unref_page_commit(struct page *page, unsigned long pfn)
{
	struct zone *zone = page_zone(page);
	struct per_cpu_pages *pcp;
	int migratetype, high, batch;
	int migratetype;

	migratetype = get_pcppage_migratetype(page);
	__count_vm_event(PGFREE);
@@ -3059,11 +3059,11 @@ static void free_unref_page_commit(struct page *page, unsigned long pfn)
	pcp = &this_cpu_ptr(zone->pageset)->pcp;
	list_add(&page->lru, &pcp->lists[migratetype]);
	pcp->count++;
	high = READ_ONCE(pcp->high);
	batch = READ_ONCE(pcp->batch);
	if ((high > batch) && pcp->count >= high)
	if (pcp->count >= pcp->high) {
		unsigned long batch = READ_ONCE(pcp->batch);
		free_pcppages_bulk(zone, batch, pcp);
	}
}

/*
 * Free a 0-order page