linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: kernel test robot <lkp@intel.com>
Cc: xu xin <xu.xin16@zte.com.cn>,
	oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [akpm-mm:mm-new 313/316] memcontrol.c:undefined reference to `ksm_process_profit'
Date: Sat, 3 May 2025 18:39:23 -0700	[thread overview]
Message-ID: <20250503183923.848bd73811fa7127d50ddf54@linux-foundation.org> (raw)
In-Reply-To: <202505030429.a2GUiRAz-lkp@intel.com>

On Sat, 3 May 2025 04:31:37 +0800 kernel test robot <lkp@intel.com> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
> head:   108c0a7e7ceafc00a50d1b2fd56cfc8fa99d4ddd
> commit: 94c2f83bdfb95917213b7e95584fc2696c210655 [313/316] memcontrol: add ksm_profit in cgroup/memory.ksm_stat
> config: x86_64-buildonly-randconfig-002-20250503 (https://download.01.org/0day-ci/archive/20250503/202505030429.a2GUiRAz-lkp@intel.com/config)
> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250503/202505030429.a2GUiRAz-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202505030429.a2GUiRAz-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    ld: mm/memcontrol.o: in function `evaluate_memcg_ksm_stat':
> >> memcontrol.c:(.text+0xdb5): undefined reference to `ksm_process_profit'

urgh, CONFIG_PROC_FS=n.

It was kind of ksm_process_profit() to avoid bloating CONFIG_PROC_FS=n
kernels but really, are KSM and memcg even viable without procfs? 

I think I'll just do this.


--- a/mm/ksm.c~memcontrol-add-ksm_profit-in-cgroup-memoryksm_stat-fix
+++ a/mm/ksm.c
@@ -3268,7 +3268,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.
@@ -3293,7 +3292,6 @@ long ksm_process_profit(struct mm_struct
 	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_SYSFS
 /*
_



      reply	other threads:[~2025-05-04  1:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-02 20:31 kernel test robot
2025-05-04  1:39 ` Andrew Morton [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=20250503183923.848bd73811fa7127d50ddf54@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=xu.xin16@zte.com.cn \
    /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