28 Feb
2014
28 Feb
'14
3:11 p.m.
On Fri, 28 Feb 2014 16:15:23 +0800 "Wang, Yalin" Yalin.Wang@sonymobile.com wrote:
Kfree(ptr) { If (is_vmalloc_addr(ptr)) Vfree(ptr); Else Kfree(ptr); }
But we need add some flags to ensure always use kmalloc for Some special use (dma etc..)
How do you think of it ?
But vmalloc also takes up tlb entries. The more vmalloc space you have, the more tlb entries that will need to be used, which will have a performance affect on the entire system.
I would be against making kmalloc() secretly doing a vmalloc. If it is better for a driver to use a vmalloc on large items, than change the driver. Don't change a core function.
-- Steve