Check out the new USENIX Web site. next up previous
Next: 3.2 Our implementation for Up: 3 Our solution - Previous: 3 Our solution -

3.1 Implementation issue for coloring

In general, cache coloring [3,4] is used to address the cache line conflict problem. We expect that the method is able to reduce the cache misses during run queue traversal.

Figure 4: modified get_current()

However, cache coloring for the task structure in the Linux kernel seems difficult to implement, because the Linux kernel coding assumes it to be placed on a specific boundary. For example, a procedure to acquire a variable X in a task structure is as follows:

  1. Calling get_current() (Figure 4 (a)), the function returns the logical-and value of %esp (current stack pointer) and 0xffffe000. This is the 8KB boundary of the %esp towards to the address 0.
  2. Adding the offset of the requested variable X to the above value.
  3. Accessing the process specific variable X using the address.

The kernel stack and task structure share an 8KB allocation of memory aligned on an 8KB boundary. The function get_current() assumes that the task structure is always at offset 0 within this block. It zeroes out the low-order bits of the stack pointer to produce a pointer to the task structure.

Because of this implementation, a task structure cannot be shifted freely and the task structure coloring has not been implemented yet.


next up previous
Next: 3.2 Our implementation for Up: 3 Our solution - Previous: 3 Our solution -
Shuji YAMAMURA 2002-04-16