Thread (15 messages) 15 messages, 4 authors, 2021-11-01

Re: [PATCH net-next 1/4] i40e: avoid spin loop in i40e_asq_send_command()

flat view

From: Jörn Engel <hidden>
Date: 2021-10-28 11:49:21

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help