Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3589251pxp; Tue, 8 Mar 2022 18:12:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJwTVgCkf2X0yCnyoQBDPsRuaqdAl5qY08sh9C6aZXVJ0K/gijMwSKmhcr/VLcn4u0KoYLEL X-Received: by 2002:a62:78d7:0:b0:4f7:d87:9016 with SMTP id t206-20020a6278d7000000b004f70d879016mr10876379pfc.73.1646791972557; Tue, 08 Mar 2022 18:12:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646791972; cv=none; d=google.com; s=arc-20160816; b=pIgpol26AtAPndnFxKdG1LkJUxBgxwkS4dirg8OGFKIq/b96AlgxilElX5doFcmhcX 3bODZorvT0q0qlpxyyiZmX491v2wWBdfrx/biBV5k4Ia40Bz6+GkRbNTnB/hAdktvc8C NpE5/hwmhJLm9agnMvUaXP7Q5aU+GjOGYoRlNeps4Jgkk7/7xX5UpYAIckUpxb45Gxqa KTMitKEECydWLXAooBGR6B3R5I+V13M4tiPfYjPON5a4202uqMYv3O+fNqNTk6UzVAO4 1AUdZ2Jl9N/u5dl3eWLx5K6CI7Y41Jebk75UjxID0s4v04Y68HQsBRphIf9IyTjBXwQt yolQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=hLlWjEY2kNaVnY1Udf/xXFzZMULMBlypFScaJhb4KtM=; b=HGv4C/Rmgl4jfNZQ8viS08LJFYNH+gXNdIF2ScPQQyj7xey5fMy5i/Y7ICvMx0LUfp IXwXfjHe8QmdOoH6vs/6/ANkjt+qnUn6T1dC+432ovfQiQv8TPZ8xofOUzpnTfqEVl1h wF+/XwnsmAuYYvIZjTZIz+T4wQm5FfIxzjeBILMnXHaE421AKgvIePJ3upVeokFRB3Xc 1UmuBfNxPNWIX9hLDWaylqw2dSlY578EXP1zikGuakau5CH9hVuT0oBYEc4Snh9RQbDO HWN3wMli6T8SrxTFQ6j3MsRPGhYf9YDMT974HjbWD9KZHBY7J53Pj1Rw2OScBLoZj1hs +nwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ts0iiMK/"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s20-20020a056a00195400b004e1b7d97a51si562058pfk.140.2022.03.08.18.12.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 18:12:52 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ts0iiMK/"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 284E2166E11; Tue, 8 Mar 2022 17:02:23 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229659AbiCIBDD (ORCPT + 99 others); Tue, 8 Mar 2022 20:03:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbiCIBCt (ORCPT ); Tue, 8 Mar 2022 20:02:49 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 989A326B5A3; Tue, 8 Mar 2022 16:40:28 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7ED47612F0; Wed, 9 Mar 2022 00:40:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DFB9C340EB; Wed, 9 Mar 2022 00:40:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646786426; bh=td/REnltt/bdfkFO3iQ1pNa5fzMHBJX93HnYjIUNMU0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ts0iiMK/LYgr5rc7RY5U3A8NnMAovEaaS73DZr34O+wVOTcSdSKsR1X3z649tFqLE 6/FNGf8SK9ISttNNHTCR+nvmP+Jt+viPEfHxxvZgskWyAfutOVHhKAQw7O76sQjhNW ygtEoBhIRsxADOtxPEig3LBtt9Uj8D1a4jik129qzlOj6B+u0KvptshvxHj4rHkshD p95uuimevOO+c39T+i99lUTK83ssNIIAB2eKedUAv20+5jLMjhEB1vVZnW4zfA/5Ce ybW2vwLAG+lk1w9lIGk7vQhhqtaSdh8CEVdyRVvt7wpqoBM/AAgGtm7fDlxEL/4XSP hKwMlyNnQ+mTA== Date: Tue, 8 Mar 2022 16:40:24 -0800 From: Jakub Kicinski To: Horatiu Vultur Cc: Andrew Lunn , , , , Subject: Re: [PATCH net-next] net: lan966x: Improve the CPU TX bitrate. Message-ID: <20220308164024.5f65b426@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20220308223000.vwdc6tk6wa53x64c@soft-dev3-1.localhost> References: <20220308165727.4088656-1-horatiu.vultur@microchip.com> <20220308223000.vwdc6tk6wa53x64c@soft-dev3-1.localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 8 Mar 2022 23:30:00 +0100 Horatiu Vultur wrote: > > > static int lan966x_port_inj_ready(struct lan966x *lan966x, u8 grp) > > > { > > > - u32 val; > > > + unsigned long time = jiffies + usecs_to_jiffies(READL_TIMEOUT_US); > > > + int ret = 0; > > > > > > - return readx_poll_timeout_atomic(lan966x_port_inj_status, lan966x, val, > > > - QS_INJ_STATUS_FIFO_RDY_GET(val) & BIT(grp), > > > - READL_SLEEP_US, READL_TIMEOUT_US); > > > + while (!(lan_rd(lan966x, QS_INJ_STATUS) & > > > + QS_INJ_STATUS_FIFO_RDY_SET(BIT(grp)))) { > > > + if (time_after(jiffies, time)) { > > > + ret = -ETIMEDOUT; > > > + break; > > > + } > > > > Did you try setting READL_SLEEP_US to 0? readx_poll_timeout_atomic() > > explicitly supports that. > > I have tried but it didn't improve. It was the same as before. Huh, is ktime_get() super expensive on that platform? jiffies vs ktime seems to be the main difference?