Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2579211imj; Mon, 11 Feb 2019 05:21:28 -0800 (PST) X-Google-Smtp-Source: AHgI3IYSqri8FziekWrbrcrWPOd24anykaff6kllhEABSbsQfgh7M8qo1HkSf9Qc6Y+d8WJeiAjU X-Received: by 2002:a63:480c:: with SMTP id v12mr7344713pga.115.1549891288805; Mon, 11 Feb 2019 05:21:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549891288; cv=none; d=google.com; s=arc-20160816; b=qxNrRXQdJsIIeEEfvIlUD8RxwHQbvqnHhXQnzc4jGoePgNL3Rk1PaWvAtpErf+/QKM p0TmFiWOHOPvWlYl3yyKvlFu7PzDOlKHLur10XpdgSeQI2+onlNOYKW40hXs0H/a7iWX 8GpJ3zpb17hV319i6z5l+lcJKsvqhm+05wulJmGNvKb3Wrm9FCp2Gwe3yZEMAS/KujQO wDplK7HPzRGhZ2aPqq8gz2NEzuB7p97Z2XIOWHWAm2IVZLZqhX2ZT5/j950bXKHcfC61 p1/vJioM9KETCfHqUfpMx0zT3mI78wrxu06mlZk55NkRuKYCMn6tABmlo+wUaZ4f2arB lb/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=Us6iBDwrjuZ4RA7swbkMpX5ORfoR9FoutjKJ2hPTddE=; b=FLjJzP4K4xPi1M8UYqg9i8l6RdUIMtrU3fW0DehnJLbFsWzlpiUUzf6z7lIHECaTSo TLBI0OwVV21+pv/2Gh/vBJI7mAYSyS5uOYlf3z+ow9Iquv1EsVRkKHGD3Jc/fV3xazCQ z8VdhYcXKUC69lbBBZzHWlIzrH/f6e2QIPHPrqRVF+MeImpT5fjwMjQu5OSihaJjIFy/ 0nBENG4jHMWQdWv0+X/uD+3sdFplblhmpPZ1en9xShR/IVD/bZB4+iDe4ZrXmv7gbDFK Q+0/WdUmuw33qP7m6evY4p96dMOBaSp59QROY1pN/BNH2yazhyiJ56UIsyYe+3y84LQr NbJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x11si9943239plv.76.2019.02.11.05.21.12; Mon, 11 Feb 2019 05:21:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727958AbfBKNUr (ORCPT + 99 others); Mon, 11 Feb 2019 08:20:47 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:38991 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727947AbfBKNUq (ORCPT ); Mon, 11 Feb 2019 08:20:46 -0500 Received: from [5.158.153.55] (helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gtBVi-0005Zt-AG; Mon, 11 Feb 2019 14:20:34 +0100 Date: Mon, 11 Feb 2019 14:20:23 +0100 (CET) From: Thomas Gleixner To: Aubrey Li cc: mingo@redhat.com, peterz@infradead.org, hpa@zytor.com, ak@linux.intel.com, tim.c.chen@linux.intel.com, dave.hansen@intel.com, arjan@linux.intel.com, linux-kernel@vger.kernel.org, Aubrey Li Subject: Re: [PATCH v8 1/3] x86/fpu: track AVX-512 usage of tasks In-Reply-To: <20190117183822.31333-1-aubrey.li@intel.com> Message-ID: References: <20190117183822.31333-1-aubrey.li@intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 18 Jan 2019, Aubrey Li wrote: > User space tools which do automated task placement need information > about AVX-512 usage of tasks, because AVX-512 usage could cause core > turbo frequency drop and impact the running task on the sibling CPU. > > The XSAVE hardware structure has bits that indicate when valid state > is present in registers unique to AVX-512 use. Use these bits to > indicate when AVX-512 has been in use and add per-task AVX-512 state > timestamp tracking to context switch. > > Well-written AVX-512 applications are expected to clear the AVX-512 > state when not actively using AVX-512 registers, so the tracking > mechanism is imprecise and can theoretically miss AVX-512 usage during > context switch. But it has been measured to be precise enough to be > useful under real-world workloads like tensorflow and linpack. > > If higher precision is required, suggest user space tools to use the > PMU-based mechanisms in combination. > > Signed-off-by: Aubrey Li Reviewed-by: Thomas Gleixner