public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Busy-waiting with interrupts disabled
@ 2011-12-12 22:12 Alan Stern
  2011-12-12 22:47 ` Steven Rostedt
  2011-12-12 23:18 ` Steve Calfee
  0 siblings, 2 replies; 4+ messages in thread
From: Alan Stern @ 2011-12-12 22:12 UTC (permalink / raw)
  To: USB list; +Cc: Thomas Gleixner, Steven Rostedt, Kernel development list

How long is it okay to busy-wait with interrupts disabled?  Are there 
any clear-cut guidelines?

My feeling is that for ordinary desktop use, 1-2 ms should be about the
limit, but other people may feel differently.  (There's one spot in
ehci-hcd where the delay can last up to 250 ms, which does seem rather
excessive.  Fortunately it never takes that long unless the hardware is
broken.)

No doubt the RT people would say the upper bound should be on the order
of a few microseconds or less.  I'd be happy to change ehci-hcd, which
has several delays in the 1-2 ms range -- but they tend to be nested
inside routines that are called within the scope of spinlock_irq, which
means a fair amount of rewriting would be needed.

Any thoughts or recommendations?

Alan Stern


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-12 23:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-12 22:12 Busy-waiting with interrupts disabled Alan Stern
2011-12-12 22:47 ` Steven Rostedt
2011-12-12 23:42   ` Thomas Gleixner
2011-12-12 23:18 ` Steve Calfee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox