From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 913C73858D20 for ; Mon, 12 Jun 2023 13:34:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 913C73858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686576896; 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=3NfTwJ2PU3oUiCP1PbWCQeYP7gjgyTALdPg8Lviv4V8=; b=fwaBrx6unPNUSnM2dtPf3cuiMHahJ640eEQND3OZJcdFYxN2KTV6EbmlPk7PcrmHeMYvfL lAIo6L5/KjVase3dpxMC3kxVI+ZaPvsUjC71Spu2vQJYu14AzdVbK7PJWraTzPw6RQgfEs qVSpOMgr9F78QhkhhEK1iI+UrfeRd88= Received: from mail-yw1-f199.google.com (mail-yw1-f199.google.com [209.85.128.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-656-aTbIGh4DNV-Chwzcpf95Cw-1; Mon, 12 Jun 2023 09:34:55 -0400 X-MC-Unique: aTbIGh4DNV-Chwzcpf95Cw-1 Received: by mail-yw1-f199.google.com with SMTP id 00721157ae682-5689bcc5f56so63735817b3.2 for ; Mon, 12 Jun 2023 06:34:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686576894; x=1689168894; 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=3NfTwJ2PU3oUiCP1PbWCQeYP7gjgyTALdPg8Lviv4V8=; b=jKGJj5OY9RNCD82zdN8xr8OlEZ8ZF2ns0VfjlZTl1mdS/ENWyJgyf8B6OHCcNWK6As 5LArC9R3j7Pf45Q9Eu1TlOBHUGeWx7CD/OX9lxfIHe4ot3KpTRgns8ImINOYPLYnsbj9 Vn/JbsxwAiOrCoq4ZHM5s2NUKjfgqJ6nicpMu8TWM2JqTDkh5fCCnYz67NCX9W7dgWns PVHTrsFZhx+MpvpdBZK8VuONzVq20mOaWEuzeLKldoSyEiLTuKyBySEpyD7VWVRXBWI6 N8QweIlCJMiboBu/Ige8cBA4xbIwGxDC4vgZLJscgxMh04Bf/zau9qlBRG1WaI84JIiy HO9Q== X-Gm-Message-State: AC+VfDzLyCZUUpbjxO2aJhp7fXwV79vj1RKP6IsGwpu8a3dcTspv1tlY E4J654bCAbIMfwXLIY1EYlS3Mvw3bF0bC2H212bFjUAUEZkFfDHfSmvVzwb53XN7QxY+WJxuMkd 2gn5m0YYsP13c7rdhNON3w20A+WQz X-Received: by 2002:a25:2b88:0:b0:bac:ba6a:754c with SMTP id r130-20020a252b88000000b00bacba6a754cmr8526678ybr.35.1686576894379; Mon, 12 Jun 2023 06:34:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6G3Sao5riI/CBDIrsAroW2k9Ixib7h9wZQWGcyKUPzHLj+oEgcNKHlnPPap/toQbJfklGvUQ== X-Received: by 2002:a25:2b88:0:b0:bac:ba6a:754c with SMTP id r130-20020a252b88000000b00bacba6a754cmr8526664ybr.35.1686576894099; Mon, 12 Jun 2023 06:34:54 -0700 (PDT) Received: from [192.168.0.241] ([198.48.244.52]) by smtp.gmail.com with ESMTPSA id 127-20020a250285000000b00bc9a78f7f58sm746609ybc.5.2023.06.12.06.34.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Jun 2023 06:34:53 -0700 (PDT) Message-ID: <80564093-3331-e323-7929-4bc675da52b0@redhat.com> Date: Mon, 12 Jun 2023 09:34:52 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] malloc: Decrease resource usage for malloc tests To: Adhemerval Zanella , libc-alpha@sourceware.org References: <20230607173955.2696730-1-adhemerval.zanella@linaro.org> From: Carlos O'Donell Organization: Red Hat In-Reply-To: <20230607173955.2696730-1-adhemerval.zanella@linaro.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 6/7/23 13:39, Adhemerval Zanella via Libc-alpha wrote: > The tst-mallocfork2 and tst-mallocfork3 create large number of > subprocesss, around 11k for former and 20k for latter, to check > for malloc async-signal-safeness on both fork and _Fork. However > they do not really exercise allocation patterns different than > other tests fro malloc itself, and the spawned process just exit > without any extra computation. Agreed. > The tst-malloc-tcache-leak is similar, but creates 100k threads > and already checks the resulting with mallinfo. > > These tests are also very sensitive to system load (since they > estresss heavy the kernel resource allocation), and adding them > on THP tunable and mcheck tests increase the pressure even more. > > For THP the fork tests do not add any more coverage than other > tests. The mcheck is also not enable for tst-malloc-tcache-leak. > > Checked on x86_64-linux-gnu. LGTM. Reviewed-by: Carlos O'Donell > --- > malloc/Makefile | 23 +++++++++++------------ > 1 file changed, 11 insertions(+), 12 deletions(-) > > diff --git a/malloc/Makefile b/malloc/Makefile > index ce6ebcf1b3..c1db3347d8 100644 > --- a/malloc/Makefile > +++ b/malloc/Makefile > @@ -74,7 +74,10 @@ test-srcs = tst-mtrace > # with MALLOC_CHECK_=3 because they expect a specific failure. > tests-exclude-malloc-check = tst-malloc-check tst-malloc-usable \ > tst-mxfast tst-safe-linking \ > - tst-compathooks-off tst-compathooks-on tst-memalign-2 tst-memalign-3 > + tst-compathooks-off tst-compathooks-on tst-memalign-2 tst-memalign-3 \ > + tst-mallocfork2 \ > + tst-mallocfork3 \ > + tst-malloc-tcache-leak > > # Run all tests with MALLOC_CHECK_=3 > tests-malloc-check = $(filter-out $(tests-exclude-malloc-check) \ > @@ -92,7 +95,10 @@ tests-exclude-hugetlb1 = \ > tst-interpose-static-thread \ > tst-malloc-usable \ > tst-malloc-usable-tunables \ > - tst-mallocstate > + tst-mallocstate \ > + tst-malloc-tcache-leak \ > + tst-mallocfork2 \ > + tst-mallocfork3 > # The tst-free-errno relies on the used malloc page size to mmap an > # overlapping region. > tests-exclude-hugetlb2 = \ > @@ -121,7 +127,9 @@ tests-exclude-mcheck = tst-mallocstate \ > tst-compathooks-off tst-compathooks-on \ > tst-memalign-2 \ > tst-memalign-3 \ > - tst-mxfast > + tst-mxfast \ > + tst-mallocfork2 \ > + tst-mallocfork3 > > tests-mcheck = $(filter-out $(tests-exclude-mcheck) $(tests-static), $(tests)) > endif > @@ -182,14 +190,10 @@ $(objpfx)tst-malloc-fork-deadlock-malloc-check: $(shared-thread-library) > $(objpfx)tst-malloc-stats-cancellation-malloc-check: $(shared-thread-library) > $(objpfx)tst-malloc-thread-exit-malloc-hugetlb1: $(shared-thread-library) > $(objpfx)tst-malloc-thread-fail-malloc-hugetlb1: $(shared-thread-library) > -$(objpfx)tst-mallocfork2-malloc-hugetlb1: $(shared-thread-library) > -$(objpfx)tst-mallocfork3-malloc-hugetlb1: $(shared-thread-library) > $(objpfx)tst-malloc-fork-deadlock-malloc-hugetlb1: $(shared-thread-library) > $(objpfx)tst-malloc-stats-cancellation-malloc-hugetlb1: $(shared-thread-library) > $(objpfx)tst-malloc-thread-exit-malloc-hugetlb2: $(shared-thread-library) > $(objpfx)tst-malloc-thread-fail-malloc-hugetlb2: $(shared-thread-library) > -$(objpfx)tst-mallocfork2-malloc-hugetlb2: $(shared-thread-library) > -$(objpfx)tst-mallocfork3-malloc-hugetlb2: $(shared-thread-library) > $(objpfx)tst-malloc-fork-deadlock-malloc-hugetlb2: $(shared-thread-library) > $(objpfx)tst-malloc-stats-cancellation-malloc-hugetlb2: $(shared-thread-library) > > @@ -344,14 +348,9 @@ $(objpfx)tst-dynarray-fail-mem.out: $(objpfx)tst-dynarray-fail.out > $(objpfx)tst-malloc-tcache-leak: $(shared-thread-library) > $(objpfx)tst-malloc_info: $(shared-thread-library) > $(objpfx)tst-mallocfork2: $(shared-thread-library) > -$(objpfx)tst-malloc-tcache-leak-mcheck: $(shared-thread-library) > $(objpfx)tst-malloc_info-mcheck: $(shared-thread-library) > -$(objpfx)tst-mallocfork2-mcheck: $(shared-thread-library) > -$(objpfx)tst-malloc-tcache-leak-malloc-check: $(shared-thread-library) > $(objpfx)tst-malloc_info-malloc-check: $(shared-thread-library) > $(objpfx)tst-mallocfork2-malloc-check: $(shared-thread-library) > -$(objpfx)tst-malloc-tcache-leak-malloc-hugetlb1: $(shared-thread-library) > -$(objpfx)tst-malloc-tcache-leak-malloc-hugetlb2: $(shared-thread-library) > $(objpfx)tst-malloc_info-malloc-hugetlb1: $(shared-thread-library) > $(objpfx)tst-malloc_info-malloc-hugetlb2: $(shared-thread-library) > $(objpfx)tst-memalign-3: $(shared-thread-library) -- Cheers, Carlos.