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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, 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 0178DC43460 for ; Thu, 22 Apr 2021 12:19:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B9DFF61452 for ; Thu, 22 Apr 2021 12:19:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236189AbhDVMTt (ORCPT ); Thu, 22 Apr 2021 08:19:49 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:35546 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235232AbhDVMTp (ORCPT ); Thu, 22 Apr 2021 08:19:45 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lZYIM-000Uj3-4U; Thu, 22 Apr 2021 14:18:58 +0200 Date: Thu, 22 Apr 2021 14:18:58 +0200 From: Andrew Lunn To: Ilya Lipnitskiy Cc: Felix Fietkau , John Crispin , Sean Wang , Mark Lee , "David S. Miller" , Jakub Kicinski , Matthias Brugger , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH net-next 05/14] net: ethernet: mtk_eth_soc: reduce MDIO bus access latency Message-ID: References: <20210422040914.47788-1-ilya.lipnitskiy@gmail.com> <20210422040914.47788-6-ilya.lipnitskiy@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210422040914.47788-6-ilya.lipnitskiy@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 21, 2021 at 09:09:05PM -0700, Ilya Lipnitskiy wrote: > From: Felix Fietkau > > usleep_range often ends up sleeping much longer than the 10-20us provided > as a range here. This causes significant latency in mdio bus acceses, I found the same with the FEC driver, and make the same change. > Signed-off-by: Felix Fietkau > [Ilya: use readx_poll_timeout_atomic instead of cond_resched] > Signed-off-by: Ilya Lipnitskiy Reviewed-by: Andrew Lunn Andrew