Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1706190imj; Thu, 14 Feb 2019 10:37:30 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ7xDbIm77r3J4HFZ5Hv6yGcabQ9RD4b1Lr7vSQ8jIjyG73E7wB/kvEu1t1jsFQyufK+bEe X-Received: by 2002:a17:902:e01:: with SMTP id 1mr5532545plw.251.1550169450673; Thu, 14 Feb 2019 10:37:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550169450; cv=none; d=google.com; s=arc-20160816; b=tDK4zxdsRVjaVOPquP8c/HxuT4aZ9tC18TGjyRAQCqY+7Oskhl0Nd3wgL4IVZx22DJ n0iVS0s1u+Xxk26r6QcN5Bgp/rLGdq3cZDjGt6aW0PDCJLPja6s1+bGXKskWGlpeWq7R KqqRw2Su6TaXMpwnAy/kjewK0yH0O6481i4zDGN8TBpznA02+lsj/hPXOucxntkqiU1E uuclP+WL6vyangFzWel7swJCjWMX8wFaxU1W6HcFOzD5z9pV681r0wKX/4DNqFfhGBFG y/B0GoWk09jUg+9agJA+uluOak91+slvbKE1I3PgZGRnL+acXiqZBS01YRmbiCQjB/vd WcLA== 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=vXoT15lt3Qxjcz4KjqrTMLBGD2CNasi2xc4vUx87uD8=; b=rEZjKKqHusmQokFTpfAEuVGrcwUf73nOJWAwR+Y15XD11HBzgwD7FNLxiFIfMj0jdQ IsGXx95lHOyLIV/zrF785nzHxENtQqF3swiYox3pdd1EEjvA15xHUUIPlY/260Oy9Pge Qn2yqTPh5930TJ6+P6QHcUdvJOygxA2IMnooWnyRMhU36f3NCvxS0zp4ScOjOgiPDX6a 7gTmorr6El/UacoyDNo1qHAibfH6BEA3aDnvgRwBDZamhltnM2/9UV9cuYO9sO9ZBgpD H8GoZYv/bCY7bhrrMo3W/sZ1WmcMjYN6V2GKTUbdeZxIEsIm5gO1hKMH57TXOqDLyK8F MPtw== 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 f40si3283469plb.60.2019.02.14.10.37.14; Thu, 14 Feb 2019 10:37:30 -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 S2394049AbfBNL3k (ORCPT + 99 others); Thu, 14 Feb 2019 06:29:40 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:49388 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729808AbfBNL3k (ORCPT ); Thu, 14 Feb 2019 06:29:40 -0500 Received: from [5.158.153.52] (helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1guFCp-0004PT-GM; Thu, 14 Feb 2019 12:29:27 +0100 Date: Thu, 14 Feb 2019 12:29:20 +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, aubrey.li@intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v11 2/3] x86,/proc/pid/status: Add AVX-512 usage elapsed time In-Reply-To: <20190213023748.6614-2-aubrey.li@linux.intel.com> Message-ID: References: <20190213023748.6614-1-aubrey.li@linux.intel.com> <20190213023748.6614-2-aubrey.li@linux.intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 13 Feb 2019, Aubrey Li wrote: > AVX-512 components use could cause core turbo frequency drop. So > it's useful to expose AVX-512 usage elapsed time as a heuristic hint > for the user space job scheduler to cluster the AVX-512 using tasks > together. > > Example: > $ cat /proc/pid/status | grep AVX512_elapsed_ms > AVX512_elapsed_ms: 1020 > > The number '1020' denotes 1020 millisecond elapsed since last time > context switch the off-CPU task using AVX-512 components, thus the I know what you are trying to say, but this sentence does not parse. So what you want to say is: This means that 1020 milliseconds have elapsed since the AVX512 usage of the task was detected when the task was scheduled out. Aside of that 1020ms is hardly evidence for real AVX512 usage, so you want to come up with a better example than that. But that makes me think about the usefulness of this hint in general. A AVX512 using task which runs alone on a CPU, is going to have either no AVX512 usage recorded at all or the time elapsed since the last recording is absurdly long. IOW, this needs crystal ball magic to decode because there is no correlation between that elapsed time and the time when the last context switch happened simply because that time is not available in /proc/$PID/status. Sure you can oracle it out from /proc/$PID/stat with even more crystal ball magic, but there is no explanation at all. There may be use case scenarios where this crystal ball prediction is actually useful, but the inaccuracy of that information and the possible pitfalls for any user space application which uses it need to be documented in detail. Without that, this is going to cause more trouble and confusion than benefit. Thanks, tglx