lkml.org 
[lkml]   [2018]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC PATCH 04/16] x86/split_lock: Use non locked bit set instruction in set_cpu_cap
    On Thu, Jun 21, 2018 at 09:55:40PM +0200, Peter Zijlstra wrote:
    > On Sun, May 27, 2018 at 08:45:53AM -0700, Fenghua Yu wrote:
    > > set_bit() called by set_cpu_cap() is a locked bit set instruction for
    > > atomic operation.
    > >
    > > Since the c->x86_capability can span two cache lines depending on kernel
    > > configuration and building evnironment, the locked bit set instruction may
    > > cause #AC exception when #AC exception for split lock is enabled.
    >
    > That doesn't make sense. Sure the bitmap may be longer, but depending on
    > if the argument is an immediate or not we either use a byte instruction
    > (which can never cross a cacheline boundary) or a 'word' aligned BTS.
    > And the bitmap really _should_ be 'unsigned long' aligned.
    >
    > If it is not aligned, fix that too.
    >
    > /me looks at cpuinfo_x86 and finds x86_capability is in fact a __u32
    > array.. see that's broken and needs fixing first.

    Do you mean x86_capability's type should be changed from __u32 to unsigned
    long?

    Changing x86_capability's type won't directly fix the split lock in
    set_cpu_cap(), right? BTS still may access x86_capability across cache
    line no matter x86_capability's type.

    Thanks.

    -Fenghua

    \
     
     \ /
      Last update: 2018-06-28 01:36    [W:2.877 / U:0.264 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site