Eric Dumazet wrote:__vmalloc_area_node() is a litle bit pessimist when allocating space for storing struct page pointers.
When allocating more than 4 MB on ia32, or 2 MB on x86_64, __vmalloc_area_node() has to allocate more than PAGE_SIZE bytes to store pointers to page structs. This means that two TLB translations are needed to access data.
This patch tries a kmalloc() call, then only if this first attempt failed, a vmalloc() is performed. (Later, at vfree() time we chose kfree() or vfree() with a test on flags & VM_VPAGES : no change is needed)
Most of the time, the first kmalloc() should be OK, so we reduce TLB usage.
But this is only TLB usage when managing (read: freeing) the vmalloc pages,
isn't it? Not when actually accessing the data.
I'd be inclined to NACK this, unless you can show an improvement somewhere:
it is suboptimal to even _try_ allocating higher order pages.