Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7466952ybi; Wed, 5 Jun 2019 18:43:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqx66wfv0uFhiJ/sxXljjItOLWMUVOA7YJ+1ItdpnTX8pnP4NqCgYiron82VM67s4s9T6E4y X-Received: by 2002:a17:90a:9dc5:: with SMTP id x5mr33455987pjv.110.1559785417447; Wed, 05 Jun 2019 18:43:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559785417; cv=none; d=google.com; s=arc-20160816; b=0VbmKRPoAT6mtnlrgb1WAL3YPvnAQTN1jjPvxLovjljbs5w2HV5WOanyOmNwHFsw0m ZUuZ+mQjNqFi0Klsd+4ECT0k0zj/VPaHLqga2wjSVhOdUnpIRyMGrVpNBtCC7Bi/5nkN LOqa0UeOIf5pPRqsFp3UiwergMBJlN/zoqSkQjxEg2azAAQBl04LyFXRPSQjQCT31Ppl c7q6kgKcTeT0uULuAfW9r5zYCFMjog1G8rgs5FWNfh2O0F4dlXAu1c8FvsL8KdSuINmm MoEiYMLq92KZaHYyLHjbtYs5j0RKWr+hCuh9qlTZrXRJ0cTRDOzcfttx0Yh4tcpGhhlE TnSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=EVycsGQJS9JxrjmFsvbqDkwGM1CpfQPd6LCf1Fnbkho=; b=VzcE1rS/6/5RPeHO5bn0sQkDL923xExI3HQFN3JYmubYMs4jp3cU+fZWbaJoFd+BVH dmI0xaTJJ55dRyEE6dJHE0+CeiWNtOAfUp228HtfLcMQWBSoNrxuIakKlhZQtOPJOR2A ZBe0gojUnSOpMa2UsoyggA6RNLyTzCxD2CtWEXHhP3r///r7sRgH1jOghqVrpwTrf55e iSo8TkY+jUcpqqZu3q3IYs/o/6j6mtqlLS+jBUwccNZwBuGe1sAFKdaM4x3LjURm4Bx3 Bo+Qm47SsBULSYuLiguZ1WLwYCjErSDEJKX+S7jdJTQVbKN9A42oLTG8XR+c1+CkEdSA DRJw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f22si533060pgv.72.2019.06.05.18.43.20; Wed, 05 Jun 2019 18:43:37 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726713AbfFFBXG (ORCPT + 99 others); Wed, 5 Jun 2019 21:23:06 -0400 Received: from mga02.intel.com ([134.134.136.20]:54654 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726581AbfFFBXD (ORCPT ); Wed, 5 Jun 2019 21:23:03 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jun 2019 18:23:03 -0700 X-ExtLoop1: 1 Received: from aubrey-skl.sh.intel.com ([10.239.53.6]) by orsmga008.jf.intel.com with ESMTP; 05 Jun 2019 18:23:00 -0700 From: Aubrey Li To: akpm@linux-foundation.org, tglx@linutronix.de, mingo@redhat.com, peterz@infradead.org, hpa@zytor.com Cc: ak@linux.intel.com, tim.c.chen@linux.intel.com, dave.hansen@intel.com, arjan@linux.intel.com, adobriyan@gmail.com, aubrey.li@intel.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, Aubrey Li , Andy Lutomirski Subject: [PATCH v19 3/3] Documentation/filesystems/proc.txt: add arch_status file Date: Thu, 6 Jun 2019 09:22:36 +0800 Message-Id: <20190606012236.9391-3-aubrey.li@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190606012236.9391-1-aubrey.li@linux.intel.com> References: <20190606012236.9391-1-aubrey.li@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Added /proc//arch_status file, and added AVX512_elapsed_ms in /proc//arch_status. Report it in Documentation/filesystems/proc.txt Signed-off-by: Aubrey Li Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Arjan van de Ven Cc: Alexey Dobriyan Cc: Andrew Morton Cc: Andy Lutomirski Cc: Linux API --- Documentation/filesystems/proc.txt | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 66cad5c86171..e8bc403d15df 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -45,6 +45,7 @@ Table of Contents 3.9 /proc//map_files - Information about memory mapped files 3.10 /proc//timerslack_ns - Task timerslack value 3.11 /proc//patch_state - Livepatch patch operation state + 3.12 /proc//arch_status - Task architecture specific information 4 Configuring procfs 4.1 Mount options @@ -1948,6 +1949,44 @@ patched. If the patch is being enabled, then the task has already been patched. If the patch is being disabled, then the task hasn't been unpatched yet. +3.12 /proc//arch_status - task architecture specific status +------------------------------------------------------------------- +When CONFIG_PROC_PID_ARCH_STATUS is enabled, this file displays the +architecture specific status of the task. + +Example +------- + $ cat /proc/6753/arch_status + AVX512_elapsed_ms: 8 + +Description +----------- + +x86 specific entries: +--------------------- + AVX512_elapsed_ms: + ------------------ + If AVX512 is supported on the machine, this entry shows the milliseconds + elapsed since the last time AVX512 usage was recorded. The recording + happens on a best effort basis when a task is scheduled out. This means + that the value depends on two factors: + + 1) The time which the task spent on the CPU without being scheduled + out. With CPU isolation and a single runnable task this can take + several seconds. + + 2) The time since the task was scheduled out last. Depending on the + reason for being scheduled out (time slice exhausted, syscall ...) + this can be arbitrary long time. + + As a consequence the value cannot be considered precise and authoritative + information. The application which uses this information has to be aware + of the overall scenario on the system in order to determine whether a + task is a real AVX512 user or not. + + A special value of '-1' indicates that no AVX512 usage was recorded, thus + the task is unlikely an AVX512 user, but depends on the workload and the + scheduling scenario, it also could be a false negative mentioned above. ------------------------------------------------------------------------------ Configuring procfs -- 2.17.1