lkml.org 
[lkml]   [2010]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH] fix BUG using smp_processor_id() in touch_nmi_watchdog and touch_softlockup_watchdog
    From
    On Tue, Aug 17, 2010 at 4:39 PM, Sergey Senozhatsky
    <sergey.senozhatsky@gmail.com> wrote:
    >> Why not use __raw_get_cpu_var() instead?
    >> You know adding preempt protection in touch_softlockup_watchdog()
    >> just suppress the warning. Am I missing something?
    >>
    >
    > Sorry, my low level understanding of the __raw_get_cpu_var isn't very strong.
    > I assume it uses current_thread_info()->cpu in some cases (right?) or
    > percpu_from_op.

    The difference is __raw_get_cpu_var() is using raw_smp_processor_id().

    >
    >
    > Should it be
    > acpi_os_stall
    >        preepmt_disable
    >        touch_nmi_watchdog
    >                touch_softlockup_watchdog
    >        preempt_enable

    Actually I don't think this is helpful for the whole function. Because
    if acpi_os_stall()
    migrate(I don't know if it could) to another CPU just before
    preepmt_disable(), we'll
    be on the wrong way. Adding preempt protection is just smoothing the warning.

    So I prefer using __raw_get_cpu_var() as what we have been done before.

    Thanks,
    Yong
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2010-08-17 11:07    [W:0.023 / U:0.548 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site