linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: xu.xin16@zte.com.cn, akpm@linux-foundation.org
Cc: shakeel.butt@linux.dev, hannes@cmpxchg.org, mhocko@kernel.org,
	roman.gushchin@linux.dev, chengming.zhou@linux.dev,
	muchun.song@linux.dev, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, cgroups@vger.kernel.org
Subject: Re: [PATCH linux-next v3 4/6] ksm: make ksm_process_profit available on CONFIG_PROCFS=n
Date: Tue, 23 Sep 2025 10:25:03 +0200	[thread overview]
Message-ID: <9688edb5-f474-49a4-ac84-0702ed3af3a2@redhat.com> (raw)
In-Reply-To: <20250921231334093OILrn169i655S8Pe0KMUC@zte.com.cn>

On 21.09.25 17:13, xu.xin16@zte.com.cn wrote:
> From: xu xin <xu.xin16@zte.com.cn>
> 
> This remove the restriction CONFIG_PROCFS=y for the heler function

s/heler/helper.

> ksm_process_profit(), then we can use it for the later patches on
> CONFIG_PROCFS=n.


Better to something like this:

"Let's provide ksm_process_profit() also without CONFIG_PROCFS so we can 
use it from memcg code next."

?

> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/all/202509142046.QatEaTQV-lkp@intel.com/

Both tags should be dropped as there is nothing fixed here.

> Signed-off-by: xu xin <xu.xin16@zte.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 {


-- 
Cheers

David / dhildenb



  reply	other threads:[~2025-09-23  8:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-21 15:07 [PATCH linux-next v3 0/6] memcg: Support per-memcg KSM metrics xu.xin16
2025-09-21 15:08 ` [PATCH linux-next v3 1/6] memcg: add per-memcg ksm_rmap_items stat xu.xin16
2025-09-23  8:28   ` David Hildenbrand
2025-09-21 15:11 ` [PATCH linux-next v3 2/6] memcg: show ksm_zero_pages count in memory.stat xu.xin16
2025-09-21 15:12 ` [PATCH linux-next v3 3/6] memcg: show ksm_merging_pages xu.xin16
2025-09-21 15:13 ` [PATCH linux-next v3 4/6] ksm: make ksm_process_profit available on CONFIG_PROCFS=n xu.xin16
2025-09-23  8:25   ` David Hildenbrand [this message]
2025-09-21 15:14 ` [PATCH linux-next v3 5/6] memcg: add per-memcg ksm_profit xu.xin16
2025-09-21 15:15 ` [PATCH linux-next v3 6/6] Documentation: add KSM statistic counters description xu.xin16
2025-09-22  8:20 ` [PATCH linux-next v3 0/6] memcg: Support per-memcg KSM metrics Michal Hocko
2025-09-22  9:31   ` 答复: " xu.xin16
2025-09-23 14:17     ` Michal Hocko
2025-09-23  8:26 ` David Hildenbrand
2025-09-23 17:58 ` Shakeel Butt

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=9688edb5-f474-49a4-ac84-0702ed3af3a2@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=chengming.zhou@linux.dev \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@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