mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
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: Charan Teja Reddy <charante@codeaurora.org> [cgoldswo@codeaurora.org: Fix merge conflicts, apply change elsewhere] Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
This commit is contained in:
parent
0191b64327
commit
6dccca705b
1 changed files with 3 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue