linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Gonzalez <marc.w.gonzalez@free.fr>
To: Matt Wagantall <mattw@codeaurora.org>,
	Mitchel Humpherys <mitchelh@codeaurora.org>,
	Will Deacon <will.deacon@arm.com>, Arnd Bergmann <arnd@arndb.de>
Cc: Linux ARM <linux-arm-kernel@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Bjorn Helgaas <helgaas@kernel.org>,
	Douglas Anderson <dianders@chromium.org>
Subject: [PATCH v1] iopoll: Tweak readx_poll_timeout sleep range
Date: Thu, 13 Jun 2019 14:16:42 +0200	[thread overview]
Message-ID: <c2e6af51-5676-3715-6666-c3f18df7b992@free.fr> (raw)

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

             reply	other threads:[~2019-06-13 15:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-13 12:16 Marc Gonzalez [this message]
2019-06-13 12:42 ` [PATCH v1] iopoll: Tweak readx_poll_timeout sleep range 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c2e6af51-5676-3715-6666-c3f18df7b992@free.fr \
    --to=marc.w.gonzalez@free.fr \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=bjorn.andersson@linaro.org \
    --cc=dianders@chromium.org \
    --cc=helgaas@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattw@codeaurora.org \
    --cc=mitchelh@codeaurora.org \
    --cc=tglx@linutronix.de \
    --cc=thierry.reding@gmail.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).