x86, hotplug: fix llc shared map unreleased during cpu hotplug
PATCH v4 1/1 x86, hotplug: fix llc shared map unreleased during cpu hotplug
BUG: unable to handle kernel NULL pointer dereference at 0000000000000004 IP: [..] find_busiest_group PGD 5a9d5067 PUD 13067 PMD 0 Oops: 0000 [#3] SMP [...] Call Trace:
load_balance
? _raw_spin_unlock_irqrestoreidle_balance__schedule
scheduleschedule_timeout
? lock_timer_baseschedule_timeout_uninterruptible
msleeplock_device_hotplug_sysfsonline_storedev_attr_storesysfs_write_filevfs_writeSyS_writesystem_call_fastpath
Last level cache shared map is built during cpu up and build sched domain routine takes advantage of it to setup sched domain cpu topology, however, llc shared map is unreleased during cpu disable which lead to invalid sched domain cpu topology. This patch fix it by release llc shared map correctly during cpu disable.
---
v1 -> v2:
* fix subject line
v2 -> v3:
* simplify backtrace
arch/x86/kernel/smpboot.c | 3 +++ 1 file changed, 3 insertions(+)
arch/x86/kernel/smpboot.c +3 -0
@@ -1292,6 +1292,9 @@ static void remove_siblinginfo(int cpu)for_each_cpu (sibling,cpu_sibling_mask (cpu))cpumask_clear_cpu (cpu,cpu_sibling_mask (sibling)); +for_each_cpu (sibling,cpu_llc_shared_mask (cpu)) +cpumask_clear_cpu (cpu,cpu_llc_shared_mask (sibling)); +cpumask_clear (cpu_llc_shared_mask (cpu));cpumask_clear (cpu_sibling_mask (cpu));cpumask_clear (cpu_core_mask (cpu)); c->phys_proc_id =0 ;
Signature · 1 line
1.9.1
Quoted 23 lines · Wanpeng Li
BUG: unable to handle kernel NULL pointer dereference at 0000000000000004 IP: [..] find_busiest_group PGD 5a9d5067 PUD 13067 PMD 0 Oops: 0000 [#3] SMP [...] Call Trace:
load_balance
?_raw_spin_unlock_irqrestoreidle_balance__schedule
scheduleschedule_timeout
?lock_timer_baseschedule_timeout_uninterruptible
msleeplock_device_hotplug_sysfsonline_storedev_attr_storesysfs_write_filevfs_writeSyS_writesystem_call_fastpath
Quoted 8 lines
Last level cache shared map is built during cpu up and build sched domain routine takes advantage of it to setup sched domain cpu topology, however, llc shared map is unreleased during cpu disable which lead to invalid sched domain cpu topology. This patch fix it by release llc shared map correctly during cpu disable.
Reviewed-by Yasuaki Ishimatsu <[email protected]>Signed-off-by Wanpeng Li <[email protected]>
The change looks good to me.
Thanks,
-Toshi
Ping
Quoted 54 lines · Wanpeng Li
BUG: unable to handle kernel NULL pointer dereference at 0000000000000004 IP: [..] find_busiest_group PGD 5a9d5067 PUD 13067 PMD 0 Oops: 0000 [#3] SMP [...] Call Trace:
load_balance
?_raw_spin_unlock_irqrestoreidle_balance__schedule
scheduleschedule_timeout
?lock_timer_baseschedule_timeout_uninterruptible
msleeplock_device_hotplug_sysfsonline_storedev_attr_storesysfs_write_filevfs_writeSyS_writesystem_call_fastpathLast level cache shared map is built during cpu up and build sched domain routine takes advantage of it to setup sched domain cpu topology, however, llc shared map is unreleased during cpu disable which lead to invalid sched domain cpu topology. This patch fix it by release llc shared map correctly during cpu disable.
Reviewed-by Yasuaki Ishimatsu <[email protected]>Signed-off-by Wanpeng Li <[email protected]>---
v1 -> v2:
* fix subject line
v2 -> v3:
* simplify backtracearch/x86/kernel/smpboot.c | 3 +++ 1 file changed, 3 insertions(+)arch/x86/kernel/smpboot.c +3
-0@@ -1292,6 +1292,9 @@ static void remove_siblinginfo(int cpu)for_each_cpu (sibling,cpu_sibling_mask (cpu))cpumask_clear_cpu (cpu,cpu_sibling_mask (sibling)); +for_each_cpu (sibling,cpu_llc_shared_mask (cpu)) +cpumask_clear_cpu (cpu,cpu_llc_shared_mask (sibling)); +cpumask_clear (cpu_llc_shared_mask (cpu));cpumask_clear (cpu_sibling_mask (cpu));cpumask_clear (cpu_core_mask (cpu)); c->phys_proc_id =0 ;
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Peter,
On Fri, Aug 08, 2014 at 04:40:57PM -0600, Linn Crosetto wrote:
[...]
Quoted 5 lines
Tested with a CPU hotplug stress test, run on a large system with 240 CPUs. Thanks.
Tested-by Linn Crosetto <[email protected]>
Is it ok for you to apply this patch or still need update?
Regards,
Wanpeng Li
Borislav Petkov
maintainerQuoted 1 line · Wanpeng Li
Is it ok for you to apply this patch or still need update?
Just be patient: we have the merge window still open and after that kernel summit coming up first.
Signature · 5 lines
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--Quoted 4 lines · Borislav Petkov
Quoted 1 line · Wanpeng Li
Is it ok for you to apply this patch or still need update?
Just be patient: we have the merge window still open and after that kernel summit coming up first.
Thanks for pointing out.
Regards,
Wanpeng Li
Quoted 1 line
Ping Ingo, Peter,
Quoted 13 lines · Wanpeng Li
Quoted 4 lines · Borislav Petkov
Quoted 1 line · Wanpeng Li
Is it ok for you to apply this patch or still need update?
Just be patient: we have the merge window still open and after that kernel summit coming up first.
Thanks for pointing out.
Regards,
Wanpeng LiQuoted 1 line
Quoted 23 lines · Wanpeng Li
BUG: unable to handle kernel NULL pointer dereference at 0000000000000004 IP: [..] find_busiest_group PGD 5a9d5067 PUD 13067 PMD 0 Oops: 0000 [#3] SMP [...] Call Trace:
load_balance
?_raw_spin_unlock_irqrestoreidle_balance__schedule
scheduleschedule_timeout
?lock_timer_baseschedule_timeout_uninterruptible
msleeplock_device_hotplug_sysfsonline_storedev_attr_storesysfs_write_filevfs_writeSyS_writesystem_call_fastpath
Quoted 5 lines
Last level cache shared map is built during cpu up and build sched domain routine takes advantage of it to setup sched domain cpu topology, however, llc shared map is unreleased during cpu disable which lead to invalid sched domain cpu topology. This patch fix it by release llc shared map correctly during cpu disable.
Very little is said in this changelog about how the bug was found, how likely it is to occur for others, what systems are affected, etc.
Thanks,
Ingo
Quoted 32 lines · Ingo Molnar
Quoted 23 lines · Wanpeng Li
BUG: unable to handle kernel NULL pointer dereference at 0000000000000004 IP: [..] find_busiest_group PGD 5a9d5067 PUD 13067 PMD 0 Oops: 0000 [#3] SMP [...] Call Trace:
load_balance
?_raw_spin_unlock_irqrestoreidle_balance__schedule
scheduleschedule_timeout
?lock_timer_baseschedule_timeout_uninterruptible
msleeplock_device_hotplug_sysfsonline_storedev_attr_storesysfs_write_filevfs_writeSyS_writesystem_call_fastpathQuoted 5 lines
Last level cache shared map is built during cpu up and build sched domain routine takes advantage of it to setup sched domain cpu topology, however, llc shared map is unreleased during cpu disable which lead to invalid sched domain cpu topology. This patch fix it by release llc shared map correctly during cpu disable.
Quoted 3 lines
Very little is said in this changelog about how the bug was found, how likely it is to occur for others, what systems are affected, etc.
Hi Wanpeng,
In my understanding, the panic occurs by just onlining CPU as follows:
echo 1 > /sys/devices/system/cpu/cpuX/online
So, how about add the information?
Thanks,
Yasuaki Ishimatsu
Quoted 5 lines
Thanks,
Ingo
Quoted 37 lines · Yasuaki Ishimatsu
Quoted 32 lines · Ingo Molnar
Quoted 23 lines · Wanpeng Li
BUG: unable to handle kernel NULL pointer dereference at 0000000000000004 IP: [..] find_busiest_group PGD 5a9d5067 PUD 13067 PMD 0 Oops: 0000 [#3] SMP [...] Call Trace:
load_balance
?_raw_spin_unlock_irqrestoreidle_balance__schedule
scheduleschedule_timeout
?lock_timer_baseschedule_timeout_uninterruptible
msleeplock_device_hotplug_sysfsonline_storedev_attr_storesysfs_write_filevfs_writeSyS_writesystem_call_fastpathQuoted 5 lines
Last level cache shared map is built during cpu up and build sched domain routine takes advantage of it to setup sched domain cpu topology, however, llc shared map is unreleased during cpu disable which lead to invalid sched domain cpu topology. This patch fix it by release llc shared map correctly during cpu disable.
Quoted 3 lines
Very little is said in this changelog about how the bug was found, how likely it is to occur for others, what systems are affected, etc.
Quoted 8 lines
Hi Wanpeng,
In my understanding, the panic occurs by just onlining CPU as follows:
echo 1 >/sys/devices/system/cpu/cpuX/onlineSo, how about add the information?
From what I remember you need a special kind of hardware too, one that
doesn't preserve cpu numbers across hotplug. Most systems do; just not this magic special one.
We want to fix that, but the only reason for this patch is consistency with the rest of the code, we do indeed clear and set these bits in all other masks, but not this one.
But yes, the Changelog needs help.
Quoted 33 lines · Yasuaki Ishimatsu
Quoted 32 lines · Ingo Molnar
Quoted 28 lines · Wanpeng Li
BUG: unable to handle kernel NULL pointer dereference at 0000000000000004 IP: [..] find_busiest_group PGD 5a9d5067 PUD 13067 PMD 0 Oops: 0000 [#3] SMP [...] Call Trace:
load_balance
?_raw_spin_unlock_irqrestoreidle_balance__schedule
scheduleschedule_timeout
?lock_timer_baseschedule_timeout_uninterruptible
msleeplock_device_hotplug_sysfsonline_storedev_attr_storesysfs_write_filevfs_writeSyS_writesystem_call_fastpathLast level cache shared map is built during cpu up and build sched domain routine takes advantage of it to setup sched domain cpu topology, however, llc shared map is unreleased during cpu disable which lead to invalid sched domain cpu topology. This patch fix it by release llc shared map correctly during cpu disable.
Quoted 5 lines
Quoted 3 lines
Very little is said in this changelog about how the bug was found, how likely it is to occur for others, what systems are affected, etc.
Hi Wanpeng,
Hi Yasuaki,
Quoted 4 lines
In my understanding, the panic occurs by just onlining CPU as follows:
echo 1 >/sys/devices/system/cpu/cpuX/online
See my reply to Ingo.
Regards,
Wanpeng Li
Quoted 12 lines
So, how about add the information?
Thanks,
Yasuaki IshimatsuQuoted 5 lines
Thanks,
Ingo
Quoted 32 lines · Ingo Molnar
Quoted 23 lines · Wanpeng Li
BUG: unable to handle kernel NULL pointer dereference at 0000000000000004 IP: [..] find_busiest_group PGD 5a9d5067 PUD 13067 PMD 0 Oops: 0000 [#3] SMP [...] Call Trace:
load_balance
?_raw_spin_unlock_irqrestoreidle_balance__schedule
scheduleschedule_timeout
?lock_timer_baseschedule_timeout_uninterruptible
msleeplock_device_hotplug_sysfsonline_storedev_attr_storesysfs_write_filevfs_writeSyS_writesystem_call_fastpathQuoted 5 lines
Last level cache shared map is built during cpu up and build sched domain routine takes advantage of it to setup sched domain cpu topology, however, llc shared map is unreleased during cpu disable which lead to invalid sched domain cpu topology. This patch fix it by release llc shared map correctly during cpu disable.
Quoted 3 lines
Very little is said in this changelog about how the bug was found, how likely it is to occur for others, what systems are affected, etc.
This bug can be triggered by hot add and remove large number of xen domain0's vcpus repeated.
Regards,
Wanpeng Li
Quoted 4 lines
Thanks,
Ingo
Hi Ingo,
Quoted 33 lines · Wanpeng Li
Quoted 32 lines · Ingo Molnar
Quoted 28 lines · Wanpeng Li
BUG: unable to handle kernel NULL pointer dereference at 0000000000000004 IP: [..] find_busiest_group PGD 5a9d5067 PUD 13067 PMD 0 Oops: 0000 [#3] SMP [...] Call Trace:
load_balance
?_raw_spin_unlock_irqrestoreidle_balance__schedule
scheduleschedule_timeout
?lock_timer_baseschedule_timeout_uninterruptible
msleeplock_device_hotplug_sysfsonline_storedev_attr_storesysfs_write_filevfs_writeSyS_writesystem_call_fastpathLast level cache shared map is built during cpu up and build sched domain routine takes advantage of it to setup sched domain cpu topology, however, llc shared map is unreleased during cpu disable which lead to invalid sched domain cpu topology. This patch fix it by release llc shared map correctly during cpu disable.
Quoted 7 lines
Quoted 3 lines
Very little is said in this changelog about how the bug was found, how likely it is to occur for others, what systems are affected, etc.
This bug can be triggered by hot add and remove large number of xen domain0's vcpus repeated.
If I need to send a new version of the patch or you can pick the patch w/ the updated changelog for me? ;-)
Regards,
Wanpeng Li
Quoted 7 lines
Regards,
Wanpeng LiQuoted 4 lines
Thanks,
Ingo
Ping Ingo, HPA, PeterZ
Quoted 56 lines · Wanpeng Li
Hi Ingo,
Quoted 31 lines · Wanpeng Li
Quoted 30 lines · Ingo Molnar
Quoted 28 lines · Wanpeng Li
BUG: unable to handle kernel NULL pointer dereference at 0000000000000004 IP: [..] find_busiest_group PGD 5a9d5067 PUD 13067 PMD 0 Oops: 0000 [#3] SMP [...] Call Trace:
load_balance
?_raw_spin_unlock_irqrestoreidle_balance__schedule
scheduleschedule_timeout
?lock_timer_baseschedule_timeout_uninterruptible
msleeplock_device_hotplug_sysfsonline_storedev_attr_storesysfs_write_filevfs_writeSyS_writesystem_call_fastpathLast level cache shared map is built during cpu up and build sched domain routine takes advantage of it to setup sched domain cpu topology, however, llc shared map is unreleased during cpu disable which lead to invalid sched domain cpu topology. This patch fix it by release llc shared map correctly during cpu disable.
Quoted 6 lines
Quoted 3 lines
Very little is said in this changelog about how the bug was found, how likely it is to occur for others, what systems are affected, etc.
This bug can be triggered by hot add and remove large number of xen domain0's vcpus repeated.
If I need to send a new version of the patch or you can pick the patch w/ the updated changelog for me? ;-)
Regards,
Wanpeng LiQuoted 6 lines
Regards,
Wanpeng LiQuoted 3 lines
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 39 lines · Wanpeng Li
Hi Ingo,
Quoted 37 lines · Wanpeng Li
Quoted 35 lines · Ingo Molnar
Quoted 23 lines · Wanpeng Li
BUG: unable to handle kernel NULL pointer dereference at 0000000000000004 IP: [..] find_busiest_group PGD 5a9d5067 PUD 13067 PMD 0 Oops: 0000 [#3] SMP [...] Call Trace:
load_balance
?_raw_spin_unlock_irqrestoreidle_balance__schedule
scheduleschedule_timeout
?lock_timer_baseschedule_timeout_uninterruptible
msleeplock_device_hotplug_sysfsonline_storedev_attr_storesysfs_write_filevfs_writeSyS_writesystem_call_fastpathQuoted 5 lines
Last level cache shared map is built during cpu up and build sched domain routine takes advantage of it to setup sched domain cpu topology, however, llc shared map is unreleased during cpu disable which lead to invalid sched domain cpu topology. This patch fix it by release llc shared map correctly during cpu disable.
Very little is said in this changelog about how the bug was found, how likely it is to occur for others, what systems are affected, etc.
Quoted 6 lines
Quoted 3 lines
This bug can be triggered by hot add and remove large number of xen domain0's vcpus repeated.
If I need to send a new version of the patch or you can pick the patch w/ the updated changelog for me? ;-)
Please send a fresh new version, maintainers trying to splice & dice patches and changelogs is an unrobust approach prone to mistakes.
Thanks,
Ingo
Quoted 38 lines · Ingo Molnar
Quoted 36 lines · Wanpeng Li
Hi Ingo,
Quoted 34 lines · Wanpeng Li
Quoted 33 lines · Ingo Molnar
Quoted 23 lines · Wanpeng Li
BUG: unable to handle kernel NULL pointer dereference at 0000000000000004 IP: [..] find_busiest_group PGD 5a9d5067 PUD 13067 PMD 0 Oops: 0000 [#3] SMP [...] Call Trace:
load_balance
?_raw_spin_unlock_irqrestoreidle_balance__schedule
scheduleschedule_timeout
?lock_timer_baseschedule_timeout_uninterruptible
msleeplock_device_hotplug_sysfsonline_storedev_attr_storesysfs_write_filevfs_writeSyS_writesystem_call_fastpathQuoted 5 lines
Last level cache shared map is built during cpu up and build sched domain routine takes advantage of it to setup sched domain cpu topology, however, llc shared map is unreleased during cpu disable which lead to invalid sched domain cpu topology. This patch fix it by release llc shared map correctly during cpu disable.
Very little is said in this changelog about how the bug was found, how likely it is to occur for others, what systems are affected, etc.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
This bug can be triggered by hot add and remove large number of xen domain0's vcpus repeated.
If I need to send a new version of the patch or you can pick the patch w/ the updated changelog for me? ;-)
Please send a fresh new version, maintainers trying to splice & dice patches and changelogs is an unrobust approach prone to mistakes.
Ok, I will send out a new version tomorrow. ;-)
Regards,
Wanpeng Li
Quoted 9 lines
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/