Re: [PATCH v3 2/3] resource: Add release_mem_region_adjustable()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]