[lkml]   [2010]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectA question of perf NMI handler
    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:

    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.

    return NOTIFY_STOP;

    Lin Ming

     \ /
      Last update: 2010-08-04 11:23    [W:0.024 / U:4.464 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site