Re: [PATCH] configurable LOG_BUF_SIZE

Tomas Szepe (szepe@pinerecords.com)
Mon, 6 Jan 2003 22:26:08 +0100


> [rddunlap@osdl.org]

> | |---------------------------------------------------------------------------
> | | I'd probably be happier if the current one didn't even _ask_ the user (or|
> | | only asked the user if kernel debugging is enabled), and just silently |
> | | defaulted to the normal values. |
> | |---------------------------------------------------------------------------
>
> Hm. Roman, Tomas, Sam-
>
> Do any of you know how to write a kconfig item like Linus described
> above (in the box)?
>
> It's simple enough to have a config option that isn't available if
> DEBUG_KERNEL is false, but how do I make default values for it
> when it's false?
> The config option must still exist in this case, but not be presented
> to the user as a choice.
>
> [snip]
>
> +config LOG_BUF_SHIFT
> + int "Kernel log buffer size"
> + depends on DEBUG_KERNEL
> + default 17 if ARCH_S390
> + default 16 if X86_NUMAQ || IA64
> + default 15 if SMP
> + default 14
> + help
> + Select kernel log buffer size as a power of 2.
> + Defaults and Examples:
> + 17 (=> 128 KB for S/390)
> + 16 (=> 64 KB for x86 NUMAQ or IA-64)
> + 15 (=> 32 KB for SMP)
> + 14 (=> 16 KB for uniprocessor)
> + 13 (=> 8 KB)
> + 12 (=> 4 KB)
> +
> +config LOG_BUF_SHIFT
> + int
> + depends on !DEBUG_KERNEL
> + default 17 if ARCH_S390
> + default 16 if X86_NUMAQ || IA64
> + default 15 if SMP
> + default 14
> +

Randy,

this looks correct to me. Maybe using if/endif instead of the two
'depends on' would make the entry more explicit to the eye of a future
beholder.

-- 
Tomas Szepe <szepe@pinerecords.com>
-
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/