Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3623555pxf; Mon, 29 Mar 2021 07:14:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEENSC7WPb5+2KRGrWf6hsojnVTrEQRn7ZwkfAUiyQMHltUzqU4accxme2eBxx4KRHLzF/ X-Received: by 2002:a17:906:86c1:: with SMTP id j1mr29560003ejy.373.1617027295993; Mon, 29 Mar 2021 07:14:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617027295; cv=none; d=google.com; s=arc-20160816; b=lzliDCC5o6Okp4Z5VHz4yGlRO3VPDl7UZ9HEEb7iSO/5fgN8qPOO9ZefhHqODBPtE4 A/UY26HnO3Gr3mCg6VYrh2Z6jPQnxyX8rg3D/mjMuBQ42UrIBpZ/9IKLPYatN6tU1TAN ceug9ikkOjxhefARUGK4jNH5G16ZtB8OWc/RXjDqaj/G8YVfQF4ta+/6sk6byqP0JZsN BhkeRRZxJ0fxcrcNd5w4uYuH+8nsCCbKuc9X5aPceQqG/XFDHdup53hEDUgD1lKDUWo8 2G9JLOm6IUzidF+e71hY5VssWwW4Z0e3zKq6IVbzgmN0ZZtMsWLZ2mIbdY17tzgxSVCu iFIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=QSxgoPopcM0cDMxgeW7VtkiyOengdx6ivl7xbU811OM=; b=HUQzId6JBmXO17zlLzVGZdyc2mb1nLrLBVS/6eXtVY2zI1uPEdOW5iPn2O/W99quvb 9Tr7wn34Fs9daVfDceHEws0cladYPVDwTF8kiafryR4wjEaOeYuWM55wQIXQrPaqj3OT 2te3xKd+nWZW5vSwlmFBLHERbjkLli7UG1JGjVdZ4pYSOM1PqSBo1f0Wh8/nr6tm04bp nR9IAqLk+2NfJoszmzegaiVMcYiBOTkCEcyAPTIiPtfR71Yu0U3w1kjHeMDVcrKAGEKh YARHpNIW1l06RfBYOOIii7AM5B0bEsO3UsAwQDWQ6qpNxnecsHTQ/+MSexa/wALLMcrx mDOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Nuo01USC; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q17si13440322eju.412.2021.03.29.07.14.33; Mon, 29 Mar 2021 07:14:55 -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=@linutronix.de header.s=2020 header.b=Nuo01USC; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229955AbhC2OLM (ORCPT + 99 others); Mon, 29 Mar 2021 10:11:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230220AbhC2OKy (ORCPT ); Mon, 29 Mar 2021 10:10:54 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1D49C061574; Mon, 29 Mar 2021 07:10:53 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1617027052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QSxgoPopcM0cDMxgeW7VtkiyOengdx6ivl7xbU811OM=; b=Nuo01USCwoeU/+/V+JGgvZUDpIWn67KGPIbL8b1tTS5s6UcMNQRRKrUafrZFve5obVgOOJ 73u47whssJNTzZxUD0A5gKe6VPDb4TVKOteIMVo0YDlhK4h9y2sM0V9j23Mdm6CY8RJKNv 2j4iaEkCqWeG422dTAgFS2ep90RtiQ8XNerAjMWHpRZRzfeyR65rIw/79WnTBk05fCcPFM YR098gZ7qB8oS4G6cVm8CJi33EU3SVKW8hQC1XaNYdBkVK4aoKX7SgzKjjmRmPNmWr8EjL MK6NvX/lhPVQJDMTDmNPNHM/eq00jlQ5susXZClx9zfN9mVKPrgeN4DepptIpw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1617027052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QSxgoPopcM0cDMxgeW7VtkiyOengdx6ivl7xbU811OM=; b=GF4k7+bIuvabZwywW1+UzMxS2SMH1G5hGQWmlUT7RAotmXvgICLTIkNjdFfA7Xp3CZmfPf qruKyM3ef5cj/9BA== To: Len Brown Cc: Andy Lutomirski , "Chang S. Bae" , Borislav Petkov , Ingo Molnar , X86 ML , "Brown\, Len" , Dave Hansen , "Liu\, Jing2" , "Ravi V. Shankar" , Linux Kernel Mailing List , Linux Documentation List Subject: Re: [PATCH v4 22/22] x86/fpu/xstate: Introduce boot-parameters to control state component support In-Reply-To: References: <20210221185637.19281-1-chang.seok.bae@intel.com> <20210221185637.19281-23-chang.seok.bae@intel.com> <871rc9bl3v.fsf@nanos.tec.linutronix.de> <87r1k0ck7o.ffs@nanos.tec.linutronix.de> Date: Mon, 29 Mar 2021 16:10:52 +0200 Message-ID: <87r1jy6oer.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 29 2021 at 09:31, Len Brown wrote: > On Sat, Mar 27, 2021 at 6:20 PM Thomas Gleixner wrote: > >> What's the actual downside of issuing TILERELEASE conditionally >> depending on prev->AMX INIT=0? Is it slooooow or what's the real >> problem here? > > TILERELEASE is fast, so there should be no down-side to execute it. > Indeed, checking whether you need to execute it or not will probably take > longer than executing TILERELEASE. My point (perhaps academic) > is that Linux should not have to know about TILERELEASE, or execute it. > > Re: running in the kernel with AMX INIT=0 > > AMX INIT=0 will prevent c6 on that core. I don't expect to see this > in the syscall path, though if a user wanted to neglect to issue TILERELEASE, > there is nothing forcing them to do so. > > It can certainly happen on the interrupt path, but on the interrupt patch > I don't know if we can end up requesting c6 -- perhaps on a forced > task migration? I think I clearly described how it can end up in that situation and that there are a gazillion ways to get there. If I decide at 5PM to call it a day after hitting the breakpoint, then I really would appreciate that the machine goes deep idle instead of staying at C1(E) until 9AM when I come back. > Re: frequency credits in the kernel with AMX INIT=0. > > It works exactly the same way as AMX INIT=1. > That is to say, the frequency credits don't key off of AMX INIT, > they key off of the actual use of the AMX execution unit, and > the credits free up several orders of magnitude faster > (both for AVX-512 and AMX) on this hardware as in previous generations. > > As a result, if we interrupt an AMX program, and run for an extended > period of time in the kernel without XRESTOR to clear out his AMX INIT=0 state, > that will not have any impact on the frequency we run inside the kernel any more > than if he had AMX INIT=1 state. Ok. That's clearly missing in documentation, but it does not solve the C state issue at all. Thanks, tglx