Re: [patch 2/3] ipc: use shifts to extract seq/idx

From: Manfred Spraul
Date: Thu May 20 2010 - 14:14:50 EST

On 05/20/2010 09:00 AM, Nick Piggin wrote:
All the ipc ids and sequences are signed integers, so power of 2
sequence multiplier does not work so well. Convert it to use shifts,
which improves generated code particularly in ipc_lock/ipc_lock_check
fast paths.

Have you checked the asm output?
I would expect that gcc auto-optimizes constant divides by power-of-two.

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