From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6EEE6385772D; Mon, 30 Oct 2023 12:30:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6EEE6385772D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1698669041; bh=K9vQ9luWjseJbwoNZwxZzGQkoi8ZY3VkPV4c0VsgAWs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QkE3KZy2/zGAAJ2q9rJcDF//ON0YsSJxtzcwY8H16ZUlFT1okaa4vZKDChEH/xsyx kwu9j6C+d7lhWvZbk3zTxcn1D/lbF/CdmKEfJb4LuI22RNYdG8ch3o0bxcWxWAzByj SzeJ/aIlYuwN1T7nenmh0QC59Ohctat50Ci7CViY= From: "adhemerval.zanella at linaro dot org" To: glibc-bugs@sourceware.org Subject: [Bug string/30995] Zen 4: sub-optimal memcpy on very large copies Date: Mon, 30 Oct 2023 12:30:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: string X-Bugzilla-Version: 2.38 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: adhemerval.zanella at linaro dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30995 Adhemerval Zanella changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adhemerval.zanella at lina= ro dot o | |rg --- Comment #4 from Adhemerval Zanella --- On Zen3 I can confirm that REP MOSVB is not faster than the vectorized path, but with an unaligned destination the results are also subpar: # Default non-temporal stores $ ./memcpy_loop -f memcpy -D 1 4.19552 # GLIBC_TUNABLES=3Dglibc.cpu.x86_non_temporal_threshold=3D134217730 $ ./memcpy_loop -f memcpy -D 1 11.7379 # Modified glibc with tunables to force REP MOVSB $ ./memcpy_loop -f memcpy -D 1 1.01945 With aligned stores I see ~20 GB on Zen3. I am even more convinced that REP MOVSB is not really a good strategy for Zen3. I still think it would be better to avoid non-temporal stores for unaligned inputs on Zen3. Another possibility would avoid unaligned stores, but it w= ould require adding another code path that might not be optimal for all x86 cpus. --=20 You are receiving this mail because: You are on the CC list for the bug.=