All of lore.kernel.org
 help / color / mirror / Atom feed
* A question of perf NMI handler
@ 2010-08-04  9:21 Lin Ming
  2010-08-04  9:50 ` Peter Zijlstra
                   ` (2 more replies)
  0 siblings, 3 replies; 133+ messages in thread
From: Lin Ming @ 2010-08-04  9:21 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Don Zickus, Cyrill Gorcunov,
	robert.richter, fweisbec
  Cc: linux-kernel, Huang, Ying

With nmi_watchdog enabled, perf_event_nmi_handler always return
NOTIFY_STOP(active_events > 0), and the notifier call chain will not
call further.

If it was not perf NMI, does the perf nmi handler may stop the real NMI
handler get called because NOTIFY_STOP is returned??

static int __kprobes
perf_event_nmi_handler(struct notifier_block *self,
			 unsigned long cmd, void *__args)
{
	struct die_args *args = __args;
	struct pt_regs *regs;

	if (!atomic_read(&active_events)) ===> With nmi_watchdog enabled, active_events > 0
		return NOTIFY_DONE;

	switch (cmd) {
	case DIE_NMI:
	case DIE_NMI_IPI:
		break;

	default:
		return NOTIFY_DONE;
	}

	regs = args->regs;

	apic_write(APIC_LVTPC, APIC_DM_NMI);
	/*
	 * Can't rely on the handled return value to say it was our NMI, two
	 * events could trigger 'simultaneously' raising two back-to-back NMIs.
	 *
	 * If the first NMI handles both, the latter will be empty and daze
	 * the CPU.
	 */
	x86_pmu.handle_irq(regs);

	return NOTIFY_STOP;
}

Thanks,
Lin Ming



^ permalink raw reply	[flat|nested] 133+ messages in thread
* Re: [PATCH -v3] perf, x86: try to handle unknown nmis with running perfctrs
@ 2010-08-20 15:05 Don Zickus
  2010-08-20 15:25 ` Ingo Molnar
  2010-08-20 23:31 ` Don Zickus
  0 siblings, 2 replies; 133+ messages in thread
From: Don Zickus @ 2010-08-20 15:05 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Peter Zijlstra, Robert Richter, Cyrill Gorcunov, Lin Ming,
	fweisbec, linux-kernel, Huang, Ying, Yinghai Lu, Andi Kleen

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 537 bytes --]

I'll test tip later today to see if I can reproduce it.

Cheers,
Don

Ingo Molnar <mingo@elte.hu> wrote:

>
>it's not working so well, i'm getting:
>
> Uhhuh. NMI received for unknown reason 00 on CPU 9.
> Do you have a strange power saving mode enabled?
> Dazed and confused, but trying to continue
>
>on a nehalem box, after a perf top and perf stat run.
>
>Thanks,
>
>	Ingo
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 133+ messages in thread

end of thread, other threads:[~2010-08-27 19:35 UTC | newest]

Thread overview: 133+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-04  9:21 A question of perf NMI handler Lin Ming
2010-08-04  9:50 ` Peter Zijlstra
2010-08-04 10:01 ` Robert Richter
2010-08-04 10:24   ` Peter Zijlstra
2010-08-04 10:29     ` Robert Richter
2010-08-04 14:00   ` Don Zickus
2010-08-04 14:11     ` Peter Zijlstra
2010-08-04 14:52       ` Don Zickus
2010-08-04 15:02         ` Peter Zijlstra
2010-08-04 15:18           ` Cyrill Gorcunov
2010-08-04 15:50             ` Don Zickus
2010-08-04 16:10               ` Cyrill Gorcunov
2010-08-04 16:20                 ` Don Zickus
2010-08-04 16:39                   ` Cyrill Gorcunov
2010-08-04 18:48                     ` Robert Richter
2010-08-04 19:22                       ` Andi Kleen
2010-08-04 19:26                       ` Cyrill Gorcunov
2010-08-06  6:52                         ` Robert Richter
2010-08-06 14:21                           ` Don Zickus
2010-08-09 19:48                             ` [PATCH] perf, x86: try to handle unknown nmis with running perfctrs Robert Richter
2010-08-09 20:02                               ` Cyrill Gorcunov
2010-08-10  7:42                                 ` Robert Richter
2010-08-10 16:16                                   ` Cyrill Gorcunov
2010-08-10 16:41                                     ` Robert Richter
2010-08-10 17:24                                       ` Cyrill Gorcunov
2010-08-10 19:05                                         ` Robert Richter
2010-08-10 19:24                                           ` Cyrill Gorcunov
2010-08-12 13:24                                             ` Robert Richter
2010-08-12 14:31                                               ` Cyrill Gorcunov
2010-08-10 20:48                               ` Don Zickus
2010-08-11  2:44                                 ` Frederic Weisbecker
2010-08-11 11:10                                   ` Robert Richter
2010-08-11 12:44                                     ` Don Zickus
2010-08-11 14:03                                       ` Robert Richter
2010-08-11 14:32                                         ` Don Zickus
2010-08-13  4:37                                     ` Frederic Weisbecker
2010-08-13  8:22                                       ` Robert Richter
2010-08-14  1:28                                         ` Frederic Weisbecker
2010-08-14  2:29                                           ` Robert Richter
2010-08-11 12:39                                   ` Don Zickus
2010-08-11  3:19                                 ` Huang Ying
2010-08-11 12:36                                   ` Don Zickus
2010-08-16 14:37                                     ` Peter Zijlstra
2010-08-11 22:00                               ` [PATCH -v2] " Robert Richter
2010-08-12 13:10                                 ` Robert Richter
2010-08-12 18:21                                   ` Don Zickus
2010-08-16  7:37                                     ` Robert Richter
2010-08-12 13:52                                 ` Don Zickus
2010-08-13  4:25                                 ` Frederic Weisbecker
2010-08-16 14:48                                 ` Peter Zijlstra
2010-08-16 16:27                                   ` Cyrill Gorcunov
2010-08-16 17:16                                     ` Robert Richter
2010-08-16 19:06                                       ` Cyrill Gorcunov
2010-08-16 19:13                                         ` Peter Zijlstra
2010-08-16 19:18                                           ` Cyrill Gorcunov
2010-08-16 22:55                                         ` Robert Richter
2010-08-17 15:23                                           ` Cyrill Gorcunov
2010-08-17 15:22                               ` [PATCH -v3] " Robert Richter
2010-08-17 16:17                                 ` Cyrill Gorcunov
2010-08-19 10:45                                 ` Peter Zijlstra
2010-08-19 12:39                                   ` Robert Richter
2010-08-19 14:12                                   ` Don Zickus
2010-08-19 14:27                                     ` Peter Zijlstra
2010-08-19 15:20                                       ` Don Zickus
2010-08-19 17:43                                       ` Cyrill Gorcunov
2010-08-19 17:53                                         ` Peter Zijlstra
2010-08-19 21:58                                       ` Don Zickus
2010-08-20  8:50                                         ` Peter Zijlstra
2010-08-20  1:50                                       ` Don Zickus
2010-08-20  8:16                                         ` Ingo Molnar
2010-08-20 10:04                                           ` Peter Zijlstra
2010-08-20 10:30                                             ` Cyrill Gorcunov
2010-08-20 12:39                                             ` Don Zickus
2010-08-20 13:27                                               ` Ingo Molnar
2010-08-20 13:51                                                 ` Don Zickus
2010-08-20 14:17                                                   ` Ingo Molnar
2010-08-20 20:45                                                     ` Cyrill Gorcunov
2010-08-24 21:48                                                     ` Don Zickus
2010-08-20  8:36                                         ` Robert Richter
2010-08-20 14:17                                       ` [tip:perf/urgent] perf, x86: Fix handle_irq return values tip-bot for Peter Zijlstra
2010-08-20 14:17                                 ` [tip:perf/urgent] perf, x86: Try to handle unknown nmis with an enabled PMU tip-bot for Robert Richter
2010-08-06 15:35                   ` A question of perf NMI handler Andi Kleen
2010-08-04 15:45           ` Don Zickus
2010-08-06 15:37           ` Andi Kleen
2010-08-04 13:54 ` Don Zickus
2010-08-20 15:05 [PATCH -v3] perf, x86: try to handle unknown nmis with running perfctrs Don Zickus
2010-08-20 15:25 ` Ingo Molnar
2010-08-23  8:53   ` Ingo Molnar
2010-08-24 16:22     ` Cyrill Gorcunov
2010-08-24 17:09       ` Robert Richter
2010-08-24 17:20         ` Cyrill Gorcunov
2010-08-24 17:21           ` Cyrill Gorcunov
2010-08-24 17:15     ` Robert Richter
2010-08-24 17:28       ` Cyrill Gorcunov
2010-08-24 18:46         ` Don Zickus
2010-08-24 18:54           ` Cyrill Gorcunov
2010-08-24 19:52             ` Cyrill Gorcunov
2010-08-24 20:27               ` Don Zickus
2010-08-24 20:40                 ` Cyrill Gorcunov
2010-08-25 23:52                   ` Frederic Weisbecker
2010-08-26  9:11                     ` Cyrill Gorcunov
2010-08-25 10:20                 ` Robert Richter
2010-08-26 21:14     ` Don Zickus
2010-08-27  7:51       ` Robert Richter
2010-08-27 13:39         ` Don Zickus
2010-08-27  8:10       ` Robert Richter
2010-08-27 13:44         ` Don Zickus
2010-08-27 14:05           ` Robert Richter
2010-08-27 15:05             ` Don Zickus
2010-08-27 15:48               ` Robert Richter
2010-08-27 18:57         ` Don Zickus
2010-08-27 19:00           ` Yinghai Lu
2010-08-27 19:33           ` Robert Richter
2010-08-25  9:48   ` Robert Richter
2010-08-25 10:41     ` Ingo Molnar
2010-08-25 11:00       ` Ingo Molnar
2010-08-25 20:11         ` Don Zickus
2010-08-25 20:24           ` Cyrill Gorcunov
2010-08-25 21:20             ` Don Zickus
2010-08-25 21:36               ` Cyrill Gorcunov
2010-08-26  9:00           ` Robert Richter
2010-08-26  9:18             ` Cyrill Gorcunov
2010-08-26 14:31               ` Don Zickus
2010-08-26 15:22               ` Don Zickus
2010-08-26 15:34                 ` Cyrill Gorcunov
2010-08-26 16:40                   ` Don Zickus
2010-08-26 18:02                     ` Cyrill Gorcunov
2010-08-27  7:57                       ` Robert Richter
2010-08-27  8:11                         ` Peter Zijlstra
2010-08-27  8:31                           ` Robert Richter
2010-08-25 11:02       ` Robert Richter
2010-08-25 11:19         ` Ingo Molnar
2010-08-20 23:31 ` Don Zickus

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.