From mboxrd@z Thu Jan 1 00:00:00 1970 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 92291C433F5 for ; Tue, 11 Oct 2022 04:19:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9ADE18E0001; Tue, 11 Oct 2022 00:19:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 95C7B6B0073; Tue, 11 Oct 2022 00:19:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 824318E0001; Tue, 11 Oct 2022 00:19:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 6BD4E6B0072 for ; Tue, 11 Oct 2022 00:19:14 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 0DBFCC1045 for ; Tue, 11 Oct 2022 04:19:13 +0000 (UTC) X-FDA: 80007363828.17.E628CBE Received: from mail-oa1-f67.google.com (mail-oa1-f67.google.com [209.85.160.67]) by imf29.hostedemail.com (Postfix) with ESMTP id 89EE2120026 for ; Tue, 11 Oct 2022 04:19:13 +0000 (UTC) Received: by mail-oa1-f67.google.com with SMTP id 586e51a60fabf-1364357a691so8102920fac.7 for ; Mon, 10 Oct 2022 21:19:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=vwFKSGNDkHGgFwaYbMK1edZVlCyT6HU0qnyYOuABxaM=; b=Jqt2I71DlapaGAjgnNF3xp4Lgh40cOMsOegOkwJMCNbZ+SnQUXVpJ+NEbgRdGQdONf i6Bh4T8Zsx3ocMc0GueMXXsU7CfQOQ0U85CyjStKryqM9wib++tpE/9JT9tNREScH/rU PwKw9Ty6xXUBEZs+W4lzLlNFRzB/LCCHR9pL4/+8tzRAxpqWDPDvFTmkH/ZUVNNN8Ryl Ns0sKi6V4f6BI043y3vSx+L6VVjHlh9yex1mGM1imui0m1tCSmIamTijmMryroUAQZBQ 5ZabdREaJ1y3bfMnr9EZSJS7Qwf9i2ths2W0+G26NeDHoQtI9K11Ar44HCTaYKyLFSY0 7bAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vwFKSGNDkHGgFwaYbMK1edZVlCyT6HU0qnyYOuABxaM=; b=XUPTRnYz/0Ra1pP2FsrW/k18qMAlS2Ic0cRqsA2ajc8I4kL8qG/l4F8Q/+Ih3BkbfV GAF9pjW8yuUWmTXBxorBUDlwl7j7JpkhIJ1qUd/OV9DEZGGWpxi1oWgZ2sXPRLmvaLqG JHOGy+4Qy29IhwVU2TLKwVQE11vMIYo9/If7NXlHwoK2i+i/GHtJ5vVEM7Q/Vqrh8pEm LITJqgiAqTM/ShBj7ladl23rsWrr9XX8Z7voSMJiazOzBNoe/esTCdPi6qz0zAma4gn8 7Oczdo8YD1Rhfw4QerOmhxSJynZHJqhDAtH+eZFTS20M1J8jKkQjYg9iQP5uc8zqz/yL wTXg== X-Gm-Message-State: ACrzQf3RNewsxteso+STLwbBIWb0BMqKVpQyhGX5nWR3ZdPfMU4NUwq6 N5C92aSfrVf5FJemfW/KfUo= X-Google-Smtp-Source: AMsMyM5mJXEZy8ZKbImI4UALR0tPYRNr5onG8MB6Iv5tXfSNOBm8mhW8mlQs854WcEn7/qDCB3I2HA== X-Received: by 2002:a05:6870:42c5:b0:136:4add:e0e7 with SMTP id z5-20020a05687042c500b001364adde0e7mr6625934oah.240.1665461952607; Mon, 10 Oct 2022 21:19:12 -0700 (PDT) Received: from sophie ([206.217.205.57]) by smtp.gmail.com with ESMTPSA id c21-20020a056830315500b006619701dc1csm2283429ots.54.2022.10.10.21.19.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 21:19:12 -0700 (PDT) Date: Mon, 10 Oct 2022 23:19:10 -0500 From: Rebecca Mckeever To: David Hildenbrand Cc: Mike Rapoport , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/5] memblock tests: add range tests for memblock_alloc_exact_nid_raw Message-ID: <20221011041910.GA7782@sophie> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Jqt2I71D; spf=pass (imf29.hostedemail.com: domain of remckee0@gmail.com designates 209.85.160.67 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=1665461953; a=rsa-sha256; cv=none; b=SqCbXQT4DrU85JXkbi/DtzRBVZSJ5lMN8Fp1DTdrQW/UogEHHPZ7+CE56hOROXX1lBM9BS NOQSgGTYGDdk4Hew+P9bSEl7C1/+qYLLuR/FjWf0Go+4e4szfPbrcwCar6eai4htechyrU OZKBdyBA1bWOamOYaTXaRAnLp+A2ObA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1665461953; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=vwFKSGNDkHGgFwaYbMK1edZVlCyT6HU0qnyYOuABxaM=; b=qUEuNPYEkP0puyaG76XCGR4XTbJI8ooot9ExOadHlIrIjGeztmQOaNWT57EgKZxRZ4YJ3I 3yS2xFJu3nYdz4PJ8ZLnQKqYLMGUvZjlfi+ljElVcpPRbyFGcAwYlJ7CRwgZeU+NeO/32C qdy7Iqt/QtrnZq7OKrG91+4Y9UFx4lg= X-Rspamd-Queue-Id: 89EE2120026 X-Rspam-User: Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Jqt2I71D; spf=pass (imf29.hostedemail.com: domain of remckee0@gmail.com designates 209.85.160.67 as permitted sender) smtp.mailfrom=remckee0@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam10 X-Stat-Signature: 1ditar58apemj71docbfi54unydp16gk X-HE-Tag: 1665461953-652233 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: On Mon, Oct 10, 2022 at 01:16:03PM +0200, David Hildenbrand wrote: > On 03.10.22 01:41, Rebecca Mckeever wrote: > > Add tests for memblock_alloc_exact_nid_raw() that are very similar to > > the range tests for memblock_alloc_try_nid_raw(). > > > > Signed-off-by: Rebecca Mckeever > > --- > > tools/testing/memblock/Makefile | 2 +- > > tools/testing/memblock/main.c | 2 + > > .../memblock/tests/alloc_exact_nid_api.c | 1208 +++++++++++++++++ > > .../memblock/tests/alloc_exact_nid_api.h | 9 + > > 4 files changed, 1220 insertions(+), 1 deletion(-) > > create mode 100644 tools/testing/memblock/tests/alloc_exact_nid_api.c > > create mode 100644 tools/testing/memblock/tests/alloc_exact_nid_api.h > > > > diff --git a/tools/testing/memblock/Makefile b/tools/testing/memblock/Makefile > > index 246f7ac8489b..2310ac4d080e 100644 > > --- a/tools/testing/memblock/Makefile > > +++ b/tools/testing/memblock/Makefile > > @@ -7,7 +7,7 @@ CFLAGS += -I. -I../../include -Wall -O2 -fsanitize=address \ > > LDFLAGS += -fsanitize=address -fsanitize=undefined > > TARGETS = main > > TEST_OFILES = tests/alloc_nid_api.o tests/alloc_helpers_api.o tests/alloc_api.o \ > > - tests/basic_api.o tests/common.o > > + tests/basic_api.o tests/common.o tests/alloc_exact_nid_api.o > > DEP_OFILES = memblock.o lib/slab.o mmzone.o slab.o > > OFILES = main.o $(DEP_OFILES) $(TEST_OFILES) > > EXTR_SRC = ../../../mm/memblock.c > > diff --git a/tools/testing/memblock/main.c b/tools/testing/memblock/main.c > > index 4ca1024342b1..278f9dec5008 100644 > > --- a/tools/testing/memblock/main.c > > +++ b/tools/testing/memblock/main.c > > @@ -3,6 +3,7 @@ > > #include "tests/alloc_api.h" > > #include "tests/alloc_helpers_api.h" > > #include "tests/alloc_nid_api.h" > > +#include "tests/alloc_exact_nid_api.h" > > #include "tests/common.h" > > int main(int argc, char **argv) > > @@ -12,6 +13,7 @@ int main(int argc, char **argv) > > memblock_alloc_checks(); > > memblock_alloc_helpers_checks(); > > memblock_alloc_nid_checks(); > > + memblock_alloc_exact_nid_checks(); > > return 0; > > } > > > memblock_alloc_exact_nid_raw(NUMA_NO_NODE) behaves exactly the way > memblock_alloc_try_nid_raw(NUMA_NO_NODE) behaves -- which is essentially > memblock_alloc_raw(). > > So do we really need a separate set of tests for these? > Instead of a separate set of tests, I could add a flag for memblock_alloc_exact_nid_raw() to test_flags so that the range tests in alloc_nid_api.c could be run with that flag. Do you think I should do that, or omit tests for memblock_alloc_exact_nid_raw(NUMA_NO_NODE) altogether? > -- > Thanks, > > David / dhildenb > Thanks, Rebecca