On Thu, Apr 28, 2011 at 6:26 AM, <[email protected]> wrote: > From: Andrew Morton <[email protected]> > > Azurit reports large increases in system time after 2.6.36 when running > Apache. It was bisected down to a892e2d7dcdfa6c76e6 ("vfs: use kmalloc() > to allocate fdmem if possible"). > > That patch caused the vfs to use kmalloc() for very large allocations and > this is causing excessive work (and presumably excessive reclaim) within > the page allocator. > > Fix it by falling back to vmalloc() earlier - when the allocation attempt > would have been considered "costly" by reclaim. > ... > + /* > + * Very large allocations can stress page reclaim, so fall back to > + * vmalloc() if the allocation size will be considered "large" by the > VM. > + */ > + if (size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER)) { > + void *data = kmalloc(size, GFP_KERNEL|__GFP_NOWARN); > + if (data != NULL) > + return data; > + }
Sorry for the delay, Andrew. I am feeling that we are exploiting vm details out of vm, I think vm should provide an API to users outside, instead of exposing PAGE_ALLOC_COSTLY_ORDER. Thanks! _______________________________________________ stable mailing list [email protected] http://linux.kernel.org/mailman/listinfo/stable
