From patchwork Sun May 16 20:20:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 12260587 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93E89C433B4 for ; Sun, 16 May 2021 20:21:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 04BCD61152 for ; Sun, 16 May 2021 20:21:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 04BCD61152 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 59EED6B0036; Sun, 16 May 2021 16:21:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 575746B006E; Sun, 16 May 2021 16:21:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3EF746B0070; Sun, 16 May 2021 16:21:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0105.hostedemail.com [216.40.44.105]) by kanga.kvack.org (Postfix) with ESMTP id 09E6C6B0036 for ; Sun, 16 May 2021 16:21:08 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 992F1181AEF23 for ; Sun, 16 May 2021 20:21:08 +0000 (UTC) X-FDA: 78148213416.27.47A5FB7 Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) by imf22.hostedemail.com (Postfix) with ESMTP id 63142C0001EA for ; Sun, 16 May 2021 20:21:07 +0000 (UTC) Received: by mail-lj1-f169.google.com with SMTP id p20so4724357ljj.8 for ; Sun, 16 May 2021 13:21:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ftlbpKyqwT0RJWIAe0hR3P6y0TcUKvWKDzduTTWn2Fg=; b=lieanZqLCLS2LxP9L02DVSLudXXd7PRMTH6t3WR9+JM+RBJOFnmYxHffww3ace9rFQ p6WP8/iqS4geaNxxt/o0sjvuncrPKb0fKBEQRB7Sy23AY0frBsPBGvGerLVAGHi6qVHw RHJ1mjs5MZvWLYpvR9gkQ4WEu3AHOEKMHH1+n/Ied465UQY2K3d5aN5i8rkkHUMjIiV5 NVSHaBdXf9hF9P+2dJnTb5/ETaOwWROj+xGXZuGewUAkWt3Ao5la106TZ81nyKhaUzMr iJJIHgk/WFgoGXJhiNnXyWXSFmcv/Vjc8AVGJqVdSiKq92Y1KjAXlv2pqnn/SkGFE63v Oceg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ftlbpKyqwT0RJWIAe0hR3P6y0TcUKvWKDzduTTWn2Fg=; b=Hk/YEbCeduOtf32ebOb/paLC9Zhi2g9r7TR5LHL27rxvoZX67jmwHMD/GbFj0iTZmO 8XFF/5Ug0JdABK3Bs6Xz2xFmhCau8bTgtA0Z4MWG4wjpqhTUmtpPYoUXBOeZsv9mLPIL SaDAnxzwB20GWryXE21U41biuLPDmMXWkwVBI154VvQ8Ewvq+Xs7Iybiwt5N+AYvFxeT Za6DE4ILayGjARXmDeuHzmze0T1IdOPyFv6Za4snF1wP9OoDealPhS1iwaLuU4OkCJwg xXxB4jp5t3nZBx9ecBSK+hym01Lta2AefcMdixmyQeqynjUyQKce5AUajWogMDUSPXm4 +7rw== X-Gm-Message-State: AOAM530CXyzUC/itdrUfIUEWpPBVYfNAdxdRnlCk02JNzjqPhUiHg93X GyHGpf1cmMllAwZhQio4sD0= X-Google-Smtp-Source: ABdhPJx8rYX1Khb1coxRS+ykKXCHKjLxc5SYiXS4V3D0lZSIcRrzsoWERwsfqXE93w4C2Vyjq6MTIQ== X-Received: by 2002:a2e:91cb:: with SMTP id u11mr41546365ljg.83.1621196466691; Sun, 16 May 2021 13:21:06 -0700 (PDT) Received: from pc638.lan (h5ef52e3d.seluork.dyn.perspektivbredband.net. [94.245.46.61]) by smtp.gmail.com with ESMTPSA id y28sm378195lfg.210.2021.05.16.13.21.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 May 2021 13:21:05 -0700 (PDT) From: "Uladzislau Rezki (Sony)" To: Andrew Morton Cc: linux-mm@kvack.org, LKML , Mel Gorman , Matthew Wilcox , Nicholas Piggin , Uladzislau Rezki , Hillf Danton , Michal Hocko , Oleksiy Avramchenko , Steven Rostedt Subject: [PATCH 0/3] vmalloc() vs bulk allocator v2 Date: Sun, 16 May 2021 22:20:53 +0200 Message-Id: <20210516202056.2120-1-urezki@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=lieanZqL; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf22.hostedemail.com: domain of urezki@gmail.com designates 209.85.208.169 as permitted sender) smtp.mailfrom=urezki@gmail.com X-Stat-Signature: yje8u4mg7et6ejyyybxw8myhg5kt1z5q X-Rspamd-Queue-Id: 63142C0001EA X-Rspamd-Server: rspam02 X-HE-Tag: 1621196467-75426 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi. There are three patches in this small series. This is a second iteration. First one was buggy and leaded to kernel panic due to passing NUMA_NO_NODE as "nid" to the bulk allocator(it assumes to have a valid node). Therefore the patch number [1] adds an extra helper that guarantees a correct numa node ID if it is not specified. Basically saying when it is invoked with NUMA_NO_NODE. A patch [2] has been slightly updated, the change-log is below. V1 -> V2: - Switch to the alloc_pages_bulk_array_node() helper so the NUMA_NO_NODE is correctly handled(similar to alloc_pages_node() API func). - Use "while()" loop instead of "for()" for high-order pages and increase number of allocated pages after actual alloc. Uladzislau Rezki (Sony) (3): [1] mm/page_alloc: Add an alloc_pages_bulk_array_node() helper [2] mm/vmalloc: Switch to bulk allocator in __vmalloc_area_node() [3] mm/vmalloc: Print a warning message first on failure include/linux/gfp.h | 9 ++++++ mm/vmalloc.c | 78 +++++++++++++++++++++++++-------------------- 2 files changed, 52 insertions(+), 35 deletions(-) --- 2.20.1