Return-path: Received: from mga12.intel.com ([192.55.52.136]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fDL6F-0008Cc-Su for speck@linutronix.de; Tue, 01 May 2018 04:33:04 +0200 Subject: [MODERATED] Re: [patch V8 15/15] SSB 15 References: <20180430150423.180110059@linutronix.de> <20180430151233.029064226@linutronix.de> From: Tim Chen Message-ID: <847a9894-d451-ee5a-01ae-46fb4e452d0d@linux.intel.com> Date: Mon, 30 Apr 2018 19:32:57 -0700 MIME-Version: 1.0 In-Reply-To: <20180430151233.029064226@linutronix.de> Content-Type: multipart/mixed; boundary="1Xh6m9Ymc2AoybSatC2jzeM83R7IkBiEB"; protected-headers="v1" To: speck@linutronix.de List-ID: This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156) --1Xh6m9Ymc2AoybSatC2jzeM83R7IkBiEB Content-Type: multipart/mixed; boundary="2IaStfFU3rlUoqMjbLBzM780BPkn9nWmU" --2IaStfFU3rlUoqMjbLBzM780BPkn9nWmU Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Can we add this bit to this patch? It will be useful to find out if RDS is enabled from /proc/pid/status. Thanks. Tim diff --git a/fs/proc/array.c b/fs/proc/array.c index ae2c807..cc6653f 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -338,6 +338,14 @@ static inline void task_seccomp(struct seq_file *m, = struct task_struct *p) seq_putc(m, '\n'); } =20 +static inline void task_rds(struct seq_file *m, struct task_struct *p) +{ + if (test_tsk_thread_flag(p, TIF_RDS)) + seq_printf(m, "Reduced Data Speculation: 1 (On)\n"); + else + seq_printf(m, "Reduced Data Speculation: 0 (Off)\n"); +} + static inline void task_context_switch_counts(struct seq_file *m, struct task_struct *p) { @@ -379,6 +387,7 @@ int proc_pid_status(struct seq_file *m, struct pid_na= mespace *ns, task_cpus_allowed(m, task); cpuset_task_status_allowed(m, task); task_context_switch_counts(m, task); + task_rds(m, task); return 0; } =20 --2IaStfFU3rlUoqMjbLBzM780BPkn9nWmU-- --1Xh6m9Ymc2AoybSatC2jzeM83R7IkBiEB--