lkml.org 
[lkml]   [2010]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [tip:x86/idle] x86, hotplug: Move WBINVD back outside the play_dead loop
    From
    On Mon, Sep 20, 2010 at 1:11 PM, H. Peter Anvin <hpa@zytor.com> wrote:
    > On 09/20/2010 11:20 AM, H. Peter Anvin wrote:
    >> On 09/17/2010 05:48 PM, Venkatesh Pallipadi wrote:
    >>>>
    >>>> +       wbinvd();
    >>>> +
    >>>>        while (1) {
    >>>> -               mb();
    >>>> -               wbinvd();
    >>>>                __monitor(&current_thread_info()->flags, 0, 0);
    >>>>                mb();
    >>>
    >>>
    >>> Just one observation. There are some CPUs with errata that need
    >>> clflush before monitor. So, if that CPU wakesup spuriously it may have
    >>> problem reentering idle. Not sure whether that will be a problem as
    >>> that errata also depended on read happening on the flag. May be its
    >>> better to do monitor (0, 0, 0).
    >>>
    >>
    >> It seems the easy way to deal with that would be to just add clflush
    >> before monitor... it is *probably* redundant, but it should be safe to
    >> do. It means depending on X86_FEATURE_CLFLUSH as well as
    >> X86_FEATURE_MWAIT, but I don't think there is any x86 processor which
    >> has MWAIT and not CLFLUSH, and I highly doubt there ever will be.
    >>
    >> Does anyone see any downside?
    >>
    >
    > Patch for review... anyone see any problem with it?
    >

    Looks good.

    We can also close one of the longest standing bugs in
    bugzilla.kernel.org now :-)
    https://bugzilla.kernel.org/show_bug.cgi?id=5471

    Acked-by: Venkatesh Pallipadi <venki@google.com>
    --
    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-09-21 00:41    [W:0.022 / U:29.784 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site