From: "Arve Hjønnevåg" <arve@android.com>
To: gregkh@linuxfoundation.org
Cc: xiaobing.tu@intel.com, ccross@android.com, davej@redhat.com,
akpm@linux-foundation.org, mingo@elte.hu, rusty@rustcorp.com.au,
a.p.zijlstra@chello.nl, linux-kernel@vger.kernel.org,
rostedt@goodmis.org, di.zhang@intel.com, xindong.ma@intel.com,
alex.zuo@intel.com, "Arve Hjønnevåg" <arve@android.com>
Subject: [PATCH 4/4] Staging: android: binder: Allow using highmem for binder buffers
Date: Tue, 16 Oct 2012 15:29:55 -0700 [thread overview]
Message-ID: <1350426595-18059-4-git-send-email-arve@android.com> (raw)
In-Reply-To: <1350426595-18059-1-git-send-email-arve@android.com>
The default kernel mapping for the pages allocated for the binder
buffers is never used. Set the __GFP_HIGHMEM flag when allocating
these pages so we don't needlessly use low memory pages that may
be required elsewhere.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
---
drivers/staging/android/binder.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 91ce956..9fbc06e 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -583,7 +583,7 @@ static int binder_update_page_range(struct binder_proc *proc, int allocate,
page = &proc->pages[(page_addr - proc->buffer) / PAGE_SIZE];
BUG_ON(*page);
- *page = alloc_page(GFP_KERNEL | __GFP_ZERO);
+ *page = alloc_page(GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO);
if (*page == NULL) {
pr_err("binder: %d: binder_alloc_buf failed "
"for page at %p\n", proc->pid, page_addr);
--
1.7.7.3
next prev parent reply other threads:[~2012-10-16 22:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-15 7:03 Fix memory leak in binder Tu, Xiaobing
2012-10-15 7:20 ` Fix memory leak in binder--version2 Tu, Xiaobing
2012-10-15 22:52 ` Greg KH
2012-10-15 23:55 ` Arve Hjønnevåg
2012-10-15 23:58 ` Greg KH
2012-10-16 0:32 ` [PATCH 1/2] Staging: android: binder: Fix memory leak on thread/process exit Arve Hjønnevåg
2012-10-16 0:32 ` [PATCH 2/2] Staging: android: binder: Allow using highmem for binder buffers Arve Hjønnevåg
2012-10-16 7:12 ` Greg KH
2012-10-16 7:11 ` [PATCH 1/2] Staging: android: binder: Fix memory leak on thread/process exit Greg KH
2012-10-16 22:45 ` Arve Hjønnevåg
2012-10-22 20:00 ` Greg KH
2012-10-23 0:58 ` Arve Hjønnevåg
2012-10-23 3:12 ` Greg KH
2012-10-16 0:39 ` Fix memory leak in binder--version2 Arve Hjønnevåg
2012-10-16 7:11 ` Greg KH
2012-10-16 22:29 ` [PATCH 1/4] Staging: android: binder: Add some missing binder_stat_br calls Arve Hjønnevåg
2012-10-16 22:29 ` [PATCH 2/4] Staging: android: binder: Add some tracepoints Arve Hjønnevåg
2012-10-16 22:29 ` [PATCH 3/4] Staging: android: binder: Fix memory leak on thread/process exit Arve Hjønnevåg
2012-10-16 22:29 ` Arve Hjønnevåg [this message]
2012-10-16 22:33 ` Fix memory leak in binder--version2 Arve Hjønnevåg
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=1350426595-18059-4-git-send-email-arve@android.com \
--to=arve@android.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=alex.zuo@intel.com \
--cc=ccross@android.com \
--cc=davej@redhat.com \
--cc=di.zhang@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=rusty@rustcorp.com.au \
--cc=xiaobing.tu@intel.com \
--cc=xindong.ma@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.