linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Laura Abbott <lauraa@codeaurora.org>
To: linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org
Cc: Kyungmin Park <kmpark@infradead.org>,
	Russell King <linux@arm.linux.org.uk>,
	Laura Abbott <lauraa@codeaurora.org>,
	Neeti Desai <neetid@codeaurora.org>
Subject: [RFC PATCHv2 4/4] mm/vmalloc.c: Treat the entire kernel virtual space as vmalloc
Date: Tue, 12 Nov 2013 14:27:32 -0800	[thread overview]
Message-ID: <1384295252-31778-5-git-send-email-lauraa@codeaurora.org> (raw)
In-Reply-To: <1384295252-31778-1-git-send-email-lauraa@codeaurora.org>

With CONFIG_ENABLE_VMALLOC_SAVINGS, all lowmem is tracked in
vmalloc. This means that all the kernel virtual address space
can be treated as part of the vmalloc region. Allow vm areas
to be allocated from the full kernel address range.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
---
 mm/vmalloc.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 2ec9ac7..31644b6 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1394,16 +1394,27 @@ struct vm_struct *__get_vm_area_caller(unsigned long size, unsigned long flags,
  */
 struct vm_struct *get_vm_area(unsigned long size, unsigned long flags)
 {
+#ifdef CONFIG_ENABLE_VMALLOC_SAVING
+	return __get_vm_area_node(size, 1, flags, PAGE_OFFSET, VMALLOC_END,
+				  NUMA_NO_NODE, GFP_KERNEL,
+				  __builtin_return_address(0));
+#else
 	return __get_vm_area_node(size, 1, flags, VMALLOC_START, VMALLOC_END,
 				  NUMA_NO_NODE, GFP_KERNEL,
 				  __builtin_return_address(0));
+#endif
 }
 
 struct vm_struct *get_vm_area_caller(unsigned long size, unsigned long flags,
 				const void *caller)
 {
+#ifdef CONFIG_ENABLE_VMALLOC_SAVING
+	return __get_vm_area_node(size, 1, flags, PAGE_OFFSET, VMALLOC_END,
+				  NUMA_NO_NODE, GFP_KERNEL, caller);
+#else
 	return __get_vm_area_node(size, 1, flags, VMALLOC_START, VMALLOC_END,
 				  NUMA_NO_NODE, GFP_KERNEL, caller);
+#endif
 }
 
 /**
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

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

      parent reply	other threads:[~2013-11-12 22:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-12 22:27 [RFC PATCHv2 0/4] Intermix Lowmem and Vmalloc Laura Abbott
2013-11-12 22:27 ` [RFC PATCHv2 1/4] arm: mm: Add iotable_init_novmreserve Laura Abbott
2013-11-12 22:27 ` [RFC PATCHv2 2/4] arm: mm: Track lowmem in vmalloc Laura Abbott
2013-11-12 22:27 ` [RFC PATCHv2 3/4] mm/vmalloc.c: Allow lowmem to be tracked " Laura Abbott
2013-11-12 22:27 ` Laura Abbott [this message]

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=1384295252-31778-5-git-send-email-lauraa@codeaurora.org \
    --to=lauraa@codeaurora.org \
    --cc=kmpark@infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@arm.linux.org.uk \
    --cc=neetid@codeaurora.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;
as well as URLs for NNTP newsgroup(s).