From: Andrew Morton <akpm@linux-foundation.org>
To: Mel Gorman <mgorman@techsingularity.net>
Cc: wenyang.linux@foxmail.com, Oscar Salvador <osalvador@suse.de>,
William Lam <william.lam@bytedance.com>,
Pintu Kumar <pintu@codeaurora.org>, Fu Wei <wefu@redhat.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm: compaction: optimize compact_memory to comply with the admin-guide
Date: Tue, 2 May 2023 13:50:08 -0700 [thread overview]
Message-ID: <20230502135008.cb8cc8475971d190d32e699a@linux-foundation.org> (raw)
In-Reply-To: <20230428105848.ghtz5v3q6mug4hiw@techsingularity.net>
On Fri, 28 Apr 2023 11:58:48 +0100 Mel Gorman <mgorman@techsingularity.net> wrote:
> > --- a/mm/compaction.c
> > +++ b/mm/compaction.c
> > @@ -1736,6 +1736,7 @@ static int sysctl_compact_unevictable_allowed __read_mostly = CONFIG_COMPACT_UNE
> > */
> > static unsigned int __read_mostly sysctl_compaction_proactiveness = 20;
> > static int sysctl_extfrag_threshold = 500;
> > +static int sysctl_compact_memory;
> >
>
> __read_mostly but that aside, it's only used in
> sysctl_compaction_handler so could also be declared as static within
> that function. That way if CONFIG_SYSCTL is not set, it should be
> guaranteed that the compiler does not save storage for it.
but
static struct ctl_table vm_compaction[] = {
{
.procname = "compact_memory",
.data = &sysctl_compact_memory,
.maxlen = sizeof(int),
.mode = 0200,
.proc_handler = sysctl_compaction_handler,
},
I'll add the __read_mostly, thanks.
prev parent reply other threads:[~2023-05-02 20:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-25 15:52 wenyang.linux
2023-04-28 10:58 ` Mel Gorman
2023-05-02 20:50 ` 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=20230502135008.cb8cc8475971d190d32e699a@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=osalvador@suse.de \
--cc=pintu@codeaurora.org \
--cc=wefu@redhat.com \
--cc=wenyang.linux@foxmail.com \
--cc=william.lam@bytedance.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