lkml.org 
[lkml]   [2009]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/10] percpu: kill percpu_alloc() and friends
Tony Luck wrote:
> On Wed, Feb 18, 2009 at 5:04 AM, Tejun Heo <tj@kernel.org> wrote:
>> +static inline void *__alloc_percpu(size_t size, size_t align)
>> {
>> + /*
>> + * Can't easily make larger alignment work with kmalloc. WARN
>> + * on it. Larger alignment should only be used for module
>> + * percpu sections on SMP for which this path isn't used.
>> + */
>> + WARN_ON_ONCE(align > __alignof__(unsigned long long));
>> return kzalloc(size, gfp);
>> }
>
> This WARN_ON just pinged for me when I built & ran linux-next tag next-20090311
>
> Stack trace from the WARN_ON pointed to __create_workqueue_key() which
> does:
>
> wq->cpu_wq = alloc_percpu(struct cpu_workqueue_struct);
>
> and the cpu_workqueue_struct is defined as ____cacheline_aligned
>
> I hit this on ia64, but all this code looks generic.

Yeap, it's fixed now, but as Rusty pointed out, once move to dynamic
percpu allocator is complete, we wouldn't need cacheline alignment for
percpu data structures. It will only hurt performance by wasting
cachelines.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2009-03-12 03:09    [W:0.112 / U:2.796 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site