xref: /third_party/ltp/testcases/kernel/hotplug/cpu_hotplug/doc/hotplug02.txt
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/testcases/kernel/hotplug/cpu_hotplug/doc/
1f08c3bdfSopenharmony_ciTestcase 02
2f08c3bdfSopenharmony_ci-----------
3f08c3bdfSopenharmony_ci
4f08c3bdfSopenharmony_ciThis test checks that a process migrates when the CPU it is running on
5f08c3bdfSopenharmony_ciis offlined.
6f08c3bdfSopenharmony_ci
7f08c3bdfSopenharmony_ci
8f08c3bdfSopenharmony_ciAlgorithm
9f08c3bdfSopenharmony_ci=========
10f08c3bdfSopenharmony_ciGiven a CPU to test that exists
11f08c3bdfSopenharmony_ci
12f08c3bdfSopenharmony_ciMake sure the cpu is online
13f08c3bdfSopenharmony_ci
14f08c3bdfSopenharmony_ciStart a process that just uses processor cycles
15f08c3bdfSopenharmony_ci
16f08c3bdfSopenharmony_ciLoop until done:
17f08c3bdfSopenharmony_ci  Move the process to the CPU we will be offlining
18f08c3bdfSopenharmony_ci
19f08c3bdfSopenharmony_ci  Offline the CPU
20f08c3bdfSopenharmony_ci
21f08c3bdfSopenharmony_ci  Determine which CPU the process migrated to
22f08c3bdfSopenharmony_ci
23f08c3bdfSopenharmony_ci  Verify that it is still running
24f08c3bdfSopenharmony_ci
25f08c3bdfSopenharmony_ci  Verify that it is not running on the original CPU
26f08c3bdfSopenharmony_ci
27f08c3bdfSopenharmony_ci  Turn the CPU back online
28f08c3bdfSopenharmony_ci
29f08c3bdfSopenharmony_ci
30f08c3bdfSopenharmony_ci
31f08c3bdfSopenharmony_ciWhen exiting:
32f08c3bdfSopenharmony_ci  Kill the spin loop process
33f08c3bdfSopenharmony_ci
34

Indexes created Thu Nov 07 10:32:03 CST 2024