[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <524D7D81.9090903@asianux.com>
Date: Thu, 03 Oct 2013 22:21:53 +0800
From: Chen Gang <gang.chen@...anux.com>
To: Toshi Kani <toshi.kani@...com>
CC: Thomas Gleixner <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
the arch/x86 maintainers <x86@...nel.org>,
"Yu, Fenghua" <fenghua.yu@...el.com>,
"rafael.j.wysocki@...el.com" <rafael.j.wysocki@...el.com>,
"isimatu.yasuaki@...fujitsu.com" <isimatu.yasuaki@...fujitsu.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [Suggestion] about calling debug_hotplug_cpu() which enabled
by 'allmodconfig' for a x86_64 dual core laptop.
One root cause found (but not only one), allmodconfig will enable
CONFIG_SYSFS_DEPRECATED which for new kernel on old distribution.
I am comparing from allmodconfig config file to defconfig config file,
the attachments are middle files (one enable CONFIG_SYSFS_DEPRECATED
which can not boot up, the other disable it which can boot up).
The related information in "init/Kconfig"
config SYSFS_DEPRECATED
bool "Enable deprecated sysfs features to support old userspace tools"
depends on SYSFS
default n
help
This option adds code that switches the layout of the "block" class
devices, to not show up in /sys/class/block/, but only in
/sys/block/.
This switch is only active when the sysfs.deprecated=1 boot option is
passed or the SYSFS_DEPRECATED_V2 option is set.
This option allows new kernels to run on old distributions and tools,
which might get confused by /sys/class/block/. Since 2007/2008 all
major distributions and tools handle this just fine.
Recent distributions and userspace tools after 2009/2010 depend on
the existence of /sys/class/block/, and will not work with this
option enabled.
Only if you are using a new kernel on an old distribution, you might
need to say Y here.
I will continue to analyze another related issues for allmodconfig on
my laptop (after disable SYSFS_DEPRECATED, for allmodconfig, it still
can not boot up successfully, although my 'middle' config file can).
BTW: for defconfig on my PC (x86_64 dual core, fedora 17), need enable
"Device Drivers" -> "Generic Driver Options" -> "Maintain a devtmpfs
...", or can not start up. is it suitable to send related patch for it?
Thanks.
On 10/03/2013 08:49 AM, Chen Gang wrote:
> On 10/03/2013 03:33 AM, Toshi Kani wrote:
>> On Thu, 2013-10-03 at 00:41 +0800, Chen Gang F T wrote:
>>> On 10/02/2013 11:28 PM, Toshi Kani wrote:
>>>> On Wed, 2013-10-02 at 03:10 +0000, Chen Gang wrote:
>>>>> Hello Maintainers:
>>>>>
>>>>> Under my x86_64 dual core laptop, I build kernel next-20130927 with
>>>>> 'allmodconfig', and install it, the machine can not start. Related
>>>>> information is:
>>>>>
>>>>> after call debug_hotplug_cpu(), output "cpu 0 is offline" .... and then "Failed to execute /init".
>>>>>
>>>>> After remove "_debug_hotplug_cpu(0, 0);", can pass the issue (but will
>>>>> fail in another place). I guess, the reason is my laptop cpu is not
>>>>> 'hotplug', but have to call debug_hotplug_cpu() with allmodconfig.
>>>>>
>>>>>
>>>>> I will continue analyzing, welcome any additional suggestions or
>>>>> completions.
>>>>
>>>> allmodconfig sets CONFIG_DEBUG_HOTPLUG_CPU0 to y (which is defined as
>>>> "def_bool n"), which puts CPU0 offline during boot for testing. This
>>>> debug feature is causing the problem on your laptop. I am not familiar
>>>> with allmodconfig, but it seems that it enables all the config options,
>>>> preferably with 'm'.
>>>>
>>>
>>> Hmm... excuse me, I don't know: for laptop, if cpu0 is offline, whether
>>> it still can work or not. If any members know about it, please tell me,
>>> thanks.
>>
>> CPU online/offline works on laptops as long as they have more than one
>> CPU. You can boot with other kernel and test this feature
>> with /sys/devices/system/cpu/cpuX/online on your laptop. cpu0 is a
>> special case and you may need to specify "cpu0_hotplug" boot option.
>>
>
> Thank you for your confirmation, "for dual core (although laptop), after
> system boot up, can let cpu0 offline". :-)
>
>>> In my opinion, if enable DEBUG_HOTPLUG_CPU0, but "should not let cpu0
>>> offline for laptop", we need let 'offline' operation fail.
>>
>> Whether it is a laptop or not should not be a matter here. But I agree
>> with you that enabling CONFIG_DEBUG_HOTPLUG_CPU0 is not useful (and can
>> be harmful) unless a user really intends to test this feature.
>>
>
> Hmm... I will continue analyzing. After finish analyzing (let kernel
> boot up OK), I should give a confirmation: "during boot up, can we still
> let cpu0 offline for dual core?".
>
> In fact, 'allmodconfig' is just a mad user which often does useless
> things to intend to find issues.
>
> Thanks.
>
>> Thanks,
>> -Toshi
>>
>>> And I am analyzing (just constructing environments: KVM, kgdb ...),
>>> before let kernel start successfully, only according to my current
>>> proofs, we can not say "let laptop cpu0 offline" must be an issue.
>>
>>
>>
>>
>>
>
>
--
Chen Gang
View attachment "config_554_ok" of type "text/plain" (98961 bytes)
View attachment "config_555_fail_dev" of type "text/plain" (98979 bytes)
Powered by blists - more mailing lists