On Wed, Oct 27, 2021 at 09:01:03AM -0700, Jakub Kicinski wrote:
On Mon, 25 Oct 2021 10:55:05 -0700 Tony Nguyen wrote:
quoted
+ cond_resched();
udelay(50);
Why not switch to usleep_range() if we can sleep here?
Looking at usleep_range() vs. udelay(), I wonder if there is still a
hidden reason to prefer udelay(). Basically, if you typically want
short delays like the 50µs above, going to sleep will often result in
much longer delays, 1ms or higher. I can easily see situations where
multiple calls to udelay(50) are fine while multiple calls to
usleep_range() will cause timeouts.
Is that a known problem and do we have good heuristics when to prefer
one over the other?
Jörn
--
Audacity augments courage; hesitation, fear.
-- Publilius Syrus