From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc33.google.com (mail-oo1-xc33.google.com [IPv6:2607:f8b0:4864:20::c33]) by sourceware.org (Postfix) with ESMTPS id 47DEA3858D1E for ; Thu, 10 Feb 2022 20:42:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 47DEA3858D1E Received: by mail-oo1-xc33.google.com with SMTP id t75-20020a4a3e4e000000b002e9c0821d78so7903561oot.4 for ; Thu, 10 Feb 2022 12:42:10 -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=D+IQG8iC17F8FCME6lJ3FMr4LE1QxyRuqSjVPGrX0II=; b=Xox7RhgMCY7be7D3YkGuA+TLRnDpYHNbJ4pi98dbdYQa25EUwzKD41UYyrJ3nXYqeS ImN92zJvuX742S230XouyeQECOm0orEEaq5RCQ+MH2uipAYgIZj9Pee2SR7CZy2J51lu QPVhLHMBHJFjy7gefHie711bjwG4I2tben1qBH+sSQqGKX9Kkue8/eoR/cJYSN3q3yY7 BTsd2ekMOd37amacI/lN7SU3VOG0VdoTjB7dDIVhwGB3ZfN672N4OD3NHzutv7y7GWFL 2Jqdxiv51mTgngaxPLkaMDXOQ99c20tIiPqlG089Zix3/5c2XYfYbGHGJGI4WpAstGMk klEw== X-Gm-Message-State: AOAM530mRrtCjr82lx4aeNfz85vJAkAjZcSVF1ahuuURrbEO+YaqUEUn Y2C6oj8nHOIlHG/Wx8jElEPlwQ== X-Google-Smtp-Source: ABdhPJz+1cLLxOQRFJGH88jnCLZFkfsbsDoiZg11/yq/B/NaoCYIUAQNQw8h5gFNGGFnyJ3t9CiSYA== X-Received: by 2002:a05:6870:d502:: with SMTP id b2mr1413573oan.280.1644525729673; Thu, 10 Feb 2022 12:42:09 -0800 (PST) Received: from ?IPV6:2804:431:c7ca:733:a925:765e:3799:3d34? ([2804:431:c7ca:733:a925:765e:3799:3d34]) by smtp.gmail.com with ESMTPSA id j11sm8390420otj.30.2022.02.10.12.42.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Feb 2022 12:42:09 -0800 (PST) Message-ID: Date: Thu, 10 Feb 2022 17:42:06 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [PATCH v2] x86-64: Optimize bzero Content-Language: en-US To: "Alejandro Colomar (man-pages)" , Wilco Dijkstra , Noah Goldstein , "H.J. Lu" Cc: GNU C Library References: <20220208224319.40271-1-hjl.tools@gmail.com> <1f75bda3-9e89-6860-a042-ef0406b072c1@linaro.org> <78cdba88-9e00-798a-846b-f0f77559bfd5@gmail.com> From: Adhemerval Zanella In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.1 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: Thu, 10 Feb 2022 20:42:12 -0000 On 10/02/2022 17:27, Alejandro Colomar (man-pages) wrote: >> We are discussing different subjects here: what I want is to remove the >> glibc *internal* optimization for bzero, which is essentially an >> implementation detail. In a first glance it would change performance, >> however gcc does a hard job replacing bzero/bcmp/bcopy with their >> str* counterparts, so it highly unlike that newer binaries will actually >> call bzero. > > Okay, then yes, go ahead and remove bzero(3) from glibc if GCC will > continue supporting it. Just remember that some users keep writing and > wanting to write bzero(3) instead of memset(3) in their .c files, so > it's far from being dead in source code. Again, I am not proposing to *remove* bzero, but rather the internal optimizations that currently only adds code complexity and maintenance burden. My patchset [1] will keep the ABI as-is, the difference is bcopy and bzero will use the default implementation on all architectures. [1] https://patchwork.sourceware.org/project/glibc/list/?series=7243