Commit 978b7ac2 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] task_struct alignment fix

The recent slab alignment changes broke an unknown number of architectures
(parisc and x86_64 for sure) by causing task_structs to be insufficiently
aligned.

We need good alignemnt because architectures do things like dumping FP state
into the task_struct with instructions which require particular alignment (I
think).

So change the default alignment to L1_CACHE_BYTES, which is what we used to
have, via SLAB_HW_CACHE_ALIGN.
parent 5d3c500b
......@@ -211,7 +211,7 @@ void __init fork_init(unsigned long mempages)
{
#ifndef __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
#ifndef ARCH_MIN_TASKALIGN
#define ARCH_MIN_TASKALIGN 0
#define ARCH_MIN_TASKALIGN L1_CACHE_BYTES
#endif
/* create a slab on which task_structs can be allocated */
task_struct_cachep =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment