From: Colin Cross Date: Sat, 14 Dec 2013 03:26:21 +0000 (-0800) Subject: ion: optimize ion_heap_buffer_zero X-Git-Tag: v3.14-rc1~150^2~376 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b312bb9a795c9c07661aee7b694cbfd3217e25c;p=pandora-kernel.git 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-diff-tree failed