Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1361950

Re: [PATCH v2 4/4] nmi_backtrace: generate one-line reports for idle cpus

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 4/4] nmi_backtrace: generate one-line reports for idle cpus
Date 2016-03-21 16:50 +0100
Message-ID <rfafE-7J0-13@gated-at.bofh.it> (permalink)
References <rdLW2-35m-9@gated-at.bofh.it> <rdoG6-4jI-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Mar 16, 2016 at 01:02:13PM -0400, Chris Metcalf wrote:
> diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
> index 9f7c21c22477..d569ae7fde37 100644
> --- a/arch/x86/kernel/process.c
> +++ b/arch/x86/kernel/process.c
> @@ -298,7 +298,7 @@ void arch_cpu_idle(void)
>  /*
>   * We use this if we don't have any better idle routine..
>   */
> -void default_idle(void)
> +void __cpuidle default_idle(void)
>  {
>  	trace_cpu_idle_rcuidle(1, smp_processor_id());
>  	safe_halt();
> @@ -413,7 +413,7 @@ static int prefer_mwait_c1_over_halt(const struct cpuinfo_x86 *c)
>   * with interrupts enabled and no flags, which is backwards compatible with the
>   * original MWAIT implementation.
>   */
> -static void mwait_idle(void)
> +static __cpuidle void mwait_idle(void)
>  {
>  	if (!current_set_polling_and_test()) {
>  		trace_cpu_idle_rcuidle(1, smp_processor_id());

The most common idle function for x86 is: mwait_idle_with_hints(),
trouble is, its an inline, so I'm not sure adding __cpuidle to it does
anything.

I've yet to find the magic objdump incantation to check. Or rather
objdump -h doesn't appear to list .cpuidle.text at all :/

I'm probably doing something silly...

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 4/4] nmi_backtrace: generate one-line reports for idle  cpus Peter Zijlstra <peterz@infradead.org> - 2016-03-21 16:50 +0100
  Re: [PATCH v2 4/4] nmi_backtrace: generate one-line reports for idle  cpus Peter Zijlstra <peterz@infradead.org> - 2016-03-21 17:40 +0100
    Re: [PATCH v2 4/4] nmi_backtrace: generate one-line reports for idle  cpus Peter Zijlstra <peterz@infradead.org> - 2016-03-21 18:20 +0100

csiph-web