[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250921231334093OILrn169i655S8Pe0KMUC@zte.com.cn>
Date: Sun, 21 Sep 2025 23:13:34 +0800 (CST)
From: <xu.xin16@....com.cn>
To: <xu.xin16@....com.cn>, <akpm@...ux-foundation.org>
Cc: <shakeel.butt@...ux.dev>, <hannes@...xchg.org>, <mhocko@...nel.org>,
<roman.gushchin@...ux.dev>, <david@...hat.com>,
<chengming.zhou@...ux.dev>, <muchun.song@...ux.dev>,
<linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
<cgroups@...r.kernel.org>
Subject: [PATCH linux-next v3 4/6] ksm: make ksm_process_profit available on CONFIG_PROCFS=n
From: xu xin <xu.xin16@....com.cn>
This remove the restriction CONFIG_PROCFS=y for the heler function
ksm_process_profit(), then we can use it for the later patches on
CONFIG_PROCFS=n.
Reported-by: kernel test robot <lkp@...el.com>
Closes: https://lore.kernel.org/all/202509142046.QatEaTQV-lkp@intel.com/
Signed-off-by: xu xin <xu.xin16@....com.cn>
---
mm/ksm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/ksm.c b/mm/ksm.c
index e49f4b86ffb0..a68d4b37b503 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -3282,7 +3282,6 @@ static void wait_while_offlining(void)
}
#endif /* CONFIG_MEMORY_HOTREMOVE */
-#ifdef CONFIG_PROC_FS
/*
* The process is mergeable only if any VMA is currently
* applicable to KSM.
@@ -3307,7 +3306,6 @@ long ksm_process_profit(struct mm_struct *mm)
return (long)(mm->ksm_merging_pages + mm_ksm_zero_pages(mm)) * PAGE_SIZE -
mm->ksm_rmap_items * sizeof(struct ksm_rmap_item);
}
-#endif /* CONFIG_PROC_FS */
#ifdef CONFIG_MEMCG
struct memcg_ksm_stat {
--
2.25.1
Powered by blists - more mailing lists