lkml.org 
[lkml]   [2016]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of running thread
    Date
    On Monday 29 February 2016 12:41:49 Mathieu Desnoyers wrote:
    > ----- On Feb 29, 2016, at 5:39 AM, Arnd Bergmann arnd@arndb.de wrote:

    > > What's making things worse is that on some architectures, adding
    > > __packed will force access by bytes rather than just reading
    > > a 32-bit or 64-bit numbers directly, so it's slow and non-atomic.
    >
    > Agreed that many architectures issue slower instructions when reading
    > from packed structures, which is unwanted.
    >
    > Could we require that each field be naturally aligned and require that
    > they are placed so _no_ padding whatsoever should ever be added by the
    > compiler ? If that's possible, then we could remove the packed.

    Yes, I think that is a reasonable requirement.

    Arnd

    \
     
     \ /
      Last update: 2016-02-29 14:41    [W:8.597 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site