lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1407011513180.4004@chino.kir.corp.google.com>
Date:	Tue, 1 Jul 2014 15:13:50 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	Davidlohr Bueso <davidlohr@...com>
cc:	akpm@...ux-foundation.org, aswin@...com, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] mm,hugetlb: simplify error handling in
 hugetlb_cow()

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@...com>

Acked-by: David Rientjes <rientjes@...gle.com>

Not sure the extra indirection is clearer code, but I can't argue with the 
difference in object size.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ