> -----Original Message----- > From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> > Sent: Sunday, October 9, 2022 1:20 AM > To: Elliott, Robert (Servers) <elliott@xxxxxxx> > Cc: Ard Biesheuvel <ardb@xxxxxxxxxx>; Taehee Yoo <ap420073@xxxxxxxxx>; linux- > crypto@xxxxxxxxxxxxxxx; davem@xxxxxxxxxxxxx; tglx@xxxxxxxxxxxxx; > mingo@xxxxxxxxxx; bp@xxxxxxxxx; dave.hansen@xxxxxxxxxxxxxxx; x86@xxxxxxxxxx; > hpa@xxxxxxxxx; ebiggers@xxxxxxxxxx > Subject: Re: [PATCH] crypto: x86: Do not acquire fpu context for too long > > On Sat, Oct 08, 2022 at 07:48:07PM +0000, Elliott, Robert (Servers) wrote: > > > > Perhaps the cycles mode needs to call cond_resched() too? > > Yes, just make the cond_resched unconditional. Having a few too many > rescheds shouldn't be an issue. This looks promising. I was able to trigger a lot of rcu stalls by setting: echo 2 > /sys/module/rcupdate/parameters/rcu_cpu_stall_timeout echo 200 > /sys/module/rcupdate/parameters/rcu_exp_cpu_stall_timeout and running these concurrently: watch -n 0 modprobe tcrypt=200 watch -n 0 module tcrypt=0 through 999 After changing tcrypt to call cond_resched in both cases, I don't see any more rcu stalls. I am getting miscompares from the extended self-test for crc32 and crct10dif, and will investigate those further. BTW, the way tcrypt always refuses to load leads to an ever-growing list in the Call Traces: kernel: Unloaded tainted modules: tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 t crypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt(): 1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt():1 tcrypt() :1 tcrypt():1 tcrypt():1 tcrypt():1