linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: ye.xingchen@zte.com.cn, mcgrof@kernel.org
Cc: keescook@chromium.org, yzaikin@google.com,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	chi.minghao@zte.com.cn
Subject: Re: [PATCH V3 1/2] mm: compaction: move compact_memory sysctl to its own file
Date: Thu, 9 Mar 2023 10:47:46 +0100	[thread overview]
Message-ID: <17e2a143-37eb-fb4e-d8a9-2d6dc20f9499@suse.cz> (raw)
In-Reply-To: <202303091144483856804@zte.com.cn>

On 3/9/23 04:44, ye.xingchen@zte.com.cn wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
> 
> The compact_memory is part of compaction, move it to its own file.
> 
> Link: https://lore.kernel.org/all/ZAJwoXJCzfk1WIBx@bombadil.infradead.org/
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
> ---
>  kernel/sysctl.c |  7 -------
>  mm/compaction.c | 15 +++++++++++++++
>  2 files changed, 15 insertions(+), 7 deletions(-)
> 
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index c14552a662ae..f574f9985df4 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -2190,13 +2190,6 @@ static struct ctl_table vm_table[] = {
>  		.extra2		= SYSCTL_FOUR,
>  	},
>  #ifdef CONFIG_COMPACTION
> -	{
> -		.procname	= "compact_memory",
> -		.data		= NULL,
> -		.maxlen		= sizeof(int),
> -		.mode		= 0200,
> -		.proc_handler	= sysctl_compaction_handler,
> -	},
>  	{
>  		.procname	= "compaction_proactiveness",
>  		.data		= &sysctl_compaction_proactiveness,

There's also this one, and two more, please move all of them at once?

> diff --git a/mm/compaction.c b/mm/compaction.c
> index 5a9501e0ae01..acbda28c11f4 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -2763,6 +2763,18 @@ int compaction_proactiveness_sysctl_handler(struct ctl_table *table, int write,
>  	return 0;
>  }
> 
> +#ifdef CONFIG_SYSCTL
> +static struct ctl_table vm_compact_memory[] = {
> +	{
> +		.procname	= "compact_memory",
> +		.data		= NULL,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0200,
> +		.proc_handler	= sysctl_compaction_handler,
> +	},
> +	{ }
> +};
> +#endif
>  /*
>   * This is the entry point for compacting all nodes via
>   * /proc/sys/vm/compact_memory
> @@ -3078,6 +3090,9 @@ static int __init kcompactd_init(void)
> 
>  	for_each_node_state(nid, N_MEMORY)
>  		kcompactd_run(nid);
> +#ifdef CONFIG_SYSCTL
> +	register_sysctl_init("vm", vm_compact_memory);
> +#endif
>  	return 0;
>  }
>  subsys_initcall(kcompactd_init)



  reply	other threads:[~2023-03-09  9:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09  3:44 ye.xingchen
2023-03-09  9:47 ` Vlastimil Babka [this message]
2023-03-19 20:54   ` Luis Chamberlain

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=17e2a143-37eb-fb4e-d8a9-2d6dc20f9499@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=chi.minghao@zte.com.cn \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mcgrof@kernel.org \
    --cc=ye.xingchen@zte.com.cn \
    --cc=yzaikin@google.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