10.07.2015 Views

Is Parallel Programming Hard, And, If So, What Can You Do About It?

Is Parallel Programming Hard, And, If So, What Can You Do About It?

Is Parallel Programming Hard, And, If So, What Can You Do About It?

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

198 APPENDIX D. READ-COPY UPDATE IMPLEMENTATIONS5. Unbalanced tree.Looking further, CONFIG_HOTPLUG_CPU makessenseonlygivenCONFIG_SMP, andCONFIG_RCU_CPU_STALL_DETECTOR is independent, and really onlyneeds to be tested once (though someone even moreparanoid than am I might decide to test it both withand without CONFIG_SMP). Similarly, CONFIG_RCU_TRACE need only be tested once, but the truly paranoid(such as myself) wll choose to run it both withand without CONFIG_NO_HZ.ThisallowsustoobtainexcellentcoverageofRCUwith only 15 test cases. All test cases specify thefollowing configuration parameters in order to runrcutorture and so that CONFIG_HOTPLUG_CPU=n actuallytakes effect:CONFIG_RCU_TORTURE_TEST=mCONFIG_MODULE_UNLOAD=yCONFIG_SUSPEND=nCONFIG_HIBERNATION=nThe 15 test cases are as follows:1. Force single-node “tree” for small systems:CONFIG_NR_CPUS=8CONFIG_RCU_FANOUT=8CONFIG_RCU_FANOUT_EXACT=nCONFIG_RCU_TRACE=yCONFIG_PREEMPT_RCU=nCONFIG_CLASSIC_RCU=nCONFIG_TREE_RCU=y2. Force two-level tree for large systems:CONFIG_NR_CPUS=8CONFIG_RCU_FANOUT=4CONFIG_RCU_FANOUT_EXACT=nCONFIG_RCU_TRACE=nCONFIG_PREEMPT_RCU=nCONFIG_CLASSIC_RCU=nCONFIG_TREE_RCU=y3. Force three-level tree for huge systems:CONFIG_NR_CPUS=8CONFIG_RCU_FANOUT=2CONFIG_RCU_FANOUT_EXACT=nCONFIG_RCU_TRACE=yCONFIG_PREEMPT_RCU=nCONFIG_CLASSIC_RCU=nCONFIG_TREE_RCU=y4. Test autobalancing to a balanced tree:CONFIG_NR_CPUS=8CONFIG_RCU_FANOUT=6CONFIG_RCU_FANOUT_EXACT=nCONFIG_RCU_TRACE=yCONFIG_PREEMPT_RCU=nCONFIG_CLASSIC_RCU=nCONFIG_TREE_RCU=y5. Test unbalanced tree:CONFIG_NR_CPUS=8CONFIG_RCU_FANOUT=6CONFIG_RCU_FANOUT_EXACT=yCONFIG_RCU_CPU_STALL_DETECTOR=yCONFIG_RCU_TRACE=yCONFIG_PREEMPT_RCU=nCONFIG_CLASSIC_RCU=nCONFIG_TREE_RCU=y6. Disable CPU-stall detection:CONFIG_SMP=yCONFIG_NO_HZ=yCONFIG_RCU_CPU_STALL_DETECTOR=nCONFIG_HOTPLUG_CPU=yCONFIG_RCU_TRACE=yCONFIG_PREEMPT_RCU=nCONFIG_CLASSIC_RCU=nCONFIG_TREE_RCU=y7. Disable CPU-stall detection and dyntick idlemode:CONFIG_SMP=yCONFIG_NO_HZ=nCONFIG_RCU_CPU_STALL_DETECTOR=nCONFIG_HOTPLUG_CPU=yCONFIG_RCU_TRACE=yCONFIG_PREEMPT_RCU=nCONFIG_CLASSIC_RCU=nCONFIG_TREE_RCU=y8. Disable CPU-stall detection and CPU hotplug:CONFIG_SMP=yCONFIG_NO_HZ=yCONFIG_RCU_CPU_STALL_DETECTOR=nCONFIG_HOTPLUG_CPU=nCONFIG_RCU_TRACE=yCONFIG_PREEMPT_RCU=nCONFIG_CLASSIC_RCU=nCONFIG_TREE_RCU=y9. Disable CPU-stall detection, dyntick idle mode,and CPU hotplug:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!