Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp592462pxb; Tue, 19 Oct 2021 09:01:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYHMfeTRZqN5NIwcXTKYSABNZwtFvpQzjfcqvfpx30A6wbIOvKL48ZGGIL13yy+ilWY/Y0 X-Received: by 2002:a17:906:3715:: with SMTP id d21mr40253670ejc.74.1634659271806; Tue, 19 Oct 2021 09:01:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634659271; cv=none; d=google.com; s=arc-20160816; b=tZ9/qMwYvL1BPJeIdVlSMdSkez0fkUvMkS/NRBD/CrekJpwcmIjN/wMQD0RPUvS67+ C09BKLRz5EoFsgwTOc8I6lW1KicvB0zZ2TpTYKxkNxEjZZe9YkDC5Ch0eQE6Ksdfk2LR Y/RScr1R3i1LajsEu9hO5tHjHFBcbYiA0HeBIUSyfgNltXCLpbwX4MK9Nwp+3XYlRdnB 1Pa94FzwimO9iiVrzg/7CLDnDChZaz51NIZeMS8JL/X3YxuZTnYjFpV3MKxLBxSZgBZz kbRvQwQ8QdFEBZA6q504jKNlaS+YPYS0RJplIuBMdRMVXaKaDCzq4LpZ9KSadysnp0TF PDVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=l6UyNWiQ7BoMTL4xhxCJx0qmxiRi5S2D6EPQ7sUWYlk=; b=FSYyET7OaXDcI8P8DuAhHlGr5M7YVw12iu5sgEDa6YhthTfVRHythXdkgXjaFdBkTH oqlXZ/XniX04+M5kdHwbnBCmHTr3BLUD/OJpz/U7SJwcYQQmbuWia9Icn1J6Q9HbhcOP d3HqSbA2LUI4eMGhEA8v0qsibT8jQKqLSwaOGPV3NQmS3fG/cR7WOVPyYH5MY+zmPVX+ xXyy0nE3FTYN86asaFLGB6XRdmxu205rQD6E49ygvUlLCGo0rO0bTuqwPP8eV78BJRDD 5pVznE+r9ZFAGpFkrR8GhFI3Xk1hdhM0QG4rdaD7O97iMmEXYrJhxRSPDwNS9Aa4EtMu gYcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=l1QIf2HB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j12si311987edw.239.2021.10.19.09.00.47; Tue, 19 Oct 2021 09:01:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=l1QIf2HB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231750AbhJSP6x (ORCPT + 99 others); Tue, 19 Oct 2021 11:58:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229774AbhJSP6w (ORCPT ); Tue, 19 Oct 2021 11:58:52 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E9CFC06161C for ; Tue, 19 Oct 2021 08:56:39 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id g36so8571319lfv.3 for ; Tue, 19 Oct 2021 08:56:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=l6UyNWiQ7BoMTL4xhxCJx0qmxiRi5S2D6EPQ7sUWYlk=; b=l1QIf2HBZF5dgneEUJ+69UXIQWgsG1hl9tG/ALRoDN8uvKZfXJBoU7rsMJXh1lZNKI YfWcky8Vb3G7jm+T9EvQyUTFJRJDfeVk9V1z9uPGotOg3dNqVH5Sms9muEkC+aB640o/ +zO0gBrkElrNwfCX9Wm8SRmCUtd02uzXxst0MLpyhq1tPMmR3eq9Lt5pDtrAONArYcfw /+wKdCDEbw/h6gSy1jPKXHGRZW+ymnDaZ8hUuVR6ng5sgX0mldtc1Nrs7yeAFJFJ+9NA 6gpjJHnjAhj4qbVgNykcltsT2tasi1PyEyi307aIIyJsLAc06mFL3/Arxk8dIt8P7+bL xtZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=l6UyNWiQ7BoMTL4xhxCJx0qmxiRi5S2D6EPQ7sUWYlk=; b=1W/KSeGYvHZH1KgbJa5rwwc0g18ibavUnH++2UqN/aTSC/dJpB+VqwgpODcAvPTVTV cgI4TzkwOnkKE2agJVlkj8no3ZCOTsttWhLOEvaTHdxaY7THTcXoTxN6benuMrKQS6jZ 3P9r/33rN7hIPpEuqA0g9VWd8UoKTW5qfuv5+sV9Yy0ZXFAA6rJoPZEw/re4ZJBYK68P kHH52YRK8Y1ag85uD6cqSPrQ48QWm+WLxBiqnXwPwGfQV959+/x2VA/bQYxPFodgF7Ct xMG9lfQAfV1izy+23ovKq9RBdrj78UxMwK20W7SFSxdQVPz6/NPzLp8aG6xzyDuvbmVK xliQ== X-Gm-Message-State: AOAM532tTrVw0bEZk45kUVCjK/PI+e0hD239pAWeJZM/BMj8B2eUF5ID e9QO2d4ENYPKHNS7JqRH0V86/a8W0tFNcc0frftUAw== X-Received: by 2002:ac2:5e3c:: with SMTP id o28mr6663490lfg.184.1634658997345; Tue, 19 Oct 2021 08:56:37 -0700 (PDT) MIME-Version: 1.0 References: <20211018123710.1540996-1-chenwandun@huawei.com> <20211018123710.1540996-2-chenwandun@huawei.com> In-Reply-To: <20211018123710.1540996-2-chenwandun@huawei.com> From: Shakeel Butt Date: Tue, 19 Oct 2021 08:56:26 -0700 Message-ID: Subject: Re: [PATCH v2 1/2] mm/vmalloc: fix numa spreading for large hash tables To: Chen Wandun Cc: Andrew Morton , Nicholas Piggin , Linux MM , LKML , Eric Dumazet , Kefeng Wang , guohanjun@huawei.com, "Uladzislau Rezki (Sony)" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 18, 2021 at 5:23 AM Chen Wandun 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 > + 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 >