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

Commit 6dccca70 authored by Charan Teja Reddy's avatar Charan Teja Reddy Committed by Chris Goldsworthy
Browse files

ion: don't wakeup refill threads for order-0 requests



We check the pool->count against the ION_POOL_LOW_MARK before deciding
to wakeup the refill threads. But as we never refill the order-0 pool,
we will keep waking up these refill threads only they goto sleep again
without doing any work. The overhead of waking up of these threads
is quite high. Fix it.

Change-Id: I0d10b96a46de24b45822ebeda1f20b75e43c2a5d
Signed-off-by: default avatarCharan Teja Reddy <charante@codeaurora.org>
[cgoldswo@codeaurora.org: Fix merge conflicts, apply change elsewhere]
Signed-off-by: default avatarChris Goldsworthy <cgoldswo@codeaurora.org>
parent 0191b643
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ static struct page *alloc_buffer_page(struct ion_system_heap *sys_heap,
		 */
		*from_pool = false;

		if (pool_auto_refill_en &&
		if (pool_auto_refill_en && pool->order &&
		    pool_count_below_lowmark(pool)) {
			worker = sys_heap->kworker[ION_KTHREAD_UNCACHED];
			wake_up_process(worker);
@@ -114,10 +114,9 @@ static struct page *alloc_buffer_page(struct ion_system_heap *sys_heap,
normal_alloc:
	page = ion_page_pool_alloc(pool, from_pool);

	if (pool_auto_refill_en &&
	    pool_count_below_lowmark(pool) && vmid <= 0) {
	if (pool_auto_refill_en && pool->order &&
	    pool_count_below_lowmark(pool) && vmid <= 0)
		wake_up_process(sys_heap->kworker[cached]);
	}

	if (IS_ERR(page))
		return page;