<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Apr 15, 2018 at 12:47 AM, Ivid Suvarna <<a href="mailto:ivid.suvarna@gmail.com">ivid.suvarna@gmail.com</a>> wrote:<br>><br>> Hi All,<br>><br>> Could you please provide some sample test module for causing a<br>> Softlockup and Hardlockup in latest kernel for SMP for testing<br>> purposes. I assume there are some Kconfigs to be enabled as well for<br><br><br>Have you looked at this book?<br><br> Operating System Principles by Per Brinch Hansen <br><br>It outlines some basic multi processing locking strategies and how things might break.<br><br>These apply to SMP multiple process user programs as well as kernel code. <br><br>Being inside a lock has impact only on what that lock locks which includes the tree of locks, data and code that depend on it.<br><br>Locking of two types come to mind. Locked specific data or a lock on a monitor function that manages a set of things<br>that depend on each other or just simply modifies data. A monitor might hold multiple data locks... <br><br>Interrupt and signal masks play an important part in all of this.<br>Does your modified spinlock have a lock locked when your busy loop is entered and what invokes it?<br>Each core needs to enter the bad code for a system to lock up. Other interrupts can keep the system<br>happy forever as long as the 'stuck' code is not critical. Atomic operations can be hardware specific<br>so knowing the hardware is part of selecting the test cases.<br><div><br></div></div> -- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><br></div><div dir="ltr"> T o m M i t c h e l l</div></div></div></div>
</div></div>