Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1763142pxf; Fri, 26 Mar 2021 14:23:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIY3/k4lwslNDiX4+46eQ5vf+15d6D/wifhWwpMjv+a0gc8pvqe8mm3wohiagqa/jxRCgE X-Received: by 2002:a50:fc94:: with SMTP id f20mr17457142edq.370.1616793795218; Fri, 26 Mar 2021 14:23:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616793795; cv=none; d=google.com; s=arc-20160816; b=T74elx6v0vhb68D2ZrfqLrXj0ZTB6jaIQUbFAaOve//LbRWyU2PyO/LXzHeSkBYOaV NWyyXUKMq8RoHv6zKz/8Fk+pEQtHUJLfovBsXTn42KMFoAfkBeOqTFJNFRPBVMgLVAUJ G1MN23HRxA5VqLqbkTI7A0B9aPpsnK6Hzk8dvyXZQaEzuqDOalJanr+/FFJL7ob/RFj3 wy8I3nLL3S5TfaSAr59OFXZ1jDia3zwQVE610l+Z513dQICrlJnGzSFusZVcEi2ZJ6U6 DaVVOX8140R3f+lO5mXy9Vp5bOxElrNxlhACl9BkT9a+FiiIQRx8baRDik3EQUyAtOkI 9QJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:in-reply-to:cc:references:message-id:date :subject:mime-version:from:content-transfer-encoding:dkim-signature; bh=m2miwIO/u/sYwYpBdb5shG1C8hzzjvjQQh0IO27dehU=; b=O0shDwf5KM8Uv21/1HYKwW1n/9K6Mj8fQazd7JmtQecFpUOhjkakh2gAHsuX0SjU8S SogylfesaPho+i3OXMkKWfafk/djBEfNaKyLaOxJEJWdp7ZAfPES7iIKqd8qjJ9pe7Jf mBQTNCG1Udui7ZMtWWCmi1Ux2jJUGWE79lhV0EpWuOsb1SUf3NCIGdGvww3N2mifb9iQ MZ+9UW5LCzsZ1bEhiTA3i1UC7Ns++cuCBxahF4ApfWCqywieM6CFoqYwVCi4hpUkZyEj KlU8UsTdx+hJgZmSmNTKtamEwAbrM0IZLnetLSBxoox3+dIixXEluvKUsxs+nTfwin4C WNnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=AIvUJFpR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cf5si7569088ejb.346.2021.03.26.14.22.51; Fri, 26 Mar 2021 14:23:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=AIvUJFpR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230209AbhCZVVN (ORCPT + 99 others); Fri, 26 Mar 2021 17:21:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230176AbhCZVVH (ORCPT ); Fri, 26 Mar 2021 17:21:07 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC36DC0613AA for ; Fri, 26 Mar 2021 14:21:07 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id t20so1534830plr.13 for ; Fri, 26 Mar 2021 14:21:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=m2miwIO/u/sYwYpBdb5shG1C8hzzjvjQQh0IO27dehU=; b=AIvUJFpRVWe1n4j/fb8FJ2I9EdzdGmlDPQh7pK4XVOy4ddGl6yz0ZLqFE8/Pjb20kA Dq8hP472PqEDlb7kNx6YHi6Vt6ldPV/NVyQgNrfqOTogf2iFTY+U39peo9/sYzWGrXYi uBSNuxdJD1nkTtaHVylnyh7N2Dd2du+O1O9m3i9Ee4HLIp/RoJtR0PcytdfUGHY23yP6 zS7Hu5MaQOWVH2onH73m9gqRoJrZme6uWiGkfTcobgMzuVmUFW3dF+fUA20oDp2rERpI jfBuMNnPh/V7SgxG50YXA2DWmsZj7r3qIJ10bRfYDBGWRudoU53plSEXvqWKk/QfhtZk GUPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=m2miwIO/u/sYwYpBdb5shG1C8hzzjvjQQh0IO27dehU=; b=I4YUFgsCPcZAM9XJ8YQwqcJ9md4JLwXmTajxz0axB7Vf+X6MKdSxBgrymw2j5QA61w 0HdAOiogAPlqWcmns02AMFq/IxXXPbV9lQFvmzNsEJBy0cMj9GT6mgYtD8B0JlBmY9CC MyMgatAn6uvuU0ZTrtoPQ3OOcRyflVzFGXtreURviVFxkHYvOz20jKHSQJVvbVzutxpL LwHovF09J0XC0FfuR/dckHdlI/yZwRk1N6R0jVkTpJv2mpdKuo9Pa8GMrGMi18ZEU0Ta dEWruyu835sAlltL92ezO4PTR8JTBZe5gdb3EFDe+6+bEguk9hi+slH4B3Jd2nc+RSkE 3kAw== X-Gm-Message-State: AOAM532yHHwLEfmK8u6o9N/qygEGcJHdiSI3BdydBIWU5XRklUTp3oZY lr4IVDT0lloPWq4yff1Qyh9kZg== X-Received: by 2002:a17:90b:e87:: with SMTP id fv7mr7563556pjb.27.1616793667148; Fri, 26 Mar 2021 14:21:07 -0700 (PDT) Received: from ?IPv6:2601:646:c200:1ef2:c0b1:cb30:1baf:4666? ([2601:646:c200:1ef2:c0b1:cb30:1baf:4666]) by smtp.gmail.com with ESMTPSA id v11sm9988434pgg.68.2021.03.26.14.21.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Mar 2021 14:21:06 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: Why does glibc use AVX-512? Date: Fri, 26 Mar 2021 14:21:05 -0700 Message-Id: References: <87pmzlboxj.fsf@mid.deneb.enyo.de> Cc: Andy Lutomirski , "H. J. Lu" , X86 ML , LKML , "Bae, Chang Seok" , Carlos O'Donell , Rich Felker , libc-alpha In-Reply-To: <87pmzlboxj.fsf@mid.deneb.enyo.de> To: Florian Weimer X-Mailer: iPhone Mail (18D61) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Mar 26, 2021, at 2:11 PM, Florian Weimer wrote: >=20 > =EF=BB=BF* Andy Lutomirski: >=20 >>> On Fri, Mar 26, 2021 at 1:35 PM Florian Weimer wrote:= >>>=20 >>> I mean the immense slowdown you get if you use %xmm registers after > their %ymm counterparts (doesn't have to be %zmm, that issue is > present starting with AVX) and you have not issued VZEROALL or > VZEROUPPER between the two uses. It turns out that it=E2=80=99s not necessary to access the registers in ques= tion to trigger this behavior. You just need to make the CPU think it should= penalize you. For example, LDMXCSR appears to be a legacy SSE insn for this= purpose, and VLDMXCSR is an AVX insn for this purpose. I wouldn=E2=80=99t t= rust that using ymm9 would avoid the penalty just because common sense says i= t should. >> What kind of system has that problem? >=20 > It's a standard laptop after a suspend/resume cycle. It's either a > kernel or firmware bug. What kernel version? I think fixing the kernel makes more sense than fixing= glibc.