From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Carlos O'Donell Newsgroups: gmane.comp.lib.glibc.alpha Subject: Re: [PATCH v2] Add malloc micro benchmark Date: Fri, 5 Jan 2018 08:17:09 -0800 Message-ID: <54c9f9e0-5939-4b98-e36b-76383f276f35@redhat.com> References: <14a47123-3c83-85cf-d851-c0e6df3d9e25@linaro.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1515168932 13665 195.159.176.226 (5 Jan 2018 16:15:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 5 Jan 2018 16:15:32 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 To: Adhemerval Zanella , libc-alpha@sourceware.org Original-X-From: libc-alpha-return-88872-glibc-alpha=m.gmane.org@sourceware.org Fri Jan 05 17:15:28 2018 Return-path: Envelope-to: glibc-alpha@blaine.gmane.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=EGJ5ukGTShB/KTuo ugCjot9GTDbbj0NOZzUgYV0gmXyYL5TlrGfMQ4hd5kRhUeL1Yb7KfcPb/8ZOGtgt fxfbOXCVogsIc/kATO1rKz97kQeqMI9IdYprXZ0iAxgHZ/bE8o7cRqb4b0pwGf/Z gRPKSn38eh3S3bYAbm4tsOukDkc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=sMlfLJK2yLeqLPWJj1VfWE CffdQ=; b=ZyHZH+dwNWNB8hu95KJz9VcNFfYMObGORzhe5jYlaUg3WkyHswn7oE gouhaRqcW+3WcYcGOYgtGnpxW23Pgty1PhUN6++/RRhgCRNmvxL7Ya195RHFdacG DoEL214V4nbxTqNGP03xp+Xio+q9v0MXfGEcXJNiPOH62Qmr8rbpo= Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Original-Sender: libc-alpha-owner@sourceware.org Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=secret X-HELO: mail-qk0-f193.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=pfG+JG/YrGK0DcWRVzzZtb9eRdxX59lPoLnRFc98Jtc=; b=k6i02Kr42ZXh/S+BRUoJIXitnCefdJCq9WUip2Lrf1UE1iyzh/+ybBne9C1CCLAjE0 z4SqI78cT1SEUNDYy6BtYrn5O6xSdcDKvab/Ow2yKxS9vzWRIvPq4kpS7f8MkOSgEbce WUO+FoPHb6pGXDsLq8NfWvXUgnyYf7vyhUcAm/ngbR7Er4qmsvg5Evj/VyTXcIctD619 9jXcdd3xRQJ3dbZUfle0v8ioteikQpJP02mT5SKKFa44Tr47XuWJP2kyqLi2zrIFhkV7 jUw/gqG9ZVXeCkKf/q0RiD2Tu39bGYlN/Dhrhz3a7Gymew68lkOQfk5who5CbH2gfNus f1yA== X-Gm-Message-State: AKwxytc5RgYbWjPbW2k0h/wXVFghs9muIOCeGjrfW+zNJ9RLtz2ZOSC9 odqdPQp5FqEguthLsnAd7imYwOmC18U= X-Google-Smtp-Source: ACJfBouERZAiYszf2ykgnznWcBiFNkqtUQtTeVxfs6/DlHjidxNASKdCHcOpistC+MpABBIft39rXg== X-Received: by 10.55.95.68 with SMTP id t65mr3025925qkb.259.1515169032363; Fri, 05 Jan 2018 08:17:12 -0800 (PST) In-Reply-To: <14a47123-3c83-85cf-d851-c0e6df3d9e25@linaro.org> Xref: news.gmane.org gmane.comp.lib.glibc.alpha:81235 Archived-At: Received: from server1.sourceware.org ([209.132.180.131] helo=sourceware.org) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eXUeN-0002jR-JZ for glibc-alpha@blaine.gmane.org; Fri, 05 Jan 2018 17:15:19 +0100 Received: (qmail 111461 invoked by alias); 5 Jan 2018 16:17:16 -0000 Received: (qmail 111221 invoked by uid 89); 5 Jan 2018 16:17:15 -0000 On 01/05/2018 07:50 AM, Adhemerval Zanella wrote: > > > On 05/01/2018 12:32, Carlos O'Donell wrote: >> On 01/04/2018 05:48 AM, Wilco Dijkstra wrote: >>> Carlos O'Donell wrote: >>>> >>>> Don't use mallopt, please make it a tunable then. >>>> >>>> The mallopt API already had 2 secret arena options which eventually became >>>> so well used they were baked into the API and had to be made public. >>> >>> Unfortunately tunables are not exported so you can't use them outside of GLIBC: >>> >>> /build/glibc/benchtests/bench-malloc-simple.o: In function `bench': >>> bench-malloc-simple.c:(.text+0x19c): undefined reference to `__tunable_set_val' >>> collect2: error: ld returned 1 exit status >> >> Correct, we only have a env-var frontend right now, and the internal API is not >> made accessible via GLIBC_PRIVATE. >> >> You have 3 options for tests: >> >> * Use the env vars to adjust test behaviour. Run the tests multiple times. >> * Add a new C API frontend, very valuable, but more time consuming. >> * Expose the existing internal C API via GLIBC_PRIVATE for testing, and throw >> it away later when we get a proper C API frontend. >> > > Do we want a C API to tied the malloc implementation to some tunables? My > understanding is the tunable api idea is not really enforce retro-compability > (where a C api would enforce it). If we add a C API to the tunables, we would honour that API for tunables for all time, but the tunables themselves would not be stable. e.g. * get list of tunables supported * get the default value for a tunable * get the value of a tunable * set the value of a tunable So you would use this API in the tests to get the tunable list, assert the tcache tunable was accepted (or fail the test), and then set it to a special value for the part of the test that needs it. -- Cheers, Carlos.