From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id F308B385800F for ; Fri, 26 Mar 2021 21:21:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F308B385800F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=amacapital.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=luto@amacapital.net Received: by mail-pl1-x631.google.com with SMTP id v23so1533175ple.9 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=nVavIAybp6y4PsdOqYT/W5NPe7Z+Rj9W3FfT9qd2rF+ViaizHJzNdDAX43lUtFA4k/ y7HD/6Eu+66/FzTqJNSqaQHm3Bkh9Mhm0CrwqsM5GoYF0EjSg4xpsHNR+XcuL2mYl+cT TMyv6mY9wWyRRuU4m63s2nDzfts60ybX11lOyj1xWCy+v1LNOO3yN0xzq4DCyM6nG8D1 mCHTuuvyoyQj55axTVYa1xwvmcVFJSgyCCrR+yDpB8bGI1vXlEKGsGkA7nh/FxjB+R4m va9tpX2XFFZadmgbqwSi9pDOSdHLKuHj8v6zz2WVx/BPePALOUkyCt/tDvzb71vswX6M 7rEg== X-Gm-Message-State: AOAM533gfo/Pr+iK1uJfQZ3mnazI7OtcF4n5qVS2t9RGD5m0qwyyDX50 ctWQrM8oRMJXS5hR7px188U7uyVjRsZswQ== X-Google-Smtp-Source: ABdhPJzu3YvDiQ+YFH46fm+031Ix2HT2UX27Wa9xogrIJhAGl5B1yLVcTz9TgNOfljmjPaB0ajujgQ== 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) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Fri, 26 Mar 2021 21:21:09 -0000 > 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.