lkml.org 
[lkml]   [2010]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [BUG] percpu misaligned allocation
    From
    From: Tejun Heo <tj@kernel.org>
    Date: Thu, 18 Mar 2010 18:30:34 +0900

    >
    > if (!total_profile_count) {
    > - buf = (char *)alloc_percpu(perf_trace_t);
    > + buf = (char *)__alloc_percpu(sizeof(perf_trace_t),
    > + __alignof__(unsigned long));
    > if (!buf)
    > goto fail_buf;

    Why not make perf_trace_t have the proper alignment?

    That's better than patching around it like this.

    Defining it as an array of char[]'s is just asking
    for lots of trouble.


    \
     
     \ /
      Last update: 2010-03-19 01:57    [W:0.021 / U:1.480 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site