Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4539336imj; Tue, 12 Feb 2019 18:52:40 -0800 (PST) X-Google-Smtp-Source: AHgI3IYHiU/NmFzcT4urw9xzwJ7aGuMwLYkFEz5EGmv4OKmNj+/yNgJkwq2BhkAIVm7I5bNMESWZ X-Received: by 2002:a63:5b65:: with SMTP id l37mr6695290pgm.395.1550026360053; Tue, 12 Feb 2019 18:52:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550026360; cv=none; d=google.com; s=arc-20160816; b=oP+48qAPJ9OtsIE9wAJBgRdh/REGRb7i6Uhc/U71sIkHw1Ncjno37gIqee3NvX1c6K K3YyOOtrJvz0bDc4nXctaMN6bTcYwX7VLdW19Net/HAolnpg8poaKHNvfDMfCpveu4er 0i8mOdF+RlajvaH447LAAbdYjifgCIGXswbtkx/0Eegg5Vc7tw3UVyDp1/Eulx07zs0j 7+ASNGqL1aryPZShqZ9B2ZgX+817GnGdeZlYOdBfeW/UrK2y5qgxTpJeJPD3fb2nOnze y6fcfkNLiVQ8865KTIzXd4EaN5NrZc0IBjILVMsXXgj9bGBVMjExLO9XJd/eF2F6i6QC bPsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=dFSphPu179FVnVr8C4Gw1a8j9//psL8GGzASl55vAGc=; b=L53I4p3dBsS1r4fHswlCj6MqMqm1vedaTispJiFpGKEsRB+DtnAmggCD0rero3ihHe SWdB+GeD2Q0TrC12Bf46dSnxsgqx7Ivxv1zrJQZLUrCPzHsmal2v6JbG81iBvkahXvcg 6n35QQGTyO8xrLbTVa+EmLq1OwNciOAqai8dMP+yxzpOJY5rKPA7X35K+4Ia3sqMXGtu UFQCKDHzXuK2VaF44TlIME0dfP7NLJqGPrK7EdI0+TtkeaeWpwg9Ojpd/0TWl2bPIsuE BgyVcdellc5LkGweAt6pJcEPtOW72OtoasnuobUFGyHbXxHT+5Ywb1r2rAwQXG7zFeFy oRAw== 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 l12si5047888pgm.464.2019.02.12.18.52.24; Tue, 12 Feb 2019 18:52:40 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388959AbfBMCvq (ORCPT + 99 others); Tue, 12 Feb 2019 21:51:46 -0500 Received: from mga14.intel.com ([192.55.52.115]:11923 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732981AbfBMCiq (ORCPT ); Tue, 12 Feb 2019 21:38:46 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Feb 2019 18:38:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,364,1544515200"; d="scan'208";a="138153554" Received: from aubrey-skl.sh.intel.com ([10.239.53.19]) by orsmga001.jf.intel.com with ESMTP; 12 Feb 2019 18:38:42 -0800 From: Aubrey Li To: 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, aubrey.li@intel.com, linux-kernel@vger.kernel.org, Aubrey Li Subject: [PATCH v11 1/3] /proc/pid/status: Add support for architecture specific output Date: Wed, 13 Feb 2019 10:37:46 +0800 Message-Id: <20190213023748.6614-1-aubrey.li@linux.intel.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The architecture specific information of the running processes could be useful to the userland. Add support to examine process architecture specific information externally. Signed-off-by: Aubrey Li Cc: Peter Zijlstra Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Arjan van de Ven --- fs/proc/array.c | 5 +++++ include/linux/proc_fs.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/fs/proc/array.c b/fs/proc/array.c index 9d428d5a0ac8..ea7a981f289c 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -401,6 +401,10 @@ static inline void task_thp_status(struct seq_file *m, struct mm_struct *mm) seq_printf(m, "THP_enabled:\t%d\n", thp_enabled); } +void __weak arch_proc_pid_status(struct seq_file *m, struct task_struct *task) +{ +} + int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) { @@ -424,6 +428,7 @@ int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, task_cpus_allowed(m, task); cpuset_task_status_allowed(m, task); task_context_switch_counts(m, task); + arch_proc_pid_status(m, task); return 0; } diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index d0e1f1522a78..1de9ba1b064f 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -73,6 +73,8 @@ struct proc_dir_entry *proc_create_net_single_write(const char *name, umode_t mo int (*show)(struct seq_file *, void *), proc_write_t write, void *data); +/* Add support for architecture specific output in /proc/pid/status */ +extern void arch_proc_pid_status(struct seq_file *m, struct task_struct *task); #else /* CONFIG_PROC_FS */ -- 2.17.1