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

Commit e6651127 authored by Sudarshan Rajagopalan's avatar Sudarshan Rajagopalan
Browse files

ion: shrink the lower order pools first



Hold on to higher order pages as much as possible by reclaiming
the lower order pools first in response to ion heap shrinker.

Change-Id: I0711ef14a62a2375a118ad7bafcf3ca0764eb774
Signed-off-by: default avatarSudarshan Rajagopalan <sudaraja@codeaurora.org>
parent bc0155b4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -479,7 +479,8 @@ static int ion_system_heap_shrink(struct ion_heap *heap, gfp_t gfp_mask,
	if (!nr_to_scan)
		only_scan = 1;

	for (i = 0; i < NUM_ORDERS; i++) {
	/* shrink the pools starting from lower order ones */
	for (i = NUM_ORDERS - 1; i >= 0; i--) {
		nr_freed = 0;

		for (j = 0; j < VMID_LAST; j++) {