Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH] workqueue: Fix alignment calculation in alloc_cwqs() | Date | Mon, 25 Oct 2010 22:46:53 +0100 |
| |
Linus Torvalds <torvalds@linux-foundation.org> 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
| |