Re: [PATCH 2/2] mm,hugetlb: simplify error handling in hugetlb_cow()

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

 



On Tue, 1 Jul 2014, Davidlohr Bueso wrote:

> When returning from hugetlb_cow(), we always (1) put back the refcount
> for each referenced page -- always 'old', and 'new' if allocation was
> successful. And (2) retake the page table lock right before returning,
> as the callers expects. This logic can be simplified and encapsulated,
> as proposed in this patch. In addition to cleaner code, we also shave
> a few bytes off in instruction text:
> 
>    text    data     bss     dec     hex filename
>   28399     462   41328   70189   1122d mm/hugetlb.o-baseline
>   28367     462   41328   70157   1120d mm/hugetlb.o-patched
> 
> Passes libhugetlbfs testcases.
> 
> Signed-off-by: Davidlohr Bueso <davidlohr@xxxxxx>

Acked-by: David Rientjes <rientjes@xxxxxxxxxx>

Not sure the extra indirection is clearer code, but I can't argue with the 
difference in object size.

--
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]