Merge "mm, page_alloc: fix core hung in free_pcppages_bulk()"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
3903afc31d
@@ -914,8 +914,7 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ
|
|||||||
node_states_set_node(nid, &arg);
|
node_states_set_node(nid, &arg);
|
||||||
if (need_zonelists_rebuild)
|
if (need_zonelists_rebuild)
|
||||||
build_all_zonelists(NULL);
|
build_all_zonelists(NULL);
|
||||||
else
|
zone_pcp_update(zone);
|
||||||
zone_pcp_update(zone);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
init_per_zone_wmark_min();
|
init_per_zone_wmark_min();
|
||||||
|
|||||||
@@ -3036,7 +3036,7 @@ static void free_unref_page_commit(struct page *page, unsigned long pfn)
|
|||||||
{
|
{
|
||||||
struct zone *zone = page_zone(page);
|
struct zone *zone = page_zone(page);
|
||||||
struct per_cpu_pages *pcp;
|
struct per_cpu_pages *pcp;
|
||||||
int migratetype;
|
int migratetype, high, batch;
|
||||||
|
|
||||||
migratetype = get_pcppage_migratetype(page);
|
migratetype = get_pcppage_migratetype(page);
|
||||||
__count_vm_event(PGFREE);
|
__count_vm_event(PGFREE);
|
||||||
@@ -3059,10 +3059,10 @@ static void free_unref_page_commit(struct page *page, unsigned long pfn)
|
|||||||
pcp = &this_cpu_ptr(zone->pageset)->pcp;
|
pcp = &this_cpu_ptr(zone->pageset)->pcp;
|
||||||
list_add(&page->lru, &pcp->lists[migratetype]);
|
list_add(&page->lru, &pcp->lists[migratetype]);
|
||||||
pcp->count++;
|
pcp->count++;
|
||||||
if (pcp->count >= pcp->high) {
|
high = READ_ONCE(pcp->high);
|
||||||
unsigned long batch = READ_ONCE(pcp->batch);
|
batch = READ_ONCE(pcp->batch);
|
||||||
|
if ((high > batch) && pcp->count >= high)
|
||||||
free_pcppages_bulk(zone, batch, pcp);
|
free_pcppages_bulk(zone, batch, pcp);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user