[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230911104906.2058503-1-zhaoyang.huang@unisoc.com>
Date: Mon, 11 Sep 2023 18:49:06 +0800
From: "zhaoyang.huang" <zhaoyang.huang@...soc.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Matthew Wilcox <willy@...radead.org>,
Michal Hocko <mhocko@...nel.org>, <linux-mm@...ck.org>,
<linux-kernel@...r.kernel.org>,
Zhaoyang Huang <huangzhaoyang@...il.com>, <ke.wang@...soc.com>
Subject: [PATCH] mm: remove redundant clear page when CONFIG_INIT_ON_ALLOC_DEFAULT_ON configured
From: Zhaoyang Huang <zhaoyang.huang@...soc.com>
There will be redundant clear page within vma_alloc_zeroed_movable_folio
when CONFIG_INIT_ON_ALLOC_DEFAULT_ON is on. Remove it by judging related
configs.
Signed-off-by: Zhaoyang Huang <zhaoyang.huang@...soc.com>
---
include/linux/highmem.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index 99c474de800d..3926f8414729 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -227,7 +227,7 @@ struct folio *vma_alloc_zeroed_movable_folio(struct vm_area_struct *vma,
struct folio *folio;
folio = vma_alloc_folio(GFP_HIGHUSER_MOVABLE, 0, vma, vaddr, false);
- if (folio)
+ if (folio && !want_init_on_alloc(GFP_HIGHUSER_MOVABLE))
clear_user_highpage(&folio->page, vaddr);
return folio;
--
2.25.1
Powered by blists - more mailing lists