Hi Roman,
I've noticed an oddity with CONFIG_HOTPLUG_CPU in 2.6.23-rc:
make oldconfig seems to turn it on even when nothing wants it,
increasing kernel size by about 10k; but if you then edit the
line out of .config and make oldconfig again, it correctly
offers the choice and lets it be turned off after all.(I've not actually tried make anything_else_config.)
Attached is a 2.6.23-rc1 i386 SMP .config, CONFIG_HOTPLUG_CPU
not set, with which it should be easy to reproduce the issue: just
make oldconfig in an -rc2 or current kernel tree (being sure to
choose N for SUSPEND and HIBERNATION: those rightly select it).I did try to work it out for myself, but didn't get very far:
suspect you'll get there much quicker!Thanks,
Hugh
I tried to reproduce this with no luck:
$ mv hugh .config
$ make
scripts/kconfig/conf -s arch/i386/Kconfig
*
* Restart config...
*
*
* Power management options (ACPI, APM)
*
Power Management support (PM) [Y/n/?] y
Legacy Power Management API (DEPRECATED) (PM_LEGACY) [N/y/?] n
Power Management Debug Support (PM_DEBUG) [N/y/?] n
Suspend to RAM and standby (SUSPEND) [Y/n/?] (NEW) n <= I selected 'n'
Hibernation (aka 'suspend to disk') (HIBERNATION) [N/y/?] (NEW) n <= I selected 'n'
*
* Fusion MPT device support
*
Fusion MPT ScsiHost drivers for SPI (FUSION_SPI) [Y/n/m/?] y
Fusion MPT ScsiHost drivers for FC (FUSION_FC) [N/m/y/?] n
Fusion MPT ScsiHost drivers for SAS (FUSION_SAS) [N/m/y/?] n
Maximum number of scatter gather entries (16 - 128) (FUSION_MAX_SGE) [128] 128
Fusion MPT misc device (ioctl) driver (FUSION_CTL) [N/m/y/?] n
Fusion MPT logging facility (FUSION_LOGGING) [N/y/?] (NEW)
#
# configuration written to .config
#
CHK include/linux/version.h
CHK include/linux/utsrelease.h
make: *** [_all] Interrupt$ grep HOTPLUG_CPU .config
# CONFIG_HOTPLUG_CPU is not setIf you let kbuild do a silentoldconfig then I expect
it to be set due to SUSPEND being set.If you can still reproduce it could you then explan the
exect stepts to do so.PS. I used latest -linus as of yesterday.
Sam
-
Interesting, thanks a lot for trying. Doing it your way (saying
"make" without a preparatory "make oldconfig") gives me the same
result as you, CONFIG_HOTPLUG_CPU is not set. But doing it my way
("make oldconfig" as I indicated) gives me CONFIG_HOTPLUG_CPU=y as
before - please try an explicit "make oldconfig" and I expect
you'll find the same.Hugh
-
I have tried to track down what is happening here.
The culprint is:config SUSPEND_SMP
bool
depends on SUSPEND_SMP_POSSIBLE && PM_SLEEP
select HOTPLUG_CPU
default yIt seems that due to the fact that SUSPEND_SMP is default y
then kconfig enforce the "select HOTPLUG_CPU".And this happens despite the fact that PM_SLEEP is 'n'
(but SUSPEND_SMP_POSSIBLE is 'y').It is somewhere in sym_calc_value() or one of the childs that
suddenly causes the change.
But I find it hard to follow this part of the logic in kconfig.Roman - can you help here with what is going on?
Sam
-
Hi,
It's somewhat a side effect of using select and defaults, the order of the
config symbols becomes significant for oldconfig, if you look at the
output you'll find:Support for suspend on SMP and hot-pluggable CPUs (EXPERIMENTAL) (HOTPLUG_CPU) [Y/?] y
this sets it to 'y'. In this case one isn't asked about it, because there
is only one choice. The patch below avoids the setting of the value here.bye, Roman
Avoid setting the value if the symbol doesn't need to be changed or can't
be changed. Later choices may change the dependencies and thus the
possible input range.Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
---
scripts/kconfig/conf.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)Index: linux-2.6/scripts/kconfig/conf.c
===================================================================
--- linux-2.6.orig/scripts/kconfig/conf.c
+++ linux-2.6/scripts/kconfig/conf.c
@@ -72,7 +72,7 @@ static void check_stdin(void)
}
}-static void conf_askvalue(struct symbol *sym, const char *def)
+static int conf_askvalue(struct symbol *sym, const char *def)
{
enum symbol_type type = sym_get_type(sym);
tristate val;
@@ -87,7 +87,7 @@ static void conf_askvalue(struct symbol
printf("%s\n", def);
line[0] = '\n';
line[1] = 0;
- return;
+ return 0;
}switch (input_mode) {
@@ -97,23 +97,23 @@ static void conf_askvalue(struct symbol
case set_random:
if (sym_has_value(sym)) {
printf("%s\n", def);
- return;
+ return 0;
}
break;
case ask_new:
case ask_silent:
if (sym_has_value(sym)) {
printf("%s\n", def);
- return;
+ return 0;
}
check_stdin();
case ask_all:
fflush(stdout);
fgets(line, 128, stdin);
- return;
+ return 1;
case set_default:
printf("%s\n", def);
- return;
+ return 1;
default:
break;
}
@@ -123,7 +123,7 @@ static void conf_askvalue(struct symbol
case S_HEX:
case S_STRING:
printf("%s\n", d...
Thanks for working that out: your patch certainly works for me,
and would be good to see in 2.6.23, to prevent lots of users getting
an unnecessary CONFIG_HOTPLUG_CPU forever after. I wonder what configBut please add a sentence to your patch description, something like:
make oldconfig from a 2.6.22 .config with CONFIG_HOTPLUG_CPU not set
was in some configurations setting CONFIG_HOTPLUG_CPU=y without asking,
even when there was no actual requirement for CONFIG_HOTPLUG_CPU.Thanks,
Hugh
-
Probably CONFIG_SUSPEND, which was a new option, defaulted to 'y' and selected
CONFIG_HOTPLUG_CPU indirectly, because CONFIG_SMP was set.Greetings,
Rafael
-
In fact no: although CONFIG_SUSPEND and CONFIG_HIBERNATION were certainly
involved in the logic which arrived at missetting CONFIG_HOTPLUG_CPU,
they were correctly prompted for themselves.Hugh
-
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Linus Torvalds | Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series.. |
| Paul Jackson | Re: cpuset-remove-sched-domain-hooks-from-cpusets |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Linus Torvalds | Re: [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | Re: [klibc] [patch] import socket defines |
