ion: Limit max active to 1 for the buffer freeing workers

* 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 <xzr467706992@163.com>
This commit is contained in:
LibXZR 2021-07-20 21:54:45 +08:00 committed by spakkkk
parent 1582fcb2ee
commit e3dc7d8199

View File

@ -514,7 +514,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);
}