mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2025-03-01 18:06:45 +00:00
mm: Drain pages after onlining
When onlining, the onlined pages must be added to the kernel's list of free pages using __free_page(). However, pages are not immediately added but placed in a queue to be processed when the queue size reaches a watermark. The last pages in the queue may not be processed in time, and if you try to offline that memory before it is processed, offlining will always fail. This fix calls drain_all_pages(), which will process every free page in the queue. This ensures that all pages are accounted for when onlining and nothing gets stuck in the queue. Change-Id: I54dbc0749556702407090e51ce9246abc5db7d1c Signed-off-by: Jack Cheung <jackc@codeaurora.org> (cherry picked from commit aa7e9dec5cfd309cb9eb6cb56a284a61607a925a)
This commit is contained in:
parent
ac7ec62d35
commit
1f8032c277
@ -1016,6 +1016,7 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ
|
||||
zone->present_pages += onlined_pages;
|
||||
zone->zone_pgdat->node_present_pages += onlined_pages;
|
||||
if (onlined_pages) {
|
||||
drain_all_pages();
|
||||
node_states_set_node(zone_to_nid(zone), &arg);
|
||||
if (need_zonelists_rebuild)
|
||||
build_all_zonelists(NULL, NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user