1*49cdfc7eSAndroid Build Coastguard WorkerIntroduction: 2*49cdfc7eSAndroid Build Coastguard Worker 3*49cdfc7eSAndroid Build Coastguard Worker==================================================================================================================== 4*49cdfc7eSAndroid Build Coastguard Worker 5*49cdfc7eSAndroid Build Coastguard WorkerNUMA ( Non-Uniform Memory Access ) is topology in which, time taken in accessing a memory dependes upon 6*49cdfc7eSAndroid Build Coastguard Workerthe local node or remote node memory. With the help of numa libraries or numactl command we could able 7*49cdfc7eSAndroid Build Coastguard Workerto use the numa topology such that we can run an application on a specified node ( node affinity ) and 8*49cdfc7eSAndroid Build Coastguard Workeralso, we can apply memory policies such that an application running on a node can get memory alloctaion 9*49cdfc7eSAndroid Build Coastguard Workerfrom any specified nodes memory. So, we can use the policies offered by numa libraries or numactl command 10*49cdfc7eSAndroid Build Coastguard Workerto either decrease the memory latencies or increase the memory bandwidth by properly applying polcies. 11*49cdfc7eSAndroid Build Coastguard Worker 12*49cdfc7eSAndroid Build Coastguard WorkerPlease refer http://lse.sourceforge.net/numa/ to know the basics of numa and refer 13*49cdfc7eSAndroid Build Coastguard Workerhttp://www.novell.com/collateral/4621437/4621437.pdf to understand the usage of numactl and numa libraries. 14*49cdfc7eSAndroid Build Coastguard Worker 15*49cdfc7eSAndroid Build Coastguard WorkerWe can always get the latest package from http://oss.sgi.com/projects/libnuma/. 16*49cdfc7eSAndroid Build Coastguard Worker 17*49cdfc7eSAndroid Build Coastguard WorkerTestcase Description: 18*49cdfc7eSAndroid Build Coastguard Worker==================================================================================================================== 19*49cdfc7eSAndroid Build Coastguard Workernuma01.sh shell script holds all the numa testcases and support_numa.c will help numa01.sh as and when needed. 20*49cdfc7eSAndroid Build Coastguard Worker 21*49cdfc7eSAndroid Build Coastguard WorkerTestcase1: 22*49cdfc7eSAndroid Build Coastguard WorkerVerifies the node affinity and memory affinity by running the support_numa process which will allocate 1MB of memory. 23*49cdfc7eSAndroid Build Coastguard Worker 24*49cdfc7eSAndroid Build Coastguard WorkerTestCase2: 25*49cdfc7eSAndroid Build Coastguard WorkerVerifies the preferred node memory policy which will allocate memory from the node we specify. This 26*49cdfc7eSAndroid Build Coastguard Workertestcase will use the support_numa process for the verfication. 27*49cdfc7eSAndroid Build Coastguard Worker 28*49cdfc7eSAndroid Build Coastguard WorkerTestCase3: 29*49cdfc7eSAndroid Build Coastguard WorkerVerifies the memory interleaving policy which will distribute the memory evenly among all nodes. This 30*49cdfc7eSAndroid Build Coastguard Workertestcase will use the support_numa process for the verfication. 31*49cdfc7eSAndroid Build Coastguard Worker 32*49cdfc7eSAndroid Build Coastguard WorkerTestCase4: 33*49cdfc7eSAndroid Build Coastguard WorkerVerifies the physical cpu affinity which runs the process support_numa on the specified physical cpu number. 34*49cdfc7eSAndroid Build Coastguard Worker 35*49cdfc7eSAndroid Build Coastguard WorkerTestCase5: 36*49cdfc7eSAndroid Build Coastguard WorkerVerifies the local allocation policy which always allocates memory from the local node. This testcase 37*49cdfc7eSAndroid Build Coastguard Workerwill use the support_numa process for the verfication. 38*49cdfc7eSAndroid Build Coastguard Worker 39*49cdfc7eSAndroid Build Coastguard WorkerTestCase6: 40*49cdfc7eSAndroid Build Coastguard WorkerVerifies the memory interleaving policy which will distribute the memory evenly among all nodes. This 41*49cdfc7eSAndroid Build Coastguard Workertestcase will use memhog for the verfication. 42*49cdfc7eSAndroid Build Coastguard Worker 43*49cdfc7eSAndroid Build Coastguard WorkerTestCase7: 44*49cdfc7eSAndroid Build Coastguard WorkerVerifies the numa_node_size api with hardware checking. 45*49cdfc7eSAndroid Build Coastguard Worker 46*49cdfc7eSAndroid Build Coastguard WorkerTestCase8: 47*49cdfc7eSAndroid Build Coastguard WorkerVerifies the hugepage memory allocated from the node we specify. 48*49cdfc7eSAndroid Build Coastguard Worker 49*49cdfc7eSAndroid Build Coastguard WorkerTestCase9: 50*49cdfc7eSAndroid Build Coastguard WorkerVerifies the preferred node policy with THP memory allocating from the node we specify. 51*49cdfc7eSAndroid Build Coastguard Worker 52*49cdfc7eSAndroid Build Coastguard WorkerPre-requisites 53*49cdfc7eSAndroid Build Coastguard Worker==================================================================================================================== 54*49cdfc7eSAndroid Build Coastguard Worker * libnuma should be installed on the NUMA machine before executing theses testcases 55*49cdfc7eSAndroid Build Coastguard Worker * Testcases will not run by default in LTP-runall, they also skip on non-numa machines 56