[psphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget'/translations/zh_CN/locking/locktorturemodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/zh_TW/locking/locktorturemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/it_IT/locking/locktorturemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ja_JP/locking/locktorturemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ko_KR/locking/locktorturemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/sp_SP/locking/locktorturemodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h"Kernel Lock Torture Test Operationh]h"Kernel Lock Torture Test Operation}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhA/var/lib/git/docbuild/linux/Documentation/locking/locktorture.rsthKubh)}(hhh](h)}(hCONFIG_LOCK_TORTURE_TESTh]hCONFIG_LOCK_TORTURE_TEST}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hXThe CONFIG_LOCK_TORTURE_TEST config option provides a kernel module that runs torture tests on core kernel locking primitives. The kernel module, 'locktorture', may be built after the fact on the running kernel to be tested, if desired. The tests periodically output status messages via printk(), which can be examined via the dmesg (perhaps grepping for "torture"). The test is started when the module is loaded, and stops when the module is unloaded. This program is based on how RCU is tortured, via rcutorture.h]hX The CONFIG_LOCK_TORTURE_TEST config option provides a kernel module that runs torture tests on core kernel locking primitives. The kernel module, ‘locktorture’, may be built after the fact on the running kernel to be tested, if desired. The tests periodically output status messages via printk(), which can be examined via the dmesg (perhaps grepping for “torture”). The test is started when the module is loaded, and stops when the module is unloaded. This program is based on how RCU is tortured, via rcutorture.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hX>This torture test consists of creating a number of kernel threads which acquire the lock and hold it for specific amount of time, thus simulating different critical region behaviors. The amount of contention on the lock can be simulated by either enlarging this critical region hold time and/or creating more kthreads.h]hX>This torture test consists of creating a number of kernel threads which acquire the lock and hold it for specific amount of time, thus simulating different critical region behaviors. The amount of contention on the lock can be simulated by either enlarging this critical region hold time and/or creating more kthreads.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]config-lock-torture-testah ]h"]config_lock_torture_testah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hModule Parametersh]hModule Parameters}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(h)This module has the following parameters:h]h)This module has the following parameters:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hLocktorture-specifich]hLocktorture-specific}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubhdefinition_list)}(hhh](hdefinition_list_item)}(hnwriters_stress Number of kernel threads that will stress exclusive lock ownership (writers). The default value is twice the number of online CPUs. h](hterm)}(hnwriters_stressh]hnwriters_stress}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhK$hj%ubh definition)}(hhh]h)}(hNumber of kernel threads that will stress exclusive lock ownership (writers). The default value is twice the number of online CPUs.h]hNumber of kernel threads that will stress exclusive lock ownership (writers). The default value is twice the number of online CPUs.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hj;ubah}(h]h ]h"]h$]h&]uh1j9hj%ubeh}(h]h ]h"]h$]h&]uh1j#hhhK$hj ubj$)}(hnreaders_stress Number of kernel threads that will stress shared lock ownership (readers). The default is the same amount of writer locks. If the user did not specify nwriters_stress, then both readers and writers be the amount of online CPUs. h](j*)}(hnreaders_stressh]hnreaders_stress}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhK*hjXubj:)}(hhh]h)}(hNumber of kernel threads that will stress shared lock ownership (readers). The default is the same amount of writer locks. If the user did not specify nwriters_stress, then both readers and writers be the amount of online CPUs.h]hNumber of kernel threads that will stress shared lock ownership (readers). The default is the same amount of writer locks. If the user did not specify nwriters_stress, then both readers and writers be the amount of online CPUs.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjjubah}(h]h ]h"]h$]h&]uh1j9hjXubeh}(h]h ]h"]h$]h&]uh1j#hhhK*hj hhubj$)}(hXNtorture_type Type of lock to torture. By default, only spinlocks will be tortured. This module can torture the following locks, with string values as follows: - "lock_busted": Simulates a buggy lock implementation. - "spin_lock": spin_lock() and spin_unlock() pairs. - "spin_lock_irq": spin_lock_irq() and spin_unlock_irq() pairs. - "rw_lock": read/write lock() and unlock() rwlock pairs. - "rw_lock_irq": read/write lock_irq() and unlock_irq() rwlock pairs. - "mutex_lock": mutex_lock() and mutex_unlock() pairs. - "rtmutex_lock": rtmutex_lock() and rtmutex_unlock() pairs. Kernel must have CONFIG_RT_MUTEXES=y. - "rwsem_lock": read/write down() and up() semaphore pairs. h](j*)}(h torture_typeh]h torture_type}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhKJhjubj:)}(hhh](h)}(hType of lock to torture. By default, only spinlocks will be tortured. This module can torture the following locks, with string values as follows:h]hType of lock to torture. By default, only spinlocks will be tortured. This module can torture the following locks, with string values as follows:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjubh block_quote)}(hXx- "lock_busted": Simulates a buggy lock implementation. - "spin_lock": spin_lock() and spin_unlock() pairs. - "spin_lock_irq": spin_lock_irq() and spin_unlock_irq() pairs. - "rw_lock": read/write lock() and unlock() rwlock pairs. - "rw_lock_irq": read/write lock_irq() and unlock_irq() rwlock pairs. - "mutex_lock": mutex_lock() and mutex_unlock() pairs. - "rtmutex_lock": rtmutex_lock() and rtmutex_unlock() pairs. Kernel must have CONFIG_RT_MUTEXES=y. - "rwsem_lock": read/write down() and up() semaphore pairs. h]h bullet_list)}(hhh](h list_item)}(h?"lock_busted": Simulates a buggy lock implementation. h]j)}(hhh]j$)}(h6"lock_busted": Simulates a buggy lock implementation. h](j*)}(h"lock_busted":h]h“lock_busted”:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhK2hjubj:)}(hhh]h)}(h&Simulates a buggy lock implementation.h]h&Simulates a buggy lock implementation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK2hjubah}(h]h ]h"]h$]h&]uh1j9hjubeh}(h]h ]h"]h$]h&]uh1j#hhhK2hjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h;"spin_lock": spin_lock() and spin_unlock() pairs. h]j)}(hhh]j$)}(h2"spin_lock": spin_lock() and spin_unlock() pairs. h](j*)}(h "spin_lock":h]h“spin_lock”:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhK5hjubj:)}(hhh]h)}(h$spin_lock() and spin_unlock() pairs.h]h$spin_lock() and spin_unlock() pairs.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjubah}(h]h ]h"]h$]h&]uh1j9hjubeh}(h]h ]h"]h$]h&]uh1j#hhhK5hjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hG"spin_lock_irq": spin_lock_irq() and spin_unlock_irq() pairs. h]j)}(hhh]j$)}(h>"spin_lock_irq": spin_lock_irq() and spin_unlock_irq() pairs. h](j*)}(h"spin_lock_irq":h]h“spin_lock_irq”:}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhK8hjBubj:)}(hhh]h)}(h,spin_lock_irq() and spin_unlock_irq() pairs.h]h,spin_lock_irq() and spin_unlock_irq() pairs.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjTubah}(h]h ]h"]h$]h&]uh1j9hjBubeh}(h]h ]h"]h$]h&]uh1j#hhhK8hj?ubah}(h]h ]h"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hA"rw_lock": read/write lock() and unlock() rwlock pairs. h]j)}(hhh]j$)}(h8"rw_lock": read/write lock() and unlock() rwlock pairs. h](j*)}(h "rw_lock":h]h“rw_lock”:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhK;hjubj:)}(hhh]h)}(h,read/write lock() and unlock() rwlock pairs.h]h,read/write lock() and unlock() rwlock pairs.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjubah}(h]h ]h"]h$]h&]uh1j9hjubeh}(h]h ]h"]h$]h&]uh1j#hhhK;hjubah}(h]h ]h"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hV"rw_lock_irq": read/write lock_irq() and unlock_irq() rwlock pairs. h]j)}(hhh]j$)}(hD"rw_lock_irq": read/write lock_irq() and unlock_irq() rwlock pairs. h](j*)}(h"rw_lock_irq":h]h“rw_lock_irq”:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhK?hjubj:)}(hhh]h)}(h4read/write lock_irq() and unlock_irq() rwlock pairs.h]h4read/write lock_irq() and unlock_irq() rwlock pairs.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK>hjubah}(h]h ]h"]h$]h&]uh1j9hjubeh}(h]h ]h"]h$]h&]uh1j#hhhK?hjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h>"mutex_lock": mutex_lock() and mutex_unlock() pairs. h]j)}(hhh]j$)}(h5"mutex_lock": mutex_lock() and mutex_unlock() pairs. h](j*)}(h "mutex_lock":h]h“mutex_lock”:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhKBhjubj:)}(hhh]h)}(h&mutex_lock() and mutex_unlock() pairs.h]h&mutex_lock() and mutex_unlock() pairs.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhjubah}(h]h ]h"]h$]h&]uh1j9hjubeh}(h]h ]h"]h$]h&]uh1j#hhhKBhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hs"rtmutex_lock": rtmutex_lock() and rtmutex_unlock() pairs. Kernel must have CONFIG_RT_MUTEXES=y. h]j)}(hhh]j$)}(ha"rtmutex_lock": rtmutex_lock() and rtmutex_unlock() pairs. Kernel must have CONFIG_RT_MUTEXES=y. h](j*)}(h"rtmutex_lock":h]h“rtmutex_lock”:}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhKFhjJubj:)}(hhh]h)}(hPrtmutex_lock() and rtmutex_unlock() pairs. Kernel must have CONFIG_RT_MUTEXES=y.h]hPrtmutex_lock() and rtmutex_unlock() pairs. Kernel must have CONFIG_RT_MUTEXES=y.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKEhj\ubah}(h]h ]h"]h$]h&]uh1j9hjJubeh}(h]h ]h"]h$]h&]uh1j#hhhKFhjGubah}(h]h ]h"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hD"rwsem_lock": read/write down() and up() semaphore pairs. h]j)}(hhh]j$)}(h;"rwsem_lock": read/write down() and up() semaphore pairs. h](j*)}(h "rwsem_lock":h]h“rwsem_lock”:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhKJhjubj:)}(hhh]h)}(h+read/write down() and up() semaphore pairs.h]h+read/write down() and up() semaphore pairs.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhjubah}(h]h ]h"]h$]h&]uh1j9hjubeh}(h]h ]h"]h$]h&]uh1j#hhhKJhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]bullet-uh1jhhhK1hjubah}(h]h ]h"]h$]h&]uh1jhhhK1hjubeh}(h]h ]h"]h$]h&]uh1j9hjubeh}(h]h ]h"]h$]h&]uh1j#hhhKJhj hhubeh}(h]h ]h"]h$]h&]uh1jhj hhhhhNubeh}(h]locktorture-specificah ]h"]locktorture-specificah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h!Torture-framework (RCU + locking)h]h!Torture-framework (RCU + locking)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKMubj)}(hhh](j$)}(hshutdown_secs The number of seconds to run the test before terminating the test and powering off the system. The default is zero, which disables test termination and system shutdown. This capability is useful for automated testing. h](j*)}(h shutdown_secsh]h shutdown_secs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhKShjubj:)}(hhh]h)}(hThe number of seconds to run the test before terminating the test and powering off the system. The default is zero, which disables test termination and system shutdown. This capability is useful for automated testing.h]hThe number of seconds to run the test before terminating the test and powering off the system. The default is zero, which disables test termination and system shutdown. This capability is useful for automated testing.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKPhjubah}(h]h ]h"]h$]h&]uh1j9hjubeh}(h]h ]h"]h$]h&]uh1j#hhhKShjubj$)}(hXAonoff_interval The number of seconds between each attempt to execute a randomly selected CPU-hotplug operation. Defaults to zero, which disables CPU hotplugging. In CONFIG_HOTPLUG_CPU=n kernels, locktorture will silently refuse to do any CPU-hotplug operations regardless of what value is specified for onoff_interval. h](j*)}(honoff_intervalh]honoff_interval}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhK[hj2ubj:)}(hhh]h)}(hX1The number of seconds between each attempt to execute a randomly selected CPU-hotplug operation. Defaults to zero, which disables CPU hotplugging. In CONFIG_HOTPLUG_CPU=n kernels, locktorture will silently refuse to do any CPU-hotplug operations regardless of what value is specified for onoff_interval.h]hX1The number of seconds between each attempt to execute a randomly selected CPU-hotplug operation. Defaults to zero, which disables CPU hotplugging. In CONFIG_HOTPLUG_CPU=n kernels, locktorture will silently refuse to do any CPU-hotplug operations regardless of what value is specified for onoff_interval.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhjDubah}(h]h ]h"]h$]h&]uh1j9hj2ubeh}(h]h ]h"]h$]h&]uh1j#hhhK[hjhhubj$)}(hXjonoff_holdoff The number of seconds to wait until starting CPU-hotplug operations. This would normally only be used when locktorture was built into the kernel and started automatically at boot time, in which case it is useful in order to avoid confusing boot-time code with CPUs coming and going. This parameter is only useful if CONFIG_HOTPLUG_CPU is enabled. h](j*)}(h onoff_holdoffh]h onoff_holdoff}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhKdhjaubj:)}(hhh]h)}(hX[The number of seconds to wait until starting CPU-hotplug operations. This would normally only be used when locktorture was built into the kernel and started automatically at boot time, in which case it is useful in order to avoid confusing boot-time code with CPUs coming and going. This parameter is only useful if CONFIG_HOTPLUG_CPU is enabled.h]hX[The number of seconds to wait until starting CPU-hotplug operations. This would normally only be used when locktorture was built into the kernel and started automatically at boot time, in which case it is useful in order to avoid confusing boot-time code with CPUs coming and going. This parameter is only useful if CONFIG_HOTPLUG_CPU is enabled.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hjsubah}(h]h ]h"]h$]h&]uh1j9hjaubeh}(h]h ]h"]h$]h&]uh1j#hhhKdhjhhubj$)}(hstat_interval Number of seconds between statistics-related printk()s. By default, locktorture will report stats every 60 seconds. Setting the interval to zero causes the statistics to be printed -only- when the module is unloaded. h](j*)}(h stat_intervalh]h stat_interval}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhKjhjubj:)}(hhh]h)}(hNumber of seconds between statistics-related printk()s. By default, locktorture will report stats every 60 seconds. Setting the interval to zero causes the statistics to be printed -only- when the module is unloaded.h]hNumber of seconds between statistics-related printk()s. By default, locktorture will report stats every 60 seconds. Setting the interval to zero causes the statistics to be printed -only- when the module is unloaded.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghjubah}(h]h ]h"]h$]h&]uh1j9hjubeh}(h]h ]h"]h$]h&]uh1j#hhhKjhjhhubj$)}(hstutter The length of time to run the test before pausing for this same period of time. Defaults to "stutter=5", so as to run and pause for (roughly) five-second intervals. Specifying "stutter=0" causes the test to run continuously without pausing. h](j*)}(hstutterh]hstutter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhKqhjubj:)}(hhh]h)}(hThe length of time to run the test before pausing for this same period of time. Defaults to "stutter=5", so as to run and pause for (roughly) five-second intervals. Specifying "stutter=0" causes the test to run continuously without pausing.h]hThe length of time to run the test before pausing for this same period of time. Defaults to “stutter=5”, so as to run and pause for (roughly) five-second intervals. Specifying “stutter=0” causes the test to run continuously without pausing.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhjubah}(h]h ]h"]h$]h&]uh1j9hjubeh}(h]h ]h"]h$]h&]uh1j#hhhKqhjhhubj$)}(hshuffle_interval The number of seconds to keep the test threads affinitized to a particular subset of the CPUs, defaults to 3 seconds. Used in conjunction with test_no_idle_hz. h](j*)}(hshuffle_intervalh]hshuffle_interval}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhKvhjubj:)}(hhh]h)}(hThe number of seconds to keep the test threads affinitized to a particular subset of the CPUs, defaults to 3 seconds. Used in conjunction with test_no_idle_hz.h]hThe number of seconds to keep the test threads affinitized to a particular subset of the CPUs, defaults to 3 seconds. Used in conjunction with test_no_idle_hz.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthjubah}(h]h ]h"]h$]h&]uh1j9hjubeh}(h]h ]h"]h$]h&]uh1j#hhhKvhjhhubj$)}(hverbose Enable verbose debugging printing, via printk(). Enabled by default. This extra information is mostly related to high-level errors and reports from the main 'torture' framework. h](j*)}(hverboseh]hverbose}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhK}hjubj:)}(hhh]h)}(hEnable verbose debugging printing, via printk(). Enabled by default. This extra information is mostly related to high-level errors and reports from the main 'torture' framework.h]hEnable verbose debugging printing, via printk(). Enabled by default. This extra information is mostly related to high-level errors and reports from the main ‘torture’ framework.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKyhj/ubah}(h]h ]h"]h$]h&]uh1j9hjubeh}(h]h ]h"]h$]h&]uh1j#hhhK}hjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]torture-framework-rcu-lockingah ]h"]!torture-framework (rcu + locking)ah$]h&]uh1hhhhhhhhKMubeh}(h]module-parametersah ]h"]module parametersah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Statisticsh]h Statistics}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbhhhhhKubh)}(h0Statistics are printed in the following format::h]h/Statistics are printed in the following format:}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjbhhubh literal_block)}(hX spin_lock-torture: Writes: Total: 93746064 Max/Min: 0/0 Fail: 0 (A) (B) (C) (D) (E) (A): Lock type that is being tortured -- torture_type parameter. (B): Number of writer lock acquisitions. If dealing with a read/write primitive a second "Reads" statistics line is printed. (C): Number of times the lock was acquired. (D): Min and max number of times threads failed to acquire the lock. (E): true/false values if there were errors acquiring the lock. This should -only- be positive if there is a bug in the locking primitive's implementation. Otherwise a lock should never fail (i.e., spin_lock()). Of course, the same applies for (C), above. A dummy example of this is the "lock_busted" type.h]hX spin_lock-torture: Writes: Total: 93746064 Max/Min: 0/0 Fail: 0 (A) (B) (C) (D) (E) (A): Lock type that is being tortured -- torture_type parameter. (B): Number of writer lock acquisitions. If dealing with a read/write primitive a second "Reads" statistics line is printed. (C): Number of times the lock was acquired. (D): Min and max number of times threads failed to acquire the lock. (E): true/false values if there were errors acquiring the lock. This should -only- be positive if there is a bug in the locking primitive's implementation. Otherwise a lock should never fail (i.e., spin_lock()). Of course, the same applies for (C), above. A dummy example of this is the "lock_busted" type.}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhKhjbhhubeh}(h] statisticsah ]h"] statisticsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hUsageh]hUsage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(h3The following script may be used to torture locks::h]h2The following script may be used to torture locks:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hR#!/bin/sh modprobe locktorture sleep 3600 rmmod locktorture dmesg | grep torture:h]hR#!/bin/sh modprobe locktorture sleep 3600 rmmod locktorture dmesg | grep torture:}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hXThe output can be manually inspected for the error flag of "!!!". One could of course create a more elaborate script that automatically checked for such errors. The "rmmod" command forces a "SUCCESS", "FAILURE", or "RCU_HOTPLUG" indication to be printk()ed. The first two are self-explanatory, while the last indicates that while there were no locking failures, CPU-hotplug problems were detected.h]hXThe output can be manually inspected for the error flag of “!!!”. One could of course create a more elaborate script that automatically checked for such errors. The “rmmod” command forces a “SUCCESS”, “FAILURE”, or “RCU_HOTPLUG” indication to be printk()ed. The first two are self-explanatory, while the last indicates that while there were no locking failures, CPU-hotplug problems were detected.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h'Also see: Documentation/RCU/torture.rsth]h'Also see: Documentation/RCU/torture.rst}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]usageah ]h"]usageah$]h&]uh1hhhhhhhhKubeh}(h]"kernel-lock-torture-test-operationah ]h"]"kernel lock torture test operationah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjhhj_j\jjjWjTjjjju nametypes}(jhj_jjWjjuh}(jhhhj\hjj jTjjjbjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.