linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Shakeel Butt <shakeelb@google.com>
To: Chen Wandun <chenwandun@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Nicholas Piggin <npiggin@gmail.com>,
	 Linux MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	 Eric Dumazet <edumazet@google.com>,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	guohanjun@huawei.com,
	 "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Subject: Re: [PATCH v2 1/2] mm/vmalloc: fix numa spreading for large hash tables
Date: Tue, 19 Oct 2021 08:56:26 -0700	[thread overview]
Message-ID: <CALvZod63A_RsKJKRmAtZFXHB=EzX0JhKXTcoUGg7zn2pgK-Kwg@mail.gmail.com> (raw)
In-Reply-To: <20211018123710.1540996-2-chenwandun@huawei.com>

On Mon, Oct 18, 2021 at 5:23 AM Chen Wandun <chenwandun@huawei.com> wrote:
>
[...]
>
>         /* High-order pages or fallback path if "bulk" fails. */
> -       while (nr_allocated < nr_pages) {
> -               struct page *page;
> -               int i;
>
> -               page = alloc_pages_node(nid, gfp, order);
> +       page = NULL;

No need for the above NULL assignment.

After removing this, you can add:

Reviewed-by: Shakeel Butt <shakeelb@google.com>

> +       while (nr_allocated < nr_pages) {
> +               if (nid == NUMA_NO_NODE)
> +                       page = alloc_pages(gfp, order);
> +               else
> +                       page = alloc_pages_node(nid, gfp, order);
>                 if (unlikely(!page))
>                         break;
>
> --
> 2.25.1
>


  parent reply	other threads:[~2021-10-19 15:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 12:37 [PATCH v2 0/2] " Chen Wandun
2021-10-18 12:37 ` [PATCH v2 1/2] mm/vmalloc: " Chen Wandun
2021-10-18 12:39   ` Matthew Wilcox
2021-10-18 13:01     ` Chen Wandun
2021-10-19 15:53     ` Shakeel Butt
2021-10-19 15:58       ` Eric Dumazet
2021-10-18 14:03   ` Uladzislau Rezki
2021-10-19 15:56   ` Shakeel Butt [this message]
2021-10-18 12:37 ` [PATCH v2 2/2] mm/vmalloc: introduce alloc_pages_bulk_array_mempolicy to accelerate memory allocation Chen Wandun

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='CALvZod63A_RsKJKRmAtZFXHB=EzX0JhKXTcoUGg7zn2pgK-Kwg@mail.gmail.com' \
    --to=shakeelb@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=chenwandun@huawei.com \
    --cc=edumazet@google.com \
    --cc=guohanjun@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@gmail.com \
    --cc=urezki@gmail.com \
    --cc=wangkefeng.wang@huawei.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