This patch aims to cache-colour both task_struct and kernel stack by developing a caching system, known as Cache colouring task_struct and kernel stack. The system ensures efficient memory management in software.
The patch introduces an extra structure for Task_Struct allocations along with a new init task structure. This enables access to other fields like task stack base, task stack top, and task_struct use count. The pointer to a task_struct is now a full_task_struct pointer, which allows access to these additional fields.
The stack to task_struct inverse lookup is done by storing the pointer of the stack's owner task_struct at the base of the stack. This is implemented in the alloc_task_struct function.
The initial stack frame pointer jittering is achieved by using three stack color bits. This creates eight colors for initial stack frame pointer jittering that is sufficient for most cache architectures. Care must be taken not to increase the STACK_COLOUR_BITS too much as it can lead to kernel stack overflows.
This software patch offers a significant performance boost for systems that utilize a lot of Task_Struct and Kernel Stack operations. The use of a slab allocator and initial stack pointer jittering can lead to a noticeable improvement in speed and responsiveness.
Version 2.5.0-0.5: N/A