Messages in this thread | | | Date | Tue, 22 Apr 2003 00:57:32 +0100 | From | Jamie Lokier <> | Subject | Re: [PATCH] Runtime memory barrier patching |
| |
Andi Kleen wrote: > > Such as removing the lock prefix when running non-SMP? ... > .altinstructions section after load to avoid too much kernel bloat (it > currently costs 7 byte + the length of the replacement. And lock > is quite common in the kernel these days.
1. It should cost at most 4 bytes, in a table of "remove me" address, with topmost bits of each word used to give the length of the instruction to remove - i.e. to replace with an optimal nop sequence.
2. Not just locks - a lot of spinlock code could be removed completely. I don't have an opinion on whether this is worth doing - one can simply run a UP kernel after all.
-- Jamie - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |