From 8b312bb9a795c9c07661aee7b694cbfd3217e25c Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 13 Dec 2013 19:26:21 -0800 Subject: [PATCH] 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. Signed-off-by: Colin Cross Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed