Re: [PATCH 3/4] x86_64 ia32 syscall audit fast-path

From: Linus Torvalds
Date: Mon Jul 07 2008 - 20:38:49 EST




On Mon, 7 Jul 2008, Roland McGrath wrote:
>
> Is bt slower than testl?

On many microarchitectures, yes. Especially for a memory operand.

That said, depending on the size of the constant, 'bt' may be _smaller_
than testl (8-bit constant vs 32-bit one). Which can make up for it.

> (I used bt there because I saw it used in entry_64.S for all cases
> of testing for only one bit at a time.

I haven't checked recent CPU's, it may not matter much on ones that
support 64-bit. But bt with a memop was traditionally quite a bit more
expensive than 'test'.

I too am too lazy to check. Once it's in the slow-path, it doesn't much
matter. We're talking a few cycles here.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/