I assume you meant 256 bits not bytes, 256 bytes is larger than many
cache lines.
If the data is in task struct *and* you only update it in response to
requests from the current task then you do not need any locks, the fact
that you are running under the current task is enough. But if you want
to update audit flags in one task from another task's context or from
interrupt then you need a lock.
>Checking an extra
>byte would require two cache loads if auditing is turned on. Maybe it would
>be better just to reserve the sign bit of first audit mask as the on/off flag --
>if I can ensure the entire audit mask is in 1 32-byte cache line should minimize
>performance hit. Yes? I'm assuming the fastest portable way to check that 1 bit
>would be (val<0)
Use the test_bit macros, they already exist and are portable.
-
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/