From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 7BA7F3858032 for ; Tue, 7 Dec 2021 19:32:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7BA7F3858032 Received: by mail-pl1-x62b.google.com with SMTP id y7so10213117plp.0 for ; Tue, 07 Dec 2021 11:32:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KI0o5wEqvaHvOfUDr53a9hWua6v3hiCQyB0EL7A9cic=; b=FaMA240WEbq6QDkobVbkUINUm6/O0s/zTYjxEeH85vm1Y7fu64xYFi0h89cxXFLAuf LYTrxKdiXlw9/cd2mIpSIi+p3pU5ghicZ9WR3XN2sT0XYOYBF6hsUPun3wyy0jvATfAj FpR0l5Ya1ERAh8du4utNeH9FU6FnxIjvaBOHj/H+C0wC5Es6YCw8wKywDMAuXkKufmen LwRZ93U6LghPawt9u9L1ij1SekcM05o0jsp8SIehJ7GW6TGItyc/to/Vz80s4Rh2JbJw IVr6ERh8EG7DNJBVGgePg/ERlvOPAYx9JsGNT9ONaDwLYGzX1hqMjowk537DuzwZ35x+ 9Tbw== X-Gm-Message-State: AOAM531bPXcYOfCLdK7Ac0gX3qPlc06WxcXZ9HNjUwCEFH84uaYwCMWj jJP/XEyWwRA+8Ot/VlG0Pt6JW7Ot52oxBbhmPMM= X-Google-Smtp-Source: ABdhPJxSMCzUMOv51w/owZ3pv1WqJqKPWtI5olx776733IIFqOsfNBqJhCNAsHMvlK3jznTyLQbGpTGnnCo0jIV7chM= X-Received: by 2002:a17:902:ab14:b0:143:77d8:2558 with SMTP id ik20-20020a170902ab1400b0014377d82558mr53464653plb.54.1638905561643; Tue, 07 Dec 2021 11:32:41 -0800 (PST) MIME-Version: 1.0 References: <20211206032303.7159-1-hjl.tools@gmail.com> <3639bca9-e90d-d3ff-c758-d2d5c4c0a3d2@linux.intel.com> <87r1aoqzlz.fsf@oldenburg.str.redhat.com> <878rwwquvk.fsf@oldenburg.str.redhat.com> In-Reply-To: From: Noah Goldstein Date: Tue, 7 Dec 2021 13:32:30 -0600 Message-ID: Subject: Re: [PATCH] x86: Don't set Prefer_No_AVX512 for processors with AVX512 and AVX-VNNI To: "H.J. Lu" Cc: Florian Weimer , Arjan van de Ven , liuhongt , Hongyu Wang , "H.J. Lu via Libc-alpha" , Thiago Macieira Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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: Tue, 07 Dec 2021 19:32:44 -0000 On Tue, Dec 7, 2021 at 9:53 AM H.J. Lu via Libc-alpha wrote: > > On Tue, Dec 7, 2021 at 7:48 AM Florian Weimer wrote: > > > > * H. J. Lu via Libc-alpha: > > > > > On Tue, Dec 7, 2021 at 6:05 AM Florian Weimer wrote: > > >> > > >> * H. J. Lu via Libc-alpha: > > >> > > >> > Hongtao, Hongyu, can you find a Rocket Lake to test? > > >> > > >> I've found a lab machine with an i7-11700 CPU. Is there something I > > >> could test for you? > > > > > > You can enable AVX512 in glibc with: > > > > > > $ export GLIBC_TUNABLES=glibc.cpu.hwcaps=-Prefer_No_AVX512 > > > > > > While bootstrapping GCC with -j8, track CPU frequency with turbostat. If > > > there is no CPU frequency drop and build time is less comparing against > > > without GLIBC_TUNABLES, we can enable AVX512. > > > > > >> (This could be non-production silicon, though.) > > >> > > > > > > The frequency behavior of non-production silicon can be different. > > > > With that caveat, it seems that frequencies drop further with > > GLIBC_TUNABLES set as above, and the build is also a little bit slower > > (5m31s vs 5m23s, the AVX-512 build was run first, and the systems was a > > little bit warmer for the second run). > > > > Would it make sense to run more extensive tests, or should we wait for > > someone with production silicon to show up? > > GCC is a heavy user of memcpy/memset, which is a good proxy of > ZMM load/store impact on CPU frequency. We need to run the same > test on a production Rocket Lake. I would think a microbenchmark would be better for determining if rocketlake actually has throttling. Testing the full j8 GCC build will add a bunch of frequency "noise" due to thermal throttling. > > -- > H.J.