From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by sourceware.org (Postfix) with ESMTPS id D768638930F4 for ; Tue, 22 Feb 2022 15:40:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D768638930F4 Received: by mail-oi1-x231.google.com with SMTP id q5so14925925oij.6 for ; Tue, 22 Feb 2022 07:40:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=w9x/sjTlzSPEeUtbCdWIUyUhf4/SJvMprPudPs3eoxw=; b=SxxxYQSt17xbjIqqXKaUd9xWbl/ZHqLq5+y8Z3cAzihk302Xsgijo8dPRHTqWPifS2 gb2/ykFccVoDe6eJrrxLmisIByfJsxECpZbhqJONbMXx5RIf8+UksHWmX1ReTVJoH+ww Jmb9IdSo+Mfo2Hw+qst9owoF4KuXFjALzDz95u5hlBmecvwnZprso7hkCmYnAk1gz351 CO1ojZA87pN9za51hF/1FBQH66jMG285kPLgfNLkYPQDaS4SihJ1HLhGrUT9MPY3DqcB vaKV7cer0fw5koYYRHA6voO9jaBSUSkveH/FFQEWaFdRbdCz0JWKg1CXxaQN7NF7aquT iEVg== X-Gm-Message-State: AOAM532YEMxgT/s2Cbq/06QlGtGFkETsj3KUUffJx9Ns2DN+Yg23UgjE YxqigKCg24e6yVpidLtpNjeLuA== X-Google-Smtp-Source: ABdhPJzCoaNF7P6QPgZraXsi4p00naMFgZ6J1a210+Lz34VWKq3fsSHfjISwcrq3VCOgETpVlnRgVA== X-Received: by 2002:aca:b808:0:b0:2ce:6ee7:2cc9 with SMTP id i8-20020acab808000000b002ce6ee72cc9mr2322738oif.247.1645544406116; Tue, 22 Feb 2022 07:40:06 -0800 (PST) Received: from ?IPV6:2804:431:c7ca:cb36:581c:ae9:126a:71cf? ([2804:431:c7ca:cb36:581c:ae9:126a:71cf]) by smtp.gmail.com with ESMTPSA id x41sm432289otr.12.2022.02.22.07.40.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Feb 2022 07:40:05 -0800 (PST) Message-ID: <85c89014-39c2-8a19-a7fa-6d32ac0f2bfc@linaro.org> Date: Tue, 22 Feb 2022 12:40:02 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH 00/12] Remove bcopy and bzero optimizations Content-Language: en-US To: Szabolcs Nagy Cc: libc-alpha@sourceware.org, Wilco Dijkstra , "H . J . Lu" , Noah Goldstein References: <20220210195838.1036012-1-adhemerval.zanella@linaro.org> <20220221163904.GL2692478@arm.com> From: Adhemerval Zanella In-Reply-To: <20220221163904.GL2692478@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2022 15:40:08 -0000 On 21/02/2022 13:39, Szabolcs Nagy wrote: > The 02/10/2022 16:58, Adhemerval Zanella via Libc-alpha wrote: >> Both symbols are marked as legacy in POSIX.1-2001 and removed on >> POSIX.1-2008, although the prototypes are defined for _GNU_SOURCE >> or _DEFAULT_SOURCE. >> >> Most architectures just route bcopy/bzero to internal memmove/memset >> implementation, however some do implement iFUNC variants when memset >> or memmove are also provided through iFUNC. >> >> However, gcc already replaces bcopy with a memmove and bzero with memset >> on default configuration (to actually get a bstring libc call the code >> requires to omit string.h inclusion and built with --fno-builtin), so >> it is highly unlikely programs are actually calling libc bcopy or >> bzero symbols. > ... >> So there is point in keeping such optimization. >> >> Adhemerval Zanella (12): >> ia64: Remove bcopy >> powerpc: Remove bcopy optimizations >> i386: Remove bcopy optimizations >> x86_64: Remove bcopy optimizations >> alpha: Remove bzero optimization >> ia64: Remove bzero optimization >> Remove bzero optimization >> powerpc: Remove powerpc32 bzero optimizations >> powerpc: Remove powerpc64 bzero optimizations >> s390: Remove bzero optimizations >> i686: Remove bzero optimizations >> x86_64: Remove bzero optimizations > > i see this does not affect aarch64, but i agree with the principle. > > (there was a comment about the x86 bzero code that if __memsetzero > is accepted then it's easier to rename the bzero optimization instead > of removing and readding.) I will exclude the last patch that touches x86_64 and commit the rest. >From last discussions on both maillist and weekly we still need to get consensus on __memsetzero addition.