diff options
author | Aubrey Li <aubrey.li@linux.intel.com> | 2019-06-05 21:22:34 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-06-12 05:42:13 -0400 |
commit | 68bc30bb9f33fc8d11e3d110d29e06490896a999 (patch) | |
tree | 22aa1b841048299299d3a0e9be95d35aa3d27584 /fs/proc | |
parent | d1fdb6d8f6a4109a4263176c84b899076a5f8008 (diff) |
proc: Add /proc/<pid>/arch_status
Exposing architecture specific per process information is useful for
various reasons. An example is the AVX512 usage on x86 which is important
for task placement for power/performance optimizations.
Adding this information to the existing /prcc/pid/status file would be the
obvious choise, but it has been agreed on that a explicit arch_status file
is better in separating the generic and architecture specific information.
[ tglx: Massage changelog ]
Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Cc: peterz@infradead.org
Cc: hpa@zytor.com
Cc: ak@linux.intel.com
Cc: tim.c.chen@linux.intel.com
Cc: dave.hansen@intel.com
Cc: arjan@linux.intel.com
Cc: adobriyan@gmail.com
Cc: aubrey.li@intel.com
Cc: linux-api@vger.kernel.org
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Linux API <linux-api@vger.kernel.org>
Link: https://lkml.kernel.org/r/20190606012236.9391-1-aubrey.li@linux.intel.com
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/Kconfig | 4 | ||||
-rw-r--r-- | fs/proc/base.c | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/fs/proc/Kconfig b/fs/proc/Kconfig index 62ee41b4bbd0..4c3dcb718961 100644 --- a/fs/proc/Kconfig +++ b/fs/proc/Kconfig | |||
@@ -98,3 +98,7 @@ config PROC_CHILDREN | |||
98 | 98 | ||
99 | Say Y if you are running any user-space software which takes benefit from | 99 | Say Y if you are running any user-space software which takes benefit from |
100 | this interface. For example, rkt is such a piece of software. | 100 | this interface. For example, rkt is such a piece of software. |
101 | |||
102 | config PROC_PID_ARCH_STATUS | ||
103 | def_bool n | ||
104 | depends on PROC_FS | ||
diff --git a/fs/proc/base.c b/fs/proc/base.c index 9c8ca6cd3ce4..ec436c61eece 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -3061,6 +3061,9 @@ static const struct pid_entry tgid_base_stuff[] = { | |||
3061 | #ifdef CONFIG_STACKLEAK_METRICS | 3061 | #ifdef CONFIG_STACKLEAK_METRICS |
3062 | ONE("stack_depth", S_IRUGO, proc_stack_depth), | 3062 | ONE("stack_depth", S_IRUGO, proc_stack_depth), |
3063 | #endif | 3063 | #endif |
3064 | #ifdef CONFIG_PROC_PID_ARCH_STATUS | ||
3065 | ONE("arch_status", S_IRUGO, proc_pid_arch_status), | ||
3066 | #endif | ||
3064 | }; | 3067 | }; |
3065 | 3068 | ||
3066 | static int proc_tgid_base_readdir(struct file *file, struct dir_context *ctx) | 3069 | static int proc_tgid_base_readdir(struct file *file, struct dir_context *ctx) |
@@ -3449,6 +3452,9 @@ static const struct pid_entry tid_base_stuff[] = { | |||
3449 | #ifdef CONFIG_LIVEPATCH | 3452 | #ifdef CONFIG_LIVEPATCH |
3450 | ONE("patch_state", S_IRUSR, proc_pid_patch_state), | 3453 | ONE("patch_state", S_IRUSR, proc_pid_patch_state), |
3451 | #endif | 3454 | #endif |
3455 | #ifdef CONFIG_PROC_PID_ARCH_STATUS | ||
3456 | ONE("arch_status", S_IRUGO, proc_pid_arch_status), | ||
3457 | #endif | ||
3452 | }; | 3458 | }; |
3453 | 3459 | ||
3454 | static int proc_tid_base_readdir(struct file *file, struct dir_context *ctx) | 3460 | static int proc_tid_base_readdir(struct file *file, struct dir_context *ctx) |