lkml.org 
[lkml]   [2012]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC patch] spindep: add cross cache lines checking

* Arnd Bergmann <arnd@arndb.de> wrote:

> On Monday 05 March 2012, Alex Shi wrote:
> > Subject: [PATCH] lockdep: add cross cache lines checking
> >
> > Modern x86 CPU won't hold whole memory bus when executing
> > 'lock' prefixed instructions unless the instruction
> > destination is crossing 2 cache lines. If so, it is disaster
> > of system performance.
> >
> > Actually if the lock is not in the 'packed' structure, gcc
> > places it safely under x86 arch. But seems add this checking
> > in CONFIG_DEBUG_LOCK_ALLOC is harmless.
>
> Have you tried making this a compile-time check using
> __alignof__? I would say that any spinlock in a packed data
> structure is basically a bug, even more so on most other
> architectures besides x86.

agreed.

Thanks,

Ingo


\
 
 \ /
  Last update: 2012-03-05 11:45    [W:1.732 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site