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

Commit 0112a493 authored by Charan Teja Reddy's avatar Charan Teja Reddy Committed by Isaac J. Manjarres
Browse files

mm, memory_hotplug: update pcp lists everytime onlining a memory block



When onlining a first memory block in a zone, pcp lists are not updated
thus pcp struct will have the default setting of ->high = 0,->batch = 1.
This means till the second memory block in a zone(if it have) is onlined
the pcp lists of this zone will not contain any pages because pcp's
->count is always greater than ->high thus free_pcppages_bulk() is
called to free batch size(=1) pages every time system wants to add a
page to the pcp list through free_unref_page(). To put this in a word,
system is not using benefits offered by the pcp lists when there is a
single onlineable memory block in a zone. Correct this by always
updating the pcp lists when memory block is onlined.

Change-Id: I5a0c5cc128481fdb48b9dc4e1fe2860f59e958e3
Signed-off-by: default avatarCharan Teja Reddy <charante@codeaurora.org>
[isaacm@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: default avatarIsaac J. Manjarres <isaacm@codeaurora.org>
parent 0ea391ba
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -851,7 +851,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);

	init_per_zone_wmark_min();