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

Commit 64000110 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "staging: android: ion: Make ion defer free more aggressive"

parents 467cf927 e2f402f3
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -55,3 +55,11 @@ config ION_FORCE_DMA_SYNC
	  We generally don't want to enable this config as it breaks the
	  cache maintenance model.
	  If you're not sure say N here.

config ION_DEFER_FREE_NO_SCHED_IDLE
	bool "Increases the priority of ION defer free thead"
	depends on ION
	help
	  Choose this option to remove the SCHED_IDLE flag in case of defer free
	  thereby increasing the priority of defer free thread.
	  if you're not sure say Y here.
+4 −1
Original line number Diff line number Diff line
@@ -250,8 +250,9 @@ static int ion_heap_deferred_free(void *data)

int ion_heap_init_deferred_free(struct ion_heap *heap)
{
#ifndef CONFIG_ION_DEFER_FREE_NO_SCHED_IDLE
	struct sched_param param = { .sched_priority = 0 };

#endif
	INIT_LIST_HEAD(&heap->free_list);
	init_waitqueue_head(&heap->waitqueue);
	heap->task = kthread_run(ion_heap_deferred_free, heap,
@@ -261,7 +262,9 @@ int ion_heap_init_deferred_free(struct ion_heap *heap)
		       __func__);
		return PTR_ERR_OR_ZERO(heap->task);
	}
#ifndef CONFIG_ION_DEFER_FREE_NO_SCHED_IDLE
	sched_setscheduler(heap->task, SCHED_IDLE, &param);
#endif
	return 0;
}