Indeed. Alternatively, I could make it case on KMALLOC_MAX_SIZE as follows: if (size > KMALLOC_MAX_SIZE) { /* use vmalloc directly */ } else { /* try kmalloc, and, expecting fragmentation, if that fails, use vmalloc */ } As the free wrapper uses is_vmalloc_addr, it'd work fine and be able to decide for a certain range of sizes whether kmalloc or vmalloc is appropriate. On Tue, Jul 14, 2009 at 10:50 AM, Paul Menage<menage@xxxxxxxxxx> wrote: > On Tue, Jul 14, 2009 at 10:47 AM, Dave Hansen<dave@xxxxxxxxxxxxxxxxxx> wrote: >> >> How big were those allocations that were failing? The code made it >> appear that order-2 (PAGE_SIZE*4) allocations were failing. That's a >> bit lower than I'd expect the page allocator to start failing. > > I think it depends on how much fragmentation you've got. > > We've seen it fail for cpusets with (I guess) hundreds or thousands of threads. > > Paul > _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers