Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp42643rwb; Sun, 25 Sep 2022 15:03:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4I3nZzFJNSey+kbn5xwbL6V7sF5XMFygDrsEGNyaq63o+LcM+KzF3uHKrPC6aH79qY64Is X-Received: by 2002:a05:6402:4009:b0:457:14b:8ce4 with SMTP id d9-20020a056402400900b00457014b8ce4mr8454167eda.332.1664143422100; Sun, 25 Sep 2022 15:03:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664143422; cv=none; d=google.com; s=arc-20160816; b=kE6LfuPvOW2fnqfmcUEuFipD3lhbsBNr1ajrQxjTtM1674lWk0WwYGLcIRpgzsZGOy SfnsjBTdNIYq3jXT3Yq4QPnqTdpXSTZK5NLg7aj48IfWIWK1qxg8owjG1u+I8yys5qSO btV9wpJF9mbp9swD3isrf32E6gu483S81hH+WweuO8jum7TuwSNfuE2zDX3RrlE3xFiM l2Riip10YDKwwIZLmMw220NGnLAta+uw8wDed2kMor5kaLECP/wY4qFR8Vr1G+dRRNWh QAiw246D4J98gZo69jO3ol/sjvTvnSkpAuWW6MV5U59m6qBcVGZXz+JTTmsozDH1jeu8 YPPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=rs2iEn7xSV/AcStIg2IvJebqNsYo6UJfyzF5gsqV+Xg=; b=A1XFcToExfCIUYMi184oCHZsgcM69RIdz1sRLv06cMcsToT9qzV1VMvR1XfO8ktAM1 GCYKCVK+WSrXqD5ipAzlc6uTNOYaNsquMbcWT0hzQHcv40SGkTKONiJ2aHZ39Bzsqhok Z8mUdrjJJG/ZMebXAsVxsQetBJg1RXdXffd8EdHHDI2NhLsdrQAg4yjb1/wNu75MV1TT bi61ael6EX5DK+oizsO1rCu8a7cm8MueT1/T8U6PGcKZSvBEp6kQkgFsNlmsnKblCTEH Bb+rL60tW4aPWJtFZFiKKne/4jM5aypGxSigi+Sz+YH27YJ71NeZJ/FDDkIDX/8hdajO ZBoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MkrTpJU7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd7-20020a170907968700b0077d32f74e3csi6645340ejc.530.2022.09.25.15.03.16; Sun, 25 Sep 2022 15:03:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MkrTpJU7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232589AbiIYV1T (ORCPT + 99 others); Sun, 25 Sep 2022 17:27:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229684AbiIYV1R (ORCPT ); Sun, 25 Sep 2022 17:27:17 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D18C29CBF for ; Sun, 25 Sep 2022 14:27:16 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id ay9so3153704qtb.0 for ; Sun, 25 Sep 2022 14:27:16 -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:subject:date; bh=rs2iEn7xSV/AcStIg2IvJebqNsYo6UJfyzF5gsqV+Xg=; b=MkrTpJU79gAnhdvHM3ZNdVT+JBSDM5TgFLytwyTRcReYHHhaf0RsiU0Ujw4Ixq7ifX 2I9I2tMabLgzE59Y9b5KP97/+IeeyoDg+AdeiAF22e4TIddrSXP58UPXfZ9a6JPYqLI/ m4mjISuirGZqNs0n6NJWMrnHttPb9gJd2t8nJiuCe3Qjm08pUEQeDHTW5cj6luwzrKdk Ob02m74R0RgdBNwDuof5qE91mWQTduwQ6aPkBAQnLv8GsOqgXGEhNmVLsboq6Sx+xOwe YmVUfgaGUnTLVzj1lO1quY0GUk9HzZrvMmOqxQiapBztime2uLBlgb6AveaoCEMSLoe4 pU0g== 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:subject:date; bh=rs2iEn7xSV/AcStIg2IvJebqNsYo6UJfyzF5gsqV+Xg=; b=aArpJT2jYSbqEh6Lg95luuLKX9/99wLRu7AM4+H2GoOu6O/Kz8qYoT68Trq3ENrSaG jsDbRw/JeIb7PViyu/AKrJo9kM7IhUBfJdFJ1Dxdy8RbyU96jnbySzVoWoGSzILxfP9A a5oX+uK4P9GOvSf3dPnhibRXdzXPyJqJYXwiklybJ+C21BkKhfemBusED1U8MtM5SmBt YIAc4Ep8wH+lmTA6mv0EcGIu5ULZB88dLtmM9WMpICWmukIO3mN+s9hJcPp/e+caxOd9 vYN4s+g528tjIhYPdIARYavBM77Em+Sbh13w/JK1NkCwEbcohVnTw0FpnEABfPWzT4DB kzvg== X-Gm-Message-State: ACrzQf3uhUISX0dolC+cFM4V7XIqm0U87s/R7EOPEyfpZRIBZvUlBBIY vF2/e1893dkF7P18VQvUoqQ= X-Received: by 2002:ac8:58cf:0:b0:35c:c69b:4aa1 with SMTP id u15-20020ac858cf000000b0035cc69b4aa1mr15610425qta.355.1664141235190; Sun, 25 Sep 2022 14:27:15 -0700 (PDT) Received: from sophie ([185.156.46.189]) by smtp.gmail.com with ESMTPSA id t9-20020a05622a180900b0031e9ab4e4cesm10170408qtc.26.2022.09.25.14.27.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Sep 2022 14:27:14 -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/5] memblock tests: add tests for Date: Sun, 25 Sep 2022 16:26:51 -0500 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These patches add tests for memblock_alloc_exact_nid_raw(). There are two sets of tests: range tests and NUMA tests. The range tests use a normal (i.e., UMA) simulated physical memory and set the nid to NUMA_NO_NODE. The NUMA tests use a simulated physical memory that is set up with multiple NUMA nodes. Additionally, most of these tests set nid != NUMA_NO_NODE. The range tests are very similar to the range tests for memblock_alloc_try_nid_raw(). The NUMA tests have the same setup as the corresponding test for memblock_alloc_try_nid_raw(), but several of the memblock_alloc_exact_nid_raw() tests fail to allocate memory in setups where the memblock_alloc_try_nid_raw() test would allocate memory. Also, some memblock_alloc_exact_nid_raw() tests drop the lower limit of the requested range in order to allocate within the requested node, but the same setup in a memblock_alloc_try_nid_raw() test allocates within the requested range. Rebecca Mckeever (5): memblock tests: add range tests for memblock_alloc_exact_nid_raw memblock tests: add top-down NUMA tests for memblock_alloc_exact_nid_raw memblock tests: add bottom-up NUMA tests for memblock_alloc_exact_nid_raw memblock tests: add generic NUMA tests for memblock_alloc_exact_nid_raw memblock tests: remove completed TODO item tools/testing/memblock/Makefile | 2 +- tools/testing/memblock/TODO | 7 +- tools/testing/memblock/main.c | 2 + .../memblock/tests/alloc_exact_nid_api.c | 2299 +++++++++++++++++ .../memblock/tests/alloc_exact_nid_api.h | 25 + 5 files changed, 2328 insertions(+), 7 deletions(-) create mode 100644 tools/testing/memblock/tests/alloc_exact_nid_api.c create mode 100644 tools/testing/memblock/tests/alloc_exact_nid_api.h -- 2.25.1