[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120118195340.767928915@goodmis.org>
Date: Wed, 18 Jan 2012 14:53:40 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: linux-kernel@...r.kernel.org
Cc: Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Frederic Weisbecker <fweisbec@...il.com>,
"H. Peter Anvin" <hpa@...or.com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Jason Baron <jbaron@...hat.com>
Subject: [PATCH 0/2] [RFC] jump-label/x86: Compress jmps to 2 bytes where possible
As discussed previously, it can save a lot of text space if we could
use the 2 byte jump for jump labels instead of always using the 5 byte
version. But to do this, the jmps must be put into the kernel first
(always on). Then at compile time, the jmps are examined and converted
to nops.
At boot up, the jump-labels are examined again and the nops are converted
to the CPU native best 5 byte nops for just the 5 byte nop locations.
The actual op is examined to determine if the jmp was 2 or 5 bytes, and
dealt with accordingly.
I forward ported old work I did before and cleaned it up a bit.
This can also be made to make a "default on" case at compile time if
necessary.
Thoughts?
-- Steve
Steven Rostedt (2):
jump labels: Add infrastructure to update jump labels at compile time
jump labels/x86: Use etiher 5 byte or 2 byte jumps
----
Makefile | 7 +
arch/Kconfig | 6 +
arch/x86/Kconfig | 1 +
arch/x86/include/asm/jump_label.h | 2 +-
arch/x86/kernel/jump_label.c | 86 +++++++++-
scripts/Makefile | 1 +
scripts/Makefile.build | 15 ++-
scripts/update_jump_label.c | 335 +++++++++++++++++++++++++++++++++++++
scripts/update_jump_label.h | 283 +++++++++++++++++++++++++++++++
9 files changed, 726 insertions(+), 10 deletions(-)
--
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