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 03F66C433F5 for ; Mon, 10 Oct 2022 11:16:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 808186B0071; Mon, 10 Oct 2022 07:16:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7B77C6B0073; Mon, 10 Oct 2022 07:16:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 63079900002; Mon, 10 Oct 2022 07:16:08 -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 4B1B86B0071 for ; Mon, 10 Oct 2022 07:16:08 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 10AE4160619 for ; Mon, 10 Oct 2022 11:16:08 +0000 (UTC) X-FDA: 80004785616.06.4474201 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf06.hostedemail.com (Postfix) with ESMTP id ACADC180015 for ; Mon, 10 Oct 2022 11:16:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665400567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uAnZYCx+crWb7x49Ic4rELwDm5XffixZvlKcyuXXQ4Y=; b=GF4k4kIU1NHvQPgPar2P4nkPo6AHoe51qHuBxjq3SaaMCqFlM89wCHdTQOEV7cCWKBrWQy O3Rv/tvw0X3dQOz6IJziIE1s9lHzKATviO1ddQOM77yNqGHvRgScIKECzvd0nDrQQ4UN9w 8cALmKEqJtUE3CrY35GAxAfCGWTnKJA= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-641-b7dr4chnNTeMPzDFGA6cNg-1; Mon, 10 Oct 2022 07:16:06 -0400 X-MC-Unique: b7dr4chnNTeMPzDFGA6cNg-1 Received: by mail-wr1-f72.google.com with SMTP id d22-20020adfa356000000b0022e224b21c0so2606514wrb.9 for ; Mon, 10 Oct 2022 04:16:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uAnZYCx+crWb7x49Ic4rELwDm5XffixZvlKcyuXXQ4Y=; b=QGqVkFKAMIk3Qgl8UtM68DbndDg1Xh4T5xHDgTT2l+lJXGintGSfnAJBwqk+lbLrDK H7x2zrDwDdqCihwpcwFFZmAgLMPjHVAYyOZ3Wh+obxNZa90hl/7+kh3q1wgDUdo+D1Qc Isc/7tDQmkF4ghwkbZn3fheZlXdS9JIE81O5cLooVBLNQXt2vrGQUhVtpH9dMLe+lUHq NSIfInxA37BL4xDuxySS/BXw8VR/EnI4iglEnOwKUQqOSMbH96oL5T6bDFRaBJgCbvoH /dyo5M6Ji1dDAPK3vR/jgkEK7XvjT8csCcLa59y54FAoZYQdBlMRba/ZLGg8h4/2P3ZG 2dig== X-Gm-Message-State: ACrzQf1E+SJtmeI/wOCVNULPMePboha03Wk6fxrrac5+SIcKQA3ZMBsN +J249yzF06iMcmxtXhK/UnFzH/Gsu18krXNR2zgtrmBaNK3E+U4ohlNuRPhj0yi09m88ZN0Vuw7 To8FYTkNueCM= X-Received: by 2002:a5d:65c4:0:b0:22c:dbdd:7177 with SMTP id e4-20020a5d65c4000000b0022cdbdd7177mr10711823wrw.470.1665400564962; Mon, 10 Oct 2022 04:16:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4otAEdTe/UjaWjkb49+axzaI+LAv0GYApqsg/Kk3ETzL985evO+gl2SP6SjjSQgGLyYl2Dlw== X-Received: by 2002:a5d:65c4:0:b0:22c:dbdd:7177 with SMTP id e4-20020a5d65c4000000b0022cdbdd7177mr10711808wrw.470.1665400564697; Mon, 10 Oct 2022 04:16:04 -0700 (PDT) Received: from ?IPV6:2003:cb:c704:e600:3a4a:f000:b085:4839? (p200300cbc704e6003a4af000b0854839.dip0.t-ipconnect.de. [2003:cb:c704:e600:3a4a:f000:b085:4839]) by smtp.gmail.com with ESMTPSA id j38-20020a05600c1c2600b003b3365b38f9sm9628042wms.10.2022.10.10.04.16.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Oct 2022 04:16:04 -0700 (PDT) Message-ID: Date: Mon, 10 Oct 2022 13:16:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH v2 1/5] memblock tests: add range tests for memblock_alloc_exact_nid_raw To: Rebecca Mckeever , Mike Rapoport , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: From: David Hildenbrand Organization: Red Hat In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1665400567; a=rsa-sha256; cv=none; b=XDvsbn4/bAH2/Aqbo4SjcIRRB/S2n/2/Fq8fjqHiPT5Cjkz5dytLwW3oxQQo/b6SA/uCLK QuGQdMY8GETzvd+FaHH17rbt9iQfZOWn66TJSzzkst6GEWzrcnrLRuqtPEyEdhNyvYNV0V V55cAhDTyXqfjbNIyJp/Nc+Zh10D+T4= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=GF4k4kIU; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf06.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1665400567; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=uAnZYCx+crWb7x49Ic4rELwDm5XffixZvlKcyuXXQ4Y=; b=YEciAljRYE+LJi9YTAWnm4HTh560Elnexx+01TOapk+f72d/uh7JvH6Ac5GgI9g9QxfumJ Ks5fU+A+nuPJpyBpHMcpnsVUKcFadB93iynIc59wD29BDsT9kDu+cuXhrw3DN7eqm8folN PLMiHhkn2gy3TqYTpyOq+CukB7YlPbQ= X-Stat-Signature: q66rctp847shfs7ywdtztsqjhg7rf6f7 X-Rspamd-Queue-Id: ACADC180015 Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=GF4k4kIU; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf06.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com X-Rspam-User: X-Rspamd-Server: rspam03 X-HE-Tag: 1665400567-442773 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 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? -- Thanks, David / dhildenb