Re: [PATCH 1/1] x86: fix text_poke

From: Linus Torvalds
Date: Fri Apr 25 2008 - 12:25:57 EST




On Fri, 25 Apr 2008, Andi Kleen wrote:
>
> Not sure how the fixmap is better. It's pretty much equivalent, isn't it?
> Perhaps a little cheaper, but the code shouldn't be performance critical.

I have no really strong opinions. However, we do have a *lot* of lock
prefixes in the kernel, and fixmaps are a lot cheaper than vmap(). It may
not be performance-critical, but for me the "locks" section for the kernel
is 0x8060 bytes long, which would seem to say that this is called four
thousand times for each suspend and resume.

With each invocation being thousands of instructions and a cross-CPU IPI
for the tlb flush, that kind of stuff adds up. We're likely talking real
fractions of a second, rather than milliseconds.

But no, I didn't time it or really think very deeply about it.

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/