From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) by sourceware.org (Postfix) with ESMTPS id 1DE293858401 for ; Mon, 12 Feb 2024 15:57:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1DE293858401 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1DE293858401 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1129 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707753427; cv=none; b=QCC1EdTUFkuS3A3HcdEwBtDip9E01RWW2EauhNFnxOtbEiaK+6RI4Lvju0/NbIjwjfnt4DN7bBDVldlFUUfw0eNhe/AeKAlbFsKBk+DtRgKmN2bGoNFbswpqy0QHY80G+CTUWdAGtAkwwOfxE/Gk2SswHtzn/bddmT+xvJj9fco= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707753427; c=relaxed/simple; bh=cRIXdRsLs5Rr7z6RwHq9AGvidJShHjo0CB8Sst/B7kM=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=mx9IlQA2VuvkB8yqaQru++L+bW0jV3s5BjwZmSrR+Ql4RuEDmAwFFjXi+p/i5Vq+VkW9PxGJcUv7hX2o4p9H8FB3ivI38pP+XobbOBff4kwoKHjGcGAo7FZSotyhXCD7+i8xzryXoV7BcqX8rV6PIppw1j6nesDzssb0wQ2M9ag= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-60757c46e34so10409207b3.1 for ; Mon, 12 Feb 2024 07:57:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707753425; x=1708358225; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=p6ltwNjmhK0+bcafJzJvimEMO7Z09vKYaD3RsLMG3nI=; b=grT2syFgHVu2P1MEG5kW6IhADKVN5bB3F3RCekbN7CsGaqAdT2YIfgauRjx+lkD7Pq PRG4hWTNetmeBnkBPHAockaKeED9Qwyg7dn02HIPnfCtwQ8W5Gpk+y1X3Zhbn89b8+QK E7tlFA9PAwNTr8Anxirx7uElhcxTkbIPgWynNMTsh0u3KfORoJYLYmlJDXs8r5NGmpLJ MVDXl/aJfbKhlRo2LG9yLOAt9ky68b8IWTwkmim8o/sKlku4JThKFftHLZbFCAgjarUe vaRZlgDsHmFtSozlivNnPUZGi2DQN5YEiJlGWVrkMGfEXPH09IfLfa32AUjdtXE3pkLI g9BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707753425; x=1708358225; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p6ltwNjmhK0+bcafJzJvimEMO7Z09vKYaD3RsLMG3nI=; b=d0PGuTlTiZX9jfxyuDQOCPqo1zIrwjaIEvBBlr1yoHV2fGMWiMHT1Sc0fX3NRTyqdL IOfSnyP82ZwI6W+r8j3B8wDvpWn9RkW8cvcnf3RvgmWDUUluzDPV8vA3CqykH5uCQ5Ob LeuJr/alFY1z4S3VVdar06zL4na+8TZvzzOMpmnkkCFuv77gh2vX4bQb7flMKW0xHDvU rbZzZSoDpCF59byFzfk5ZQIlt6INVXHIkc4YYpNJOmBdteVccqfasRtzmSRwsBVcvKTg d3rMz40C0s2kKa1KDOInzUQnOqEhSUYUNi39d5kDULbg+VV1rK01rVNIATVdD5ln5LLQ MaFQ== X-Gm-Message-State: AOJu0Yx/j7LPjVDApGmN6VYKETELlYnHqyNe7eFkkMEKHGsN0575IRb3 47QO4v/McrVei2Gd2nrcG0Vup2G9zrFSRaQH1+ObnDruUOnU66ijD7LtKqOgi3Cj6koxTd8JTje SWr0z3p8gaj28vAliyqQ0pK/8jNk= X-Google-Smtp-Source: AGHT+IGtZqIWGQo/ojRaZYxN+4CrNpfF7T/K7mWWf5YEBQ6ETkFxNBkUBcAYEB6V8ZleSoNKaPYxBx15GVSqDtgIBFI= X-Received: by 2002:a81:4e81:0:b0:604:a09:ea98 with SMTP id c123-20020a814e81000000b006040a09ea98mr6058254ywb.28.1707753425360; Mon, 12 Feb 2024 07:57:05 -0800 (PST) MIME-Version: 1.0 References: <20240208130840.533348-1-adhemerval.zanella@linaro.org> <20240208130840.533348-3-adhemerval.zanella@linaro.org> In-Reply-To: <20240208130840.533348-3-adhemerval.zanella@linaro.org> From: "H.J. Lu" Date: Mon, 12 Feb 2024 07:56:29 -0800 Message-ID: Subject: Re: [PATCH v3 2/3] x86: Do not prefer ERMS for memset on Zen3+ To: Adhemerval Zanella Cc: libc-alpha@sourceware.org, Noah Goldstein , Sajan Karumanchi , bmerry@sarao.ac.za, pmallapp@amd.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3020.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 Thu, Feb 8, 2024 at 5:08=E2=80=AFAM Adhemerval Zanella wrote: > > For AMD Zen3+ architecture, the performance of the vectorized loop is > slightly better than ERMS. > > Checked on x86_64-linux-gnu on Zen3. > --- > sysdeps/x86/dl-cacheinfo.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/sysdeps/x86/dl-cacheinfo.h b/sysdeps/x86/dl-cacheinfo.h > index f34d12846c..5a98f70364 100644 > --- a/sysdeps/x86/dl-cacheinfo.h > +++ b/sysdeps/x86/dl-cacheinfo.h > @@ -1021,6 +1021,11 @@ dl_init_cacheinfo (struct cpu_features *cpu_featur= es) > minimum value is fixed. */ > rep_stosb_threshold =3D TUNABLE_GET (x86_rep_stosb_threshold, > long int, NULL); > + if (cpu_features->basic.kind =3D=3D arch_kind_amd > + && !TUNABLE_IS_INITIALIZED (x86_rep_stosb_threshold)) > + /* For AMD Zen3+ architecture, the performance of the vectorized loo= p is > + slightly better than ERMS. */ > + rep_stosb_threshold =3D SIZE_MAX; > > TUNABLE_SET_WITH_BOUNDS (x86_data_cache_size, data, 0, SIZE_MAX); > TUNABLE_SET_WITH_BOUNDS (x86_shared_cache_size, shared, 0, SIZE_MAX); > -- > 2.34.1 > LGTM. Reviewed-by: H.J. Lu Thanks. --=20 H.J.