From: Michal Hocko <mhocko@suse.com>
To: Muchun Song <smuchun@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>, Hui Su <sh_def@163.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm/page_alloc: remove the static for local variable node_order
Date: Mon, 4 Jan 2021 09:47:39 +0100 [thread overview]
Message-ID: <20210104084739.GB13207@dhcp22.suse.cz> (raw)
In-Reply-To: <CAPSr9jHa8nT=Y1R2w9v7UUFJNXhCFohwDGwyv7WOWjKADZEchw@mail.gmail.com>
On Wed 30-12-20 21:41:30, Muchun Song wrote:
> On Wed, Dec 30, 2020 at 8:45 PM Matthew Wilcox <willy@infradead.org> wrote:
> >
> > On Wed, Dec 30, 2020 at 07:40:14PM +0800, Hui Su wrote:
> > > local variable node_order do not need the static here.
> >
> > It bloody well does. It can be up to 2^10 entries on x86 (and larger
> > on others) That's 4kB which you've now moved onto the stack.
>
> This is not the first time I have seen similar changes. So what
> do you think about adding a comment here to avoid another one
> do this in the feature?
Well, this is not an unusual technieque to reduce the stack space. I am
not really sure we really need to put an explicit comment about that. I
would appreciate much more if patch submitters took an extra step when
creating seemingly trivial patches and either consult the history of the
respective code or look for a similar pattern elsewhere before sending
them.
I do agree with Willy that mm code is usually not a great place to
search for trivial patches. First of all most people tend to be pretty
busy with other reviewes and the code has grown rather delicate and
tricky so each review is non trivial.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2021-01-04 8:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-30 11:40 Hui Su
2020-12-30 12:42 ` Matthew Wilcox
2020-12-30 12:59 ` Hui Su
2020-12-30 13:41 ` Muchun Song
2021-01-04 8:47 ` Michal Hocko [this message]
2021-01-04 23:23 ` Andrew Morton
2021-01-05 1:30 ` Matthew Wilcox
2021-01-05 7:28 ` Michal Hocko
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=20210104084739.GB13207@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sh_def@163.com \
--cc=smuchun@gmail.com \
--cc=willy@infradead.org \
/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