Results 1 to 1 of 1
Thread: kmalloc and fragmentation
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Jul 2008
kmalloc and fragmentation
Until now I have been using a reserved part of the memory completely dedicated for this device. This works well except the reserved memory is not unusable for other purposes when all or part of it is not in use.
Now I'm trying to evaluate if I can use kmalloc (or maybe get_free_pages??) to allocate the physically contiguous allocations. I'm having trouble trying to find out how easily kmalloc will be able to find physically contiguous pages given that the system is already running with lots of applications for some time. This probably depends on the specific applications and device drivers used, but I'd like to get a feel for this.
What I'm concerned with is does linux kernel take any care that the amount of physically contiguous memory is maximized (i.e. minimizing fragmentation of free pages) If the kernel tries to allocate within the large ranges of free physical pages only at the lowest priority, I could probably say that there is a good chance a kmalloc call will not fail due to fragmentation.
Any information on this? Anyway I can control the kernel priority on this? Where else can I find more information.
Thanks a lot!