lkml.org 
[lkml]   [2010]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] workqueue: Fix alignment calculation in alloc_cwqs()
Date
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


\
 
 \ /
  Last update: 2010-10-25 23:49    [W:0.029 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site