Or use macros to define per-cpu data, which is replicated to a sequence
of fixed address, separated by some power of two (e.g. 4k). That uses
less space for padding, lowers cache pressure, and it will work whatever
the cache line size. And you don't have to check anything.
You can't use the efficient x86 addressing modes with this (for
multiples of 1, 2, 4 or 8), but you can't do that anyway for structures
aligned to a multiple of 16 or 32 bytes.
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/