Re: [patch 12/17] Immediate Values - Kconfig menu in EMBEDDED

From: Rusty Russell
Date: Wed Apr 09 2008 - 23:25:06 EST


On Thursday 10 April 2008 01:08:41 Mathieu Desnoyers wrote:
> +config IMMEDIATE
> + default y if !DISABLE_IMMEDIATE

Wouldn't it be simlpler to roll DISABLE_IMMEDIATE into this?

ie.
default y
depends on HAVE_IMMEDIATE
bool "Immediate value optimization" if EMBEDDED
help
Immediate values are used as read-mostly variables that are rarely
updated. They use code patching to modify the values inscribed in the
instruction stream. It provides a way to save precious cache lines
that would otherwise have to be used by these variables.

It consumes slightly more memory and requires to modify the instruction
stream each time a variable is updated. Should really be disabled for
embedded systems with read-only text.

Cheers,
Rusty.
--
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/