Difference between revisions of "How to disable one CPU"

[quality revision] [quality revision]
m
m
 
Under construction.png Coming soon

1 How to see the number of active CPU[edit]


root@st:~# cat /proc/cpuinfo 
processor       : 0
model name      : ARMv7 Processor rev 0 (v7l)
BogoMIPS        : 2387.14
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0

processor       : 1
model name      : ARMv7 Processor rev 0 (v7l)
BogoMIPS        : 2393.70
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0

Hardware        : STi SoC with Flattened Device Tree
Revision        : 0000
Serial          : 0000000000000000

2 How to disable a CPU[edit]

On this example we disable CPU1


root@st:~# echo 0 > /sys/devices/system/cpu/cpu1/online
CPU1: shutdown
root@st:~# cat /proc/cpuinfo 
processor       : 0
model name      : ARMv7 Processor rev 0 (v7l)
BogoMIPS        : 2387.14
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0

Hardware        : STi SoC with Flattened Device Tree
Revision        : 0000
Serial          : 0000000000000000

3 How to enable a disabled CPU[edit]

On this example we enable CPU1


root@st:~# echo 1 > /sys/devices/system/cpu/cpu1/online
CPU1: shutdown



<noinclude>

{{ArticleMainWriter|ChristopheP}}
{{ArticleApprovedVersion | Jean-ChristopheT | Nobody | No previous approved version | Automatic approval (article under construction) | 19Feb’19}}
[[category==How to see the number of active CPU==<pre>

root@st:~# cat /proc/cpuinfo 
processor       : 0
model name      : ARMv7 Processor rev 0 (v7l)
BogoMIPS        : 2387.14
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0

processor       : 1
model name      : ARMv7 Processor rev 0 (v7l)
BogoMIPS        : 2393.70
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0

Hardware        : STi SoC with Flattened Device Tree
Revision        : 0000
Serial          : 0000000000000000</pre>


==How to disable a CPU==
On this example we disable CPU1<pre>

root@st:~# echo 0 > /sys/devices/system/cpu/cpu1/online
CPU1: shutdown
root@st:~# cat /proc/cpuinfo 
processor       : 0
model name      : ARMv7 Processor rev 0 (v7l)
BogoMIPS        : 2387.14
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0

Hardware        : STi SoC with Flattened Device Tree
Revision        : 0000
Serial          : 0000000000000000</pre>


==How to enable a disabled CPU==
On this example we enable CPU1<pre>

root@st:~# echo 1 > /sys/devices/system/cpu/cpu1/online
CPU1: shutdown</pre>

<noinclude>

{{PublicationRequestId | Auto}}
[[Category:How to customize software]]</noinclude>

{{UnderConstruction}}
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
  +
==How to see the number of active CPU==
  +
<pre>
  +
root@st:~# cat /proc/cpuinfo
  +
processor      : 0
  +
model name      : ARMv7 Processor rev 0 (v7l)
  +
BogoMIPS        : 2387.14
  +
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls
  +
CPU implementer : 0x41
  +
CPU architecture: 7
  +
CPU variant    : 0x3
  +
CPU part        : 0xc09
  +
CPU revision    : 0
  +
  +
processor      : 1
  +
model name      : ARMv7 Processor rev 0 (v7l)
  +
BogoMIPS        : 2393.70
  +
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls
  +
CPU implementer : 0x41
  +
CPU architecture: 7
  +
CPU variant    : 0x3
  +
CPU part        : 0xc09
  +
CPU revision    : 0
  +
  +
Hardware        : STi SoC with Flattened Device Tree
  +
Revision        : 0000
  +
Serial          : 0000000000000000
  +
</pre>
  +
  +
==How to disable a CPU==
  +
On this example we disable CPU1
  +
<pre>
  +
root@st:~# echo 0 > /sys/devices/system/cpu/cpu1/online
  +
CPU1: shutdown
  +
root@st:~# cat /proc/cpuinfo
  +
processor      : 0
  +
model name      : ARMv7 Processor rev 0 (v7l)
  +
BogoMIPS        : 2387.14
  +
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls
  +
CPU implementer : 0x41
  +
CPU architecture: 7
  +
CPU variant    : 0x3
  +
CPU part        : 0xc09
  +
CPU revision    : 0
  +
  +
Hardware        : STi SoC with Flattened Device Tree
  +
Revision        : 0000
  +
Serial          : 0000000000000000
  +
</pre>
  +
  +
==How to enable a disabled CPU==
  +
On this example we enable CPU1
  +
<pre>
  +
root@st:~# echo 1 > /sys/devices/system/cpu/cpu1/online
  +
CPU1: shutdown
  +
</pre>
  +
 
<noinclude>
 
<noinclude>
{{ArticleMainWriter|ChristopheP}}
+
{{PublicationRequestId | Auto}}
{{ArticleApprovedVersion | Jean-ChristopheT | Nobody | No previous approved version | Automatic approval (article under construction) | 19Feb’19}}
+
[[Category:How to customize software]]
[[category:How to customize software]]
 
 
</noinclude>
 
</noinclude>
{{UnderConstruction}}
 

Attachments

Discussions