On 05/15/2018 11:53 AM, Qing Huang wrote:
Just use kvzalloc(), and you get the benefit of having contiguous memory if available,This is control path so it is less latency-sensitive.No sure what exactly degradation is caused by vzalloc here. I think it's better to keep physically contiguous pages
Let's not produce unnecessary degradation here, please call kvzalloc so we maintain a similar behavior when contiguous memory is available, and a fallback for resiliency.
to other requests which really need them. Besides slow path/mem compacting can be really expensive.
without expensive compact phase.
This thing _automatically_ falls back to vmalloc(), thus your problem will be solved.
If you are not sure, trust others.