linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Aubrey Li <aubrey.li@linux.intel.com>
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,
	adobriyan@gmail.com, akpm@linux-foundation.org,
	aubrey.li@intel.com, linux-api@vger.kernel.org,
	linux-kernel@vger.kernel.org, Andy Lutomirski <luto@kernel.org>
Subject: Re: [PATCH v17 1/3] proc: add /proc/<pid>/arch_status
Date: Wed, 24 Apr 2019 23:18:04 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1904242310040.1762@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20190421183529.9141-1-aubrey.li@linux.intel.com>

On Mon, 22 Apr 2019, Aubrey Li wrote:
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 5ad92419be19..d5a9c5ddd453 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -208,6 +208,7 @@ config X86
>  	select USER_STACKTRACE_SUPPORT
>  	select VIRT_TO_BUS
>  	select X86_FEATURE_NAMES		if PROC_FS
> +	select PROC_PID_ARCH_STATUS		if PROC_FS

Can you please stop mixing arch and proc code? There is no point in
enabling this on x86 right away.

> +
> +config PROC_PID_ARCH_STATUS
> +	bool "Enable /proc/<pid>/arch_status file"

Why is this switchable? x86 selects it if PROC_FS is enabled and all other
architectures are absolutely not interested in this.

> +	default n
> +	help
> +	  Provides a way to examine process architecture specific information.
> +	  See <file:Documentation/filesystems/proc.txt> for more information.

Which contains zero information about this file when only this patch is
applied. 

> @@ -94,6 +94,7 @@
>  #include <linux/sched/debug.h>
>  #include <linux/sched/stat.h>
>  #include <linux/posix-timers.h>
> +#include <linux/processor.h>

That include is required because it does NOT contain anything useful for
this, right?

> +/*
> + * Add support for task architecture specific output in /proc/pid/arch_status.
> + * task_arch_status() must be defined in asm/processor.h
> + */
> +#ifdef CONFIG_PROC_PID_ARCH_STATUS
> +# ifndef task_arch_status
> +# define task_arch_status(m, task)
> +# endif

What exactly is the point of this macro mess? If an architecture selects
CONFIG_PROC_PID_ARCH_STATUS then it has to provide proc_task_arch_status()
and the prototype should be in include/linux/proc_fs.h.

> +static int proc_pid_arch_status(struct seq_file *m, struct pid_namespace *ns,
> +				struct pid *pid, struct task_struct *task)
> +{
> +	task_arch_status(m, task);
> +	return 0;
> +}
> +#endif /* CONFIG_PROC_PID_ARCH_STATUS */

Thanks,

	tglx

  parent reply	other threads:[~2019-04-24 21:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-21 18:35 [PATCH v17 1/3] proc: add /proc/<pid>/arch_status Aubrey Li
2019-04-21 18:35 ` [PATCH v17 2/3] /proc/pid/arch_status: Add AVX-512 usage elapsed time Aubrey Li
2019-04-24 21:19   ` Thomas Gleixner
2019-04-21 18:35 ` [PATCH v17 3/3] Documentation/filesystems/proc.txt: add arch_status file Aubrey Li
2019-04-24 21:27   ` Thomas Gleixner
2019-04-24 21:18 ` Thomas Gleixner [this message]
2019-04-25  1:50   ` [PATCH v17 1/3] proc: add /proc/<pid>/arch_status Li, Aubrey
2019-04-25  7:20     ` Thomas Gleixner
2019-04-25  8:12       ` Li, Aubrey
2019-04-25  8:20         ` Thomas Gleixner
2019-04-25  8:24           ` Li, Aubrey
2019-04-25 10:11     ` Enrico Weigelt, metux IT consult
2019-04-25 10:42       ` Li, Aubrey
2019-04-25 10:46         ` Enrico Weigelt, metux IT consult
2019-04-25 10:50           ` Thomas Gleixner
2019-04-26 11:20             ` Enrico Weigelt, metux IT consult
2019-04-26 13:38               ` Thomas Gleixner
2019-04-25 10:40   ` Enrico Weigelt, metux IT consult

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.1904242310040.1762@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=adobriyan@gmail.com \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.com \
    --cc=aubrey.li@intel.com \
    --cc=aubrey.li@linux.intel.com \
    --cc=dave.hansen@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tim.c.chen@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).