[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YXqOL0PqhujmH+sd@cork>
Date: Thu, 28 Oct 2021 04:49:03 -0700
From: Jörn Engel <joern@...estorage.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Tony Nguyen <anthony.l.nguyen@...el.com>, davem@...emloft.net,
Caleb Sander <csander@...estorage.com>, netdev@...r.kernel.org,
sassmann@...hat.com, Tony Brelinski <tony.brelinski@...el.com>
Subject: Re: [PATCH net-next 1/4] i40e: avoid spin loop in
i40e_asq_send_command()
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:
> > + 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
Powered by blists - more mailing lists