[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4BF57C78.4040606@colorfullife.com>
Date: Thu, 20 May 2010 20:16:24 +0200
From: Manfred Spraul <manfred@...orfullife.com>
To: Nick Piggin <npiggin@...e.de>
CC: linux-kernel@...r.kernel.org
Subject: Re: [patch 2/3] ipc: use shifts to extract seq/idx
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.
--
Manfred
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists