From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 031F2C31E45 for ; Thu, 13 Jun 2019 15:24:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D654D2082C for ; Thu, 13 Jun 2019 15:24:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389274AbfFMPYF (ORCPT ); Thu, 13 Jun 2019 11:24:05 -0400 Received: from ns.iliad.fr ([212.27.33.1]:45158 "EHLO ns.iliad.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731738AbfFMMQo (ORCPT ); Thu, 13 Jun 2019 08:16:44 -0400 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 Cc: Linux ARM , LKML , Thierry Reding , Andrew Morton , Bjorn Andersson , Thomas Gleixner , Bjorn Helgaas , Douglas Anderson 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-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP ; ns.iliad.fr ; Thu Jun 13 14:16:42 2019 +0200 (CEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; \ }) -- 2.17.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4E02C31E45 for ; Thu, 13 Jun 2019 12:16:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A9CD420B7C for ; Thu, 13 Jun 2019 12:16:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RwKk37No" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A9CD420B7C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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-9W; 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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; \ }) -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel