LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-20-2018, 05:58 AM   #1
gnourt
LQ Newbie
 
Registered: Mar 2018
Posts: 13

Rep: Reputation: Disabled
Unable to shutdown CPU1


Hi all,
I am trying to offline cpu1 in kernel by command line.But the kernel always reboot as when I try to do it.
"
root@mx6q:~# uname -a
Linux mx6q 3.14.79-01359-g7adf8276561f #1 SMP PREEMPT Thu Mar 15 07:41:39 CET 2018 armv7l GNU/Linux
root@mx6q:~#
root@mx6q:~# cat /proc/cpuinfo | grep processor
processor : 0
processor : 1
root@mx6q:~#
root@mx6q:~# echo 0 > /sys/devices/system/cpu/cpu1/online
Write failed: Broken pipe
"
Please give me some point to understand why it fail in this case.
I can not find any where to configure make cpu1 always online.
Thanks for help in advance.
 
Old 03-21-2018, 05:15 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Have you 2 physical cpus or 1 multi core cpu ?

[edit]
Oh it's arm multicore? Maybe cores can not be put offline at runtime with arm
There is a kernel parameter: maxcpus=1
will limit the available cpu cores to 1

Last edited by keefaz; 03-21-2018 at 05:26 PM.
 
Old 03-22-2018, 04:58 AM   #3
gnourt
LQ Newbie
 
Registered: Mar 2018
Posts: 13

Original Poster
Rep: Reputation: Disabled
Thanks for your help !! keefaz

yub , it's arm multicore .
But i'm not clear why we can not be put offline at runtime with arm.
At previous kernel version. I still put offline cpu1 but in this kernel i can not put offline it.
I guess that have option to allow on/off cpu1 but i can not find it.is it maxcpus ?How can we show exactly value of maxcpus by command line?
 
Old 03-22-2018, 07:49 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
maxcpus is a kernel parameter, you use it as a kernel boot option in bootloader (grub, lilo etc...)
https://static.lwn.net/kerneldoc/cor...u_hotplug.html

Note that you should still be able to put the cpu1 online later at runtime
(echo 1 > /sys/devices/system/cpu/cpu1/online)

Now if putting cpu offline worked in previous version, I would try to find out if there is a configuration change between the 2 versions
 
Old 03-22-2018, 08:13 AM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
i wonder what the output of this would yield:
Code:
[schneidz@hyper womens-health-challenge]$ egrep "processor|flags|physical|core" /proc/cpuinfo 
processor	: 0
physical id	: 0
core id		: 0
cpu cores	: 2
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl cpuid aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm
address sizes	: 32 bits physical, 48 bits virtual
processor	: 1
physical id	: 0
core id		: 1
cpu cores	: 2
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl cpuid aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm
address sizes	: 32 bits physical, 48 bits virtual
processor	: 2
physical id	: 0
core id		: 0
cpu cores	: 2
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl cpuid aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm
address sizes	: 32 bits physical, 48 bits virtual
processor	: 3
physical id	: 0
core id		: 1
cpu cores	: 2
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl cpuid aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm
address sizes	: 32 bits physical, 48 bits virtual
 
Old 04-01-2018, 11:10 PM   #6
gnourt
LQ Newbie
 
Registered: Mar 2018
Posts: 13

Original Poster
Rep: Reputation: Disabled
Thanks you so much !
I'm not person who built kernel.so I don't know the changed between the 2 versions.
I'm trying to contact kernel team to give me the kernel's configuration.
We will continues discuss later.
 
Old 04-08-2018, 09:24 PM   #7
gnourt
LQ Newbie
 
Registered: Mar 2018
Posts: 13

Original Poster
Rep: Reputation: Disabled
Hi,
This issue happen because there are some changes in kernel source related to cpuhotplug.
Thanks for your support.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to shutdown/reboot server, no shutdown process running dctw Linux - Server 5 03-31-2010 05:46 AM
APIC error on CPU1: 00(40)?? knudsen83 Linux - Hardware 8 01-17-2008 06:43 PM
Anyone know why i get APIC error on CPU1? methodh2k Linux - General 5 10-13-2005 05:28 AM
get cpu0 and cpu1 to work like one ? Soulstealer Linux - Hardware 2 04-28-2005 08:55 AM
unable to 'shutdown' from x... need to shutdown using 'halt' guitarnix Linux - Newbie 5 11-24-2003 01:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration