Messages in this thread | | | Subject | Re: [PATCH 2/4] nmi_backtrace: generate one-line reports for idle cpus | From | Chris Metcalf <> | Date | Mon, 7 Mar 2016 12:05:00 -0500 |
| |
On 03/07/2016 03:26 AM, Daniel Thompson wrote: >> Chris Metcalf wrote: >> +static DEFINE_PER_CPU(bool, cpu_idling); >> + >> +/* Was the cpu was in the low-level idle code when interrupted? */ >> +bool in_cpu_idle(void) >> +{ >> + return this_cpu_read(cpu_idling); > > I think we continue to need the code to identify a core that is > running an interrupt handler. Interrupts are not masked at the point > we set cpu_idling to false meaning we can easily be preempted before > we clear the flag.
Yes, good catch. However, mooted by PeterZ wanting to keep any extra state-switching code out of the idle path. See my reply to him for more on that.
-- Chris Metcalf, Mellanox Technologies http://www.mellanox.com
| |