From patchwork Sun Aug 14 06:06:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rebecca Mckeever X-Patchwork-Id: 12942852 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FC4FC25B06 for ; Sun, 14 Aug 2022 06:06:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BDD4E8E0002; Sun, 14 Aug 2022 02:06:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B8CD68E0001; Sun, 14 Aug 2022 02:06:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A549C8E0002; Sun, 14 Aug 2022 02:06:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 95F958E0001 for ; Sun, 14 Aug 2022 02:06:48 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 612C9AB31A for ; Sun, 14 Aug 2022 06:06:48 +0000 (UTC) X-FDA: 79797164496.01.2DCB7CA Received: from mail-il1-f195.google.com (mail-il1-f195.google.com [209.85.166.195]) by imf22.hostedemail.com (Postfix) with ESMTP id E904BC0178 for ; Sun, 14 Aug 2022 06:06:47 +0000 (UTC) Received: by mail-il1-f195.google.com with SMTP id g18so2500425ilk.4 for ; Sat, 13 Aug 2022 23:06:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=DYNwl4udibiQ4scEUfrfDwYaVQPNhZul+x9ctn+vu3k=; b=cWQ71h3X4g2c1ImhoG9YuCoUjZt3xqWDZE0cxwmaTg3uqFJ8jQOuDJiqktRfJY3RK9 T1izg7m8Mto+86PmkMr7hNZ//KCxw0xlBQPzofUMeJjA3kU87ufL7rFZXn2STAGZSbKl sN/ocengRnC4kz3P1b4Z3hZDsf4cHjfUePCVOg6TIYmTr4pvb+b68+z/2/KDqSS3n+CO G+Lr09Z2auiPoL+vuovjoPxFd5fCTDQQAe3GeeRLe/JYi2se1B05vAU5/JF4Hx8kDBks bRvoyp6WvMsCzcbPROqnxvOHunnfxQNS54uAM7Nk5U9hYDDK8iG37Fxtfa6VPplRX+OQ o/xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=DYNwl4udibiQ4scEUfrfDwYaVQPNhZul+x9ctn+vu3k=; b=4cvL3DGzBa/ITPVsGS20nOJTuLafmG7glt0pvg6pskj3cFmdsD0hVwLA99BOYM2iH0 dkiFjtvS5GWFZILfCrZJowttHM3QMgslnP7oDRKBemqs4lWuaHMe2OgNXlcg5tU3hEtH FNPxHc+VX7lXcbdpmYvN7YFEbLaTLTnEvtiRoQEgVOYwBm+UdhuKIlh2LRZpmNA2W5Ny CYZAWu+5t0Hh6yj+Hek8s2fZJR7yrjqXbbf6cACz0XhURX0l/6em28KlcJP12rIPs1mX VRraAJwXi2ECuHyKJtbWD4N1UiwXwYH7NNTRNajfGiEOp+QowSfGzmhSCPawN37mQF3N K6ug== X-Gm-Message-State: ACgBeo2AVqMxEXJAJuSbteqgJx0AIHI9rGPIPKd/7pORyqUToSHQrAuX Zz7V2khqW4/mj8jYEMKAaoQ= X-Google-Smtp-Source: AA6agR7oFp54gKI/61oHDTsQtWcouMaWgzZ6Z84Dmt9gUlTsWDcBM5G32m7jiibTNVmjNHcnetqvaw== X-Received: by 2002:a05:6e02:971:b0:2de:9060:ef47 with SMTP id q17-20020a056e02097100b002de9060ef47mr4495084ilt.55.1660457207162; Sat, 13 Aug 2022 23:06:47 -0700 (PDT) Received: from sophie ([68.235.43.126]) by smtp.gmail.com with ESMTPSA id t62-20020a025441000000b0034300131555sm1750568jaa.95.2022.08.13.23.06.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Aug 2022 23:06:46 -0700 (PDT) From: Rebecca Mckeever To: Mike Rapoport , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: David Hildenbrand , Rebecca Mckeever Subject: [PATCH 0/4] memblock tests: add NUMA tests for memblock_alloc_try_nid* Date: Sun, 14 Aug 2022 01:06:14 -0500 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=cWQ71h3X; spf=pass (imf22.hostedemail.com: domain of remckee0@gmail.com designates 209.85.166.195 as permitted sender) smtp.mailfrom=remckee0@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660457208; a=rsa-sha256; cv=none; b=Mwy/S5yyjodg/xDwS2R/zpP0Q3gKi05XUgIqNE/ccycT62EgvsjL7KkaZwR7ERUaKuFL+k KNqN2bCfvq5rLADfNdBvpBkIcL8M/+POLQn899Tk0EaEHpXHJyQaxaFs3iWQhrqaV5TUdq okWbi9NWQEdWDNvZjBUvlraPWfPwlZs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660457208; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=DYNwl4udibiQ4scEUfrfDwYaVQPNhZul+x9ctn+vu3k=; b=LXH92TujQW0O498mNr0QeDi2G74A334V47EKIb4mSDtyX4pO/e/rpAPhbQLuWvjm4mF5RL s4eo3ggu7FpysE6f4hnDfE1iSTY8PGDR8VibDa+5/QoIqm6+fhoeSNypg6XdcJBOHu9rej ls9awSbAFP9d6pJTZ0XY2FYk+AKgPfI= Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=cWQ71h3X; spf=pass (imf22.hostedemail.com: domain of remckee0@gmail.com designates 209.85.166.195 as permitted sender) smtp.mailfrom=remckee0@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: E904BC0178 X-Stat-Signature: axu3yi78rwbtzjzhdwa43u95qz4azq3o X-Rspam-User: X-HE-Tag: 1660457207-917018 X-Bogosity: Ham, tests=bogofilter, spamicity=0.002649, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: These patches add additional tests for memblock_alloc_try_nid() and memblock_alloc_try_nid_raw() that use a simulated physical memory that is set up with multiple NUMA nodes. Additionally, most of these tests set nid != NUMA_NO_NODE. To set up a simulated physical memory with multiple NUMA nodes, patch 1 introduces setup_numa_memblock_generic() and setup_numa_memblock(). These functions use a previously allocated dummy physical memory. They can be used in place of setup_memblock() in tests that need to simulate a NUMA system. These tests are run twice, once for memblock_alloc_try_nid() and once for memblock_alloc_try_nid_raw(), so that both functions are tested with the same set of tests. When the tests run memblock_alloc_try_nid(), they test that the entire memory region is zero. When the tests run memblock_alloc_try_nid_raw(), they test that the entire memory region is nonzero. Note: This patchset depends on the following patch set: https://lore.kernel.org/linux-mm/cover.1660454730.git.remckee0@gmail.com/T/#m3a63677ae915fb47aea3f82780b72b54c08f246d Rebecca Mckeever (4): memblock tests: add simulation of physical memory with multiple NUMA nodes memblock tests: add top-down NUMA tests for memblock_alloc_try_nid* memblock tests: add bottom-up NUMA tests for memblock_alloc_try_nid* memblock tests: add generic NUMA tests for memblock_alloc_try_nid* .../testing/memblock/scripts/Makefile.include | 2 +- tools/testing/memblock/tests/alloc_nid_api.c | 1489 ++++++++++++++++- tools/testing/memblock/tests/alloc_nid_api.h | 16 + tools/testing/memblock/tests/common.c | 38 + tools/testing/memblock/tests/common.h | 27 +- 5 files changed, 1559 insertions(+), 13 deletions(-)