From: David Rientjes <rientjes@google.com>
To: Davidlohr Bueso <davidlohr@hp.com>
Cc: akpm@linux-foundation.org, aswin@hp.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm,hugetlb: simplify error handling in hugetlb_cow()
Date: Tue, 1 Jul 2014 15:13:50 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.02.1407011513180.4004@chino.kir.corp.google.com> (raw)
In-Reply-To: <1404246097-18810-2-git-send-email-davidlohr@hp.com>
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@hp.com>
Acked-by: David Rientjes <rientjes@google.com>
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@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2014-07-01 22:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-01 20:21 [PATCH 1/2] mm,hugetlb: make unmap_ref_private() return void Davidlohr Bueso
2014-07-01 20:21 ` [PATCH 2/2] mm,hugetlb: simplify error handling in hugetlb_cow() Davidlohr Bueso
2014-07-01 22:13 ` David Rientjes [this message]
2014-07-01 22:09 ` [PATCH 1/2] mm,hugetlb: make unmap_ref_private() return void David Rientjes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.02.1407011513180.4004@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=aswin@hp.com \
--cc=davidlohr@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox