All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] iopoll: Tweak readx_poll_timeout sleep range
@ 2019-06-13 12:16 ` Marc Gonzalez
  0 siblings, 0 replies; 12+ messages in thread
From: Marc Gonzalez @ 2019-06-13 12:16 UTC (permalink / raw)
  To: Matt Wagantall, Mitchel Humpherys, Will Deacon, Arnd Bergmann
  Cc: Linux ARM, LKML, Thierry Reding, Andrew Morton, Bjorn Andersson,
	Thomas Gleixner, Bjorn Helgaas, Douglas Anderson

Chopping max delay in 4 seems excessive. Let's just cut it in half.

Signed-off-by: Marc Gonzalez <marc.w.gonzalez@free.fr>
---
When max_us=100, old_min was 26 us; new_min would be 50 us
Was there a good reason for the 1/4th?
Is new_min=0 a problem? (for max=1)
---
 include/linux/iopoll.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/iopoll.h b/include/linux/iopoll.h
index 3908353deec6..24a00d923c15 100644
--- a/include/linux/iopoll.h
+++ b/include/linux/iopoll.h
@@ -47,7 +47,7 @@
 			break; \
 		} \
 		if (__sleep_us) \
-			usleep_range((__sleep_us >> 2) + 1, __sleep_us); \
+			usleep_range(__sleep_us / 2, __sleep_us); \
 	} \
 	(cond) ? 0 : -ETIMEDOUT; \
 })
-- 
2.17.1

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

end of thread, other threads:[~2019-06-13 17:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-13 12:16 [PATCH v1] iopoll: Tweak readx_poll_timeout sleep range Marc Gonzalez
2019-06-13 12:16 ` Marc Gonzalez
2019-06-13 12:42 ` Arnd Bergmann
2019-06-13 12:42   ` Arnd Bergmann
2019-06-13 16:04   ` Marc Gonzalez
2019-06-13 16:04     ` Marc Gonzalez
2019-06-13 16:11     ` Doug Anderson
2019-06-13 16:11       ` Doug Anderson
2019-06-13 16:36       ` Marc Gonzalez
2019-06-13 16:36         ` Marc Gonzalez
2019-06-13 17:10         ` Doug Anderson
2019-06-13 17:10           ` Doug Anderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.