Re: [RFC PATCH 85/86] treewide: drivers: remove cond_resched()

From: Dmitry Torokhov
Date: Thu Nov 09 2023 - 18:26:04 EST


Hi Anhur,

On Tue, Nov 07, 2023 at 03:08:21PM -0800, Ankur Arora wrote:
> There are broadly three sets of uses of cond_resched():
>
> 1. Calls to cond_resched() out of the goodness of our heart,
> otherwise known as avoiding lockup splats.

...

What about RCU stalls? The calls to cond_resched() in evdev.c and
mousedev.c were added specifically to allow RCU to run in cases when
userspace passes a large buffer and the kernel is not fully preemptable.

Thanks.

--
Dmitry