On Wed, 10 Apr 2013, Toshi Kani wrote:

> > I'll switch it to GFP_ATOMIC.  Which is horridly lame but the
> > allocation is small and alternatives are unobvious.
> 
> Great!  Again, thanks for the update!

release_mem_region_adjustable() allocates at most one struct resource, so 
why not do kmalloc(sizeof(struct resource), GFP_KERNEL) before taking 
resource_lock and then testing whether it's NULL or not when splitting?  
It unnecessarily allocates memory when there's no split, but 
__remove_pages() shouldn't be a hotpath.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to