[lkml]   [2001]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] task_struct + kernel stack colouring ...
Davide Libenzi wrote

>By adding three bits of colouring you're going to cut the collision of
>about 1/8.
No, Shuji is right:
You have just shifted the problem, without reducing collisions.
256 kB, 4 way cache with 32 byte linesize.

cacheline == bits 15..5
offset within cacheline: bits 4..0

The colouring must depend on more than just bits 13 to 15 - if these
bits are different, then the access goes into a different line even
without colouring, there won't be a collision.

Shuij, I don't understand why you need both a shift and a modulo:
address % odd_number should generate a random distribution (i.e. all
bits affect the result), even without the shift.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:18    [W:0.132 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site