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

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

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

parents 3dd532b3 c1d75807
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -914,7 +914,6 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ
		node_states_set_node(nid, &arg);
		if (need_zonelists_rebuild)
			build_all_zonelists(NULL);
		else
		zone_pcp_update(zone);
	}

+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;
	int migratetype, high, batch;

	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++;
	if (pcp->count >= pcp->high) {
		unsigned long batch = READ_ONCE(pcp->batch);
	high = READ_ONCE(pcp->high);
	batch = READ_ONCE(pcp->batch);
	if ((high > batch) && pcp->count >= high)
		free_pcppages_bulk(zone, batch, pcp);
}
}

/*
 * Free a 0-order page