Re: Softlockup and Hardlockup sample test module

2018-04-15 Thread valdis . kletnieks
On Sun, 15 Apr 2018 13:17:27 +0530, Ivid Suvarna said:

> I had tried with the module where I put a busy loop inside spinlock
> but was not able to cause any lockups. Maybe this is because of SMP
> which schedule the job to other CPU. "How do I make a task to run on
> single CPU only?"

So you get a kernel thread that's taken a lock and will busy-loop and not free
it.  What sort of lockup do you expect will be detected from this? Would the
results be any different if you didn't take a lock before busy-looping?

For bonus points - what additional things have to happen before a livelock
happens?

And before a deadlock happens?


pgpa6Z4GBpcBU.pgp
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Softlockup and Hardlockup sample test module

2018-04-15 Thread Ivid Suvarna
Hi All,

Could you please provide some sample test module for causing a
Softlockup and Hardlockup in latest kernel for SMP for testing
purposes. I assume there are some Kconfigs to be enabled as well for
this.

I had tried with the module where I put a busy loop inside spinlock
but was not able to cause any lockups. Maybe this is because of SMP
which schedule the job to other CPU. "How do I make a task to run on
single CPU only?"

I only get RCU stalls sometimes instead of softlockup when I use busy
loop inside a spinlock. Is there any explanation for difference
between these stalls and softlockup.

Thanks,
IVID

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies