linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Kaitao Cheng <pilgrimtao@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Sasha Levin <sashal@kernel.org>,  Michal Hocko <mhocko@suse.com>,
	Oscar Salvador <osalvador@suse.de>,
	 Mel Gorman <mgorman@techsingularity.net>,
	Mike Rapoport <rppt@linux.ibm.com>,
	 Alexander Duyck <alexander.h.duyck@linux.intel.com>,
	 Pasha Tatashin <pavel.tatashin@microsoft.com>,
	Alexander Potapenko <glider@google.com>,
	 Linux MM <linux-mm@kvack.org>,
	 Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Muchun Song <smuchun@gmail.com>
Subject: Re: [PATCH] mm, page_alloc: drop pointless static qualifier in build_zonelists()
Date: Fri, 27 Sep 2019 12:32:54 -0700	[thread overview]
Message-ID: <CAPcyv4imXWDSoVet4a0CYtO3JxN__f1hq+LCKTnjjF+4HB+6Kw@mail.gmail.com> (raw)
In-Reply-To: <20190927161416.62293-1-pilgrimtao@gmail.com>

On Fri, Sep 27, 2019 at 9:14 AM Kaitao Cheng <pilgrimtao@gmail.com> wrote:
>
> There is no need to make the 'node_order' variable static
> since new value always be assigned before use it.
>
> Signed-off-by: Kaitao Cheng <pilgrimtao@gmail.com>
> Signed-off-by: Muchun Song <smuchun@gmail.com>
> ---
>  mm/page_alloc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 3334a769eb91..c473c304d09f 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -5597,7 +5597,7 @@ static void build_thisnode_zonelists(pg_data_t *pgdat)
>
>  static void build_zonelists(pg_data_t *pgdat)
>  {
> -       static int node_order[MAX_NUMNODES];
> +       int node_order[MAX_NUMNODES];

This isn't pointless. This prevents 4KB stack allocation which might overflow.


  reply	other threads:[~2019-09-27 19:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-27 16:14 Kaitao Cheng
2019-09-27 19:32 ` Dan Williams [this message]
2019-10-08 19:06 ` Christopher Lameter
2019-10-08 19:21   ` 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=CAPcyv4imXWDSoVet4a0CYtO3JxN__f1hq+LCKTnjjF+4HB+6Kw@mail.gmail.com \
    --to=dan.j.williams@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.h.duyck@linux.intel.com \
    --cc=glider@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=osalvador@suse.de \
    --cc=pavel.tatashin@microsoft.com \
    --cc=pilgrimtao@gmail.com \
    --cc=rppt@linux.ibm.com \
    --cc=sashal@kernel.org \
    --cc=smuchun@gmail.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