[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C29A33D.2060407@kernel.org>
Date: Tue, 29 Jun 2010 09:39:41 +0200
From: Tejun Heo <tj@...nel.org>
To: Frederic Weisbecker <fweisbec@...il.com>
CC: torvalds@...ux-foundation.org, mingo@...e.hu,
linux-kernel@...r.kernel.org, jeff@...zik.org,
akpm@...ux-foundation.org, rusty@...tcorp.com.au,
cl@...ux-foundation.org, dhowells@...hat.com,
arjan@...ux.intel.com, oleg@...hat.com, axboe@...nel.dk,
dwalker@...eaurora.org, stefanr@...6.in-berlin.de,
florian@...kler.org, andi@...stfloor.org, mst@...hat.com,
randy.dunlap@...cle.com
Subject: Re: [PATCH 12/35] workqueue: update cwq alignement
Hello,
On 06/29/2010 12:47 AM, Frederic Weisbecker wrote:
>> void __init init_workqueues(void)
>> {
>> + /*
>> + * cwqs are forced aligned according to WORK_STRUCT_FLAG_BITS.
>> + * Make sure that the alignment isn't lower than that of
>> + * unsigned long long.
>> + */
>> + BUILD_BUG_ON(__alignof__(struct cpu_workqueue_struct) <
>> + __alignof__(unsigned long long));
>> +
>
> But they are not allocated contiguously as we use the per cpu offsets.
> So why does the struct itself need to be aligned? Only the base pointer
> of its dynamic allocation needs to be aligned. Or am I missing something?
work->data doesn't store the percpu pointer but the address of cwq of
that specific cpu as returned by per_cpu_ptr(), so each element needs
to be aligned. Besides, if the percpu ptr is aligned the elements are
aligned so they aren't different things.
> This is crashing my build in x86-32, unless I force an alignment to 8, or
> I just remove this build check.
Heh, how did that happen? I'll investigate. Can you please attach
your .config?
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists