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 C264B3858D39 for ; Tue, 19 Sep 2023 17:35:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C264B3858D39 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=1695144942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=G44aeG9WCIb7YzSCd4taqi6a+TD0FOJGa/2ytaag3sk=; b=V42wwlCcuZi980FzXK/jkh5+/7nhKR1CNeMra9+ykh2J5Bc030vBI8NjgulmOlopZjrV4Q g1w1bM4Oq7FQrOLxzlbufWzk6FDAG6vOUaytLQ6ppDkBAhTPRCw9XdkvJwjsyhXbjBaaeu Ko/GwjUITslz0lWr1E6P6zWPqHYnGRA= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-582-bTXZZNYmNVytrP82qNQiAA-1; Tue, 19 Sep 2023 13:35:41 -0400 X-MC-Unique: bTXZZNYmNVytrP82qNQiAA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A46F03812583; Tue, 19 Sep 2023 17:35:40 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 36D8A1C5BB; Tue, 19 Sep 2023 17:35:40 +0000 (UTC) From: Florian Weimer To: Stefan Liebler Cc: libc-alpha@sourceware.org Subject: Re: [PATCH v3] malloc: Remove bin scanning from memalign (bug 30723) References: <87a5uxtwaq.fsf@oldenburg.str.redhat.com> <9a9934d7-8174-cf18-994e-5a751475108f@linux.ibm.com> Date: Tue, 19 Sep 2023 19:35:39 +0200 In-Reply-To: <9a9934d7-8174-cf18-994e-5a751475108f@linux.ibm.com> (Stefan Liebler's message of "Tue, 19 Sep 2023 16:32:39 +0200") Message-ID: <87r0muf4lw.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * Stefan Liebler: > On 11.08.23 17:48, Florian Weimer via Libc-alpha wrote: >> On the test workload (mpv --cache=yes with VP9 video decoding), the >> bin scanning has a very poor success rate (less than 2%). The tcache >> scanning has about 50% success rate, so keep that. >> >> Update comments in malloc/tst-memalign-2 to indicate the purpose >> of the tests. Even with the scanning removed, the additional >> merging opportunities since commit 542b1105852568c3ebc712225ae78b >> ("malloc: Enable merging of remainders in memalign (bug 30723)") >> are sufficient to pass the existing large bins test. > Hi, > > on s390x, I've observed these test-fails starting with this commit: > FAIL: malloc/tst-memalign-2 > FAIL: malloc/tst-memalign-2-malloc-hugetlb1 > > With this output: > error: tst-memalign-2.c:158: not true: count > LN / 2 > error: 1 test failures > > Note, that I only see the fails if /proc/sys/kernel/randomize_va_space > is set to 0. Then I get count=3; LN=8; > > If randomize_va_space is set to 2, the test passes and I get count=5; LN=8; > > Is s390x the only architecture where we get this failure? Does your kernel have a fix for the early sbrk failure? I suspect what happens is that we fall over to mmap from sbrk, making the heap non-contiguous. The sbrk failure should be visible under strace. Thanks, Florian