From patchwork Thu Jun 13 12:16:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Gonzalez X-Patchwork-Id: 10991639 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 728DD13AD for ; Thu, 13 Jun 2019 12:16:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F00A28BA5 for ; Thu, 13 Jun 2019 12:16:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5320B28BC2; Thu, 13 Jun 2019 12:16:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DADC428BB3 for ; Thu, 13 Jun 2019 12:16:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:Message-ID:Subject: From:To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Hp/ffVTGG76/7GEfGyBiprso3hHHA0sINKHMlcpZeOQ=; b=RwKk37No70SsXB w4Q7k0HRQmOaqFMy9ID4sZbI5i2zfbhFbX3ukEldRdXY22OM3Sx4YqyHHeFP6UfM2snK3BgNgFn7s mnMcc5mGxwe5IiRyKg/hYdjaxqm4i6oeYjT3Mskkl8Z0rknMXuxi+80a7DMvplAyO19XWRhS9/IKo lQZyFHwKCRFOrVvY5ZmYvJ0U7ToSs7Zb2QlhdeUDi0Bmga7LD3xlP2gvia3xlbNqybIMQ7XEEG67C M+LbD9I6r5ipTKz0SfhxysfsMkfo7I8cwGQwwi51hUvVnbJcC5IIoYMpm4KErbS/VIVe+TYKV40WD 5vY8scmIUyK7Z3mEl/og==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hbOeu-00067D-Ru; Thu, 13 Jun 2019 12:16:48 +0000 Received: from ns.iliad.fr ([212.27.33.1]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hbOer-00066j-6F for linux-arm-kernel@lists.infradead.org; Thu, 13 Jun 2019 12:16:46 +0000 Received: from ns.iliad.fr (localhost [127.0.0.1]) by ns.iliad.fr (Postfix) with ESMTP id 8603020A7E; Thu, 13 Jun 2019 14:16:42 +0200 (CEST) Received: from [192.168.108.49] (freebox.vlq16.iliad.fr [213.36.7.13]) by ns.iliad.fr (Postfix) with ESMTP id 6D38B20732; Thu, 13 Jun 2019 14:16:42 +0200 (CEST) To: Matt Wagantall , Mitchel Humpherys , Will Deacon , Arnd Bergmann From: Marc Gonzalez Subject: [PATCH v1] iopoll: Tweak readx_poll_timeout sleep range Message-ID: Date: Thu, 13 Jun 2019 14:16:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Language: en-US X-Virus-Scanned: ClamAV using ClamSMTP ; ns.iliad.fr ; Thu Jun 13 14:16:42 2019 +0200 (CEST) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190613_051645_382079_FC7476CE X-CRM114-Status: GOOD ( 11.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Douglas Anderson , LKML , Bjorn Andersson , Thierry Reding , Bjorn Helgaas , Andrew Morton , Thomas Gleixner , Linux ARM Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Chopping max delay in 4 seems excessive. Let's just cut it in half. Signed-off-by: Marc Gonzalez --- 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; \ })