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

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

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

Thread overview: 6+ 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:42 ` Arnd Bergmann
2019-06-13 16:04   ` Marc Gonzalez
2019-06-13 16:11     ` Doug Anderson
2019-06-13 16:36       ` Marc Gonzalez
2019-06-13 17:10         ` Doug Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).