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

Skip to content
Commit 13dcf979 authored by Colin Cross's avatar Colin Cross Committed by Ian Maund
Browse files

ion: optimize ion_heap_buffer_zero



ion_heap_buffer_zero can spend a long time in unmap_kernel_range
if it has to broadcast a tlb flush to every cpu for every page.
Modify it to batch pages into a larger region to clear using a
single mapping.  This may cause the mapping size to change if
the buffer size is not a multiple of the mapping size, so
switch to allocating the address space for each chunk.  This
allows us to use vm_map_ram to handle the allocation and mapping
together.

The number of pages to zero using a single mapping is set to 32
to hit the fastpath in vm_map_ram.

Change-Id: I1accfe67b285cbc9e95e387bea4246864197827d
Signed-off-by: default avatarColin Cross <ccross@android.com>
Git-commit: fc04e484c319b8df647886d4cf17f7c450453d1d
Git-repo: http://android.googlesource.com/kernel/common/


Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent 63ad930c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment