Skip to content

Commit

Permalink
ion: Limit max active to 1 for the buffer freeing workers
Browse files Browse the repository at this point in the history
* This is not something time critical. The load of the workqueues can
sometimes be very high, especially when unbound workqueues are restricted
to small cluster, bringing notable lags to userspace. Limit it with
max_active = 1 to reduce the instantaneous load.

* This fixes UI lags after running faceunlock on OOS.

Signed-off-by: LibXZR <[email protected]>
Signed-off-by: atndko <[email protected]>
  • Loading branch information
libxzr authored and 0wnerDied committed Oct 17, 2021
1 parent b8b1b98 commit 19c080e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/android/ion/ion.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ void ion_add_heap(struct ion_device *idev, struct ion_heap *heap)

if (heap->flags & ION_HEAP_FLAG_DEFER_FREE) {
heap->wq = alloc_workqueue("%s", WQ_UNBOUND | WQ_MEM_RECLAIM |
WQ_CPU_INTENSIVE, 0, heap->name);
WQ_CPU_INTENSIVE, 1, heap->name);
BUG_ON(!heap->wq);
}

Expand Down

0 comments on commit 19c080e

Please sign in to comment.