From: Chen Wandun <chenwandun@huawei.com>
To: <akpm@linux-foundation.org>, <linux-mm@kvack.org>,
<linux-kernel@vger.kernel.org>, <wangkefeng.wang@huawei.com>,
<weiyongjun1@huawei.com>
Cc: Chen Wandun <chenwandun@huawei.com>
Subject: [PATCH] mm/vmalloc: add missing __GFP_HIGHMEM flag for vmalloc
Date: Mon, 26 Jul 2021 11:23:33 +0800 [thread overview]
Message-ID: <20210726032333.3404164-1-chenwandun@huawei.com> (raw)
struct page array can also be allocated in highmem during vmalloc,
that will ease the low memory stress in 32bit system.
Fixes: f255935b9767 ("mm: cleanup the gfp_mask handling in __vmalloc_area_node")
Signed-off-by: Chen Wandun <chenwandun@huawei.com>
---
mm/vmalloc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 3824dc16ce1c..8d9b0b08a6dc 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2885,7 +2885,8 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
/* Please note that the recursion is strictly bounded. */
if (array_size > PAGE_SIZE) {
- area->pages = __vmalloc_node(array_size, 1, nested_gfp, node,
+ area->pages = __vmalloc_node(array_size, 1,
+ nested_gfp | __GFP_HIGHMEM, node,
area->caller);
} else {
area->pages = kmalloc_node(array_size, nested_gfp, node);
--
2.25.1
next reply other threads:[~2021-07-26 3:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-26 3:23 Chen Wandun [this message]
2021-07-26 3:25 ` [PATCH] mm/vmalloc: add missing __GFP_HIGHMEM flag for vmalloc Matthew Wilcox
2021-07-26 4:05 ` Chen Wandun
2021-07-27 17:30 ` Matthew Wilcox
2021-07-28 1:13 ` Chen Wandun
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=20210726032333.3404164-1-chenwandun@huawei.com \
--to=chenwandun@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=wangkefeng.wang@huawei.com \
--cc=weiyongjun1@huawei.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 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).