On Tue, Mar 07, 2017 at 11:54:20AM +1100, Dave Chinner wrote: > > Or maybe I've misunderstood, and you're asking if we should try > > kmem_zalloc(4 pages), then kmem_zalloc(1 page), and only then switch to > > the __vmalloc calls? > > Just call kmem_zalloc_large() for 4 pages without a fallback on > failure - that's exactly how we handle allocations for things like > the 64k xattr buffers.... Yeah, that sounds fine. I didn't remember that we actually tried kmalloc before vmalloc for kmem_zalloc_large.