Re: [PATCH] workqueue: Fix alignment calculation in alloc_cwqs()

From: David Howells
Date: Mon Oct 25 2010 - 17:47:43 EST


Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> No it doesn't. Those bits really require that many bytes of alignment.
>
> Think about it: if the low 8 bits of the pointer are used for flags,
> then the actual pointer itself needs to be aligned to a 256-byte
> boundary.
>
> So the code is right. If needs to ask for "1 << WORK_STRUCT_FLAG_BITS"
> alignment, and if it doesn't get it (because the allocator is somehow
> broken - percpu allocator issues?), things will break.

That's a good point.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/