xref: /third_party/ltp/testcases/kernel/numa/README (revision f08c3bdf)
1f08c3bdfSopenharmony_ciIntroduction:
2f08c3bdfSopenharmony_ci
3f08c3bdfSopenharmony_ci====================================================================================================================
4f08c3bdfSopenharmony_ci
5f08c3bdfSopenharmony_ciNUMA ( Non-Uniform Memory Access ) is topology in which, time taken in accessing a memory dependes upon
6f08c3bdfSopenharmony_cithe local node or remote node memory. With the help of numa libraries or numactl command we could able
7f08c3bdfSopenharmony_cito use the numa topology such that we can run an application on a specified node ( node affinity ) and
8f08c3bdfSopenharmony_cialso, we can apply memory policies such that an application running on a node can get memory alloctaion
9f08c3bdfSopenharmony_cifrom any specified nodes memory. So, we can use the policies offered by numa libraries or numactl command
10f08c3bdfSopenharmony_cito either decrease the memory latencies or increase the memory bandwidth by properly applying polcies.
11f08c3bdfSopenharmony_ci
12f08c3bdfSopenharmony_ciPlease refer http://lse.sourceforge.net/numa/ to know the basics of numa and refer
13f08c3bdfSopenharmony_cihttp://www.novell.com/collateral/4621437/4621437.pdf to understand the usage of numactl and numa libraries.
14f08c3bdfSopenharmony_ci
15f08c3bdfSopenharmony_ciWe can always get the latest package from http://oss.sgi.com/projects/libnuma/.
16f08c3bdfSopenharmony_ci
17f08c3bdfSopenharmony_ciTestcase Description:
18f08c3bdfSopenharmony_ci====================================================================================================================
19f08c3bdfSopenharmony_cinuma01.sh shell script holds all the numa testcases and support_numa.c will help numa01.sh as and when needed.
20f08c3bdfSopenharmony_ci
21f08c3bdfSopenharmony_ciTestcase1:
22f08c3bdfSopenharmony_ciVerifies the node affinity and memory affinity by running the support_numa process which will allocate 1MB of memory.
23f08c3bdfSopenharmony_ci
24f08c3bdfSopenharmony_ciTestCase2:
25f08c3bdfSopenharmony_ciVerifies the preferred node memory policy which will allocate memory from the node we specify. This
26f08c3bdfSopenharmony_citestcase will use the support_numa process for the verfication.
27f08c3bdfSopenharmony_ci
28f08c3bdfSopenharmony_ciTestCase3:
29f08c3bdfSopenharmony_ciVerifies the memory interleaving policy which will distribute the memory evenly among all nodes. This
30f08c3bdfSopenharmony_citestcase will use the support_numa process for the verfication.
31f08c3bdfSopenharmony_ci
32f08c3bdfSopenharmony_ciTestCase4:
33f08c3bdfSopenharmony_ciVerifies the physical cpu affinity which runs the process support_numa on the specified physical cpu number.
34f08c3bdfSopenharmony_ci
35f08c3bdfSopenharmony_ciTestCase5:
36f08c3bdfSopenharmony_ciVerifies the local allocation policy which always allocates memory from the local node. This testcase
37f08c3bdfSopenharmony_ciwill use the support_numa process for the verfication.
38f08c3bdfSopenharmony_ci
39f08c3bdfSopenharmony_ciTestCase6:
40f08c3bdfSopenharmony_ciVerifies the memory interleaving policy which will distribute the memory evenly among all nodes. This
41f08c3bdfSopenharmony_citestcase will use memhog for the verfication.
42f08c3bdfSopenharmony_ci
43f08c3bdfSopenharmony_ciTestCase7:
44f08c3bdfSopenharmony_ciVerifies the numa_node_size api with hardware checking.
45f08c3bdfSopenharmony_ci
46f08c3bdfSopenharmony_ciTestCase8:
47f08c3bdfSopenharmony_ciVerifies the hugepage memory allocated from the node we specify.
48f08c3bdfSopenharmony_ci
49f08c3bdfSopenharmony_ciTestCase9:
50f08c3bdfSopenharmony_ciVerifies the preferred node policy with THP memory allocating from the node we specify.
51f08c3bdfSopenharmony_ci
52f08c3bdfSopenharmony_ciPre-requisites
53f08c3bdfSopenharmony_ci====================================================================================================================
54f08c3bdfSopenharmony_ci * libnuma should be installed on the NUMA machine before executing theses testcases
55f08c3bdfSopenharmony_ci * Testcases will not run by default in LTP-runall, they also skip on non-numa machines
56