Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp829079rwb; Wed, 14 Dec 2022 03:25:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Hnnk91AWk86zAc2wCm1WQdByFHJij+Zz5j98u1gwMl070d3hp9UyuK+w2GyQaZeO6tSuI X-Received: by 2002:a17:906:b7c6:b0:7c0:d60b:2887 with SMTP id fy6-20020a170906b7c600b007c0d60b2887mr20102728ejb.69.1671017103386; Wed, 14 Dec 2022 03:25:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671017103; cv=none; d=google.com; s=arc-20160816; b=WcGRVZ6o+9107hPmSBEkgvc1WEE+QjxNpPBHmVbOf+qP0tqRz63xaQrESBtTM/2eON LPXtOC58ikZfEyfWS5ZTOCeY9uuoBbxLlPogSiCg6B99TBGpBKc9TPGL+CtUjinMvVE8 gCfzyNPCcz5vPVFZGXjcdwqtgCnGvs58WKx3VmgCMbMj+/8dRVwRgjh0L4P55Zrz831M nGNTcnNPtl1lFNDFc1fHrmZCCz7gmJwtOFSEbxLFtGRw8WGhOoIPlVAg0YSPbA3Y8TmZ wSQpcyVyUhb0qJaCHF6aM1vEfZblzrHYU24vd21/mBL4IBYehw9txHHPESsFSxdQddvo F32w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mLalDC+faDZhVjo0ECWibu1fmKTUBj0rla2gydjMZrM=; b=FxZQ6nCoWFxwXt+8kIQwxQcanZ9rr2vV185Nof2VYYf0UQLLJdeYej4viiqnvl02+i 2grw7mdyvFMuckcKtt+Pt7QZM8ObZoR69p/U6oM9P4hK/7REz40F5IQKW9ARW743toYj Gfu96yl7BxsODY4M8+sLRO/KpoMA3gTHRza5SLcIPlHLWiag5AIEQVLUjHPM6OYVBDqf bUGCTn0ggUPVswUNqBaQax6mHcd49jR2OMvcN13u1ORCLujR5TGafLLsA5LMEGEfHqHG 1gpwzrc991yHscaZbtgbUF68vh5Z6TATBFQMyn4IEfeyIFgx36wKg8AlfVz5Gh3UfX4O YGtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=RxOR8bIy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xd11-20020a170907078b00b007ae0596231esi3245769ejb.789.2022.12.14.03.24.46; Wed, 14 Dec 2022 03:25:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=RxOR8bIy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237356AbiLNKSp (ORCPT + 69 others); Wed, 14 Dec 2022 05:18:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbiLNKSl (ORCPT ); Wed, 14 Dec 2022 05:18:41 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5790610057 for ; Wed, 14 Dec 2022 02:18:33 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id b2so43319972eja.7 for ; Wed, 14 Dec 2022 02:18:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=mLalDC+faDZhVjo0ECWibu1fmKTUBj0rla2gydjMZrM=; b=RxOR8bIy+HJRPAp6Peto06EWFY8DKwNgommhbORx1wsPoAAv6Q8dwMFMj/GLNHQalT EoSgmQuFST1hIYgaG5ATbGo1pfNcoJ6C9+kelhG6oaVeeqvwV9IUy30tRX1zMJRD4X3W vD8lzsXRckJsbMuuc8MSaVb9ceVkqwHt0+leBnqI/NxlVMsNT49H5EK0YTRAnUJIMW7y oNWKZNi959DESwfoZMmIvUO+UrCRXluaioxezFZQiGf3GfZ1Kwt5zI6nqqOxFbPkYStM W/RWRQl8/9lbLor8l3afS8gP0cmWDJ7HV9vQTZ8tB1fVx6bJp/18ITUnM7XMkFyTJgpS DVKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mLalDC+faDZhVjo0ECWibu1fmKTUBj0rla2gydjMZrM=; b=Xmi1gzZr90B+kyYaVszQDNPIdO28GgGiQ0zWNldEJItmyUfTOSwXusuuhf1QRWAF3m UiGdMIj92TRxudgGDLgs1KMaZhXNLdQFUTyyG7lw5rtrpc3LvrIPq77DyvFjd/lbYJJy V15jkaAktGJBTcK8H89PmkR5aBHItqBN7h2nnuVvifsMZWq2VC7SRpJTk6F1ec6bwCHL 2x8fBb47hyVA57xokNlCNMcyL3KA8BvvSN2bohPRlUws5nX8mOjnywzplfpQfQFbzn7T VUO3Adyc9bAgHuPNXfw3uvocK4el0OYl68L7whk548ZPWhKlEADPF419SKF0GW0kGEiY vnuQ== X-Gm-Message-State: ANoB5plVRU7sznkwCrN1Sqlh9zlR/DgW+eD5NH6h+6Njtge0R1TDJRi4 nHwVSnRkBZ7Ct75stLOyF/y6PuoFESGsUDxD X-Received: by 2002:a17:906:144f:b0:7c1:28a9:c277 with SMTP id q15-20020a170906144f00b007c128a9c277mr21590331ejc.6.1671013111900; Wed, 14 Dec 2022 02:18:31 -0800 (PST) Received: from blmsp ([185.238.219.17]) by smtp.gmail.com with ESMTPSA id 17-20020a170906311100b0073d81b0882asm5664082ejx.7.2022.12.14.02.18.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Dec 2022 02:18:31 -0800 (PST) Date: Wed, 14 Dec 2022 11:18:30 +0100 From: Markus Schneider-Pargmann To: Marc Kleine-Budde Cc: Chandrasekar Ramakrishnan , Wolfgang Grandegger , linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Mailhol Subject: Re: [PATCH 02/15] can: m_can: Wakeup net queue once tx was issued Message-ID: <20221214101830.vmujo3js66aozik2@blmsp> References: <20221116205308.2996556-1-msp@baylibre.com> <20221116205308.2996556-3-msp@baylibre.com> <20221130172100.ef4xn6j6kzrymdyn@pengutronix.de> <20221214091406.g6vim5hvlkm34naf@blmsp> <20221214091820.geugui5ws3f7a5ng@pengutronix.de> <20221214092201.xpb3rnwp5rtvrpkr@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221214092201.xpb3rnwp5rtvrpkr@pengutronix.de> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Wed, Dec 14, 2022 at 10:22:01AM +0100, Marc Kleine-Budde wrote: > On 14.12.2022 10:18:20, Marc Kleine-Budde wrote: > > On 14.12.2022 10:14:06, Markus Schneider-Pargmann wrote: > > > Hi Marc, > > > > > > On Wed, Nov 30, 2022 at 06:21:00PM +0100, Marc Kleine-Budde wrote: > > > > On 16.11.2022 21:52:55, Markus Schneider-Pargmann wrote: > > > > > Currently the driver waits to wakeup the queue until the interrupt for > > > > > the transmit event is received and acknowledged. If we want to use the > > > > > hardware FIFO, this is too late. > > > > > > > > > > Instead release the queue as soon as the transmit was transferred into > > > > > the hardware FIFO. We are then ready for the next transmit to be > > > > > transferred. > > > > > > > > If you want to really speed up the TX path, remove the worker and use > > > > the spi_async() API from the xmit callback, see mcp251xfd_start_xmit(). > > > > > > > > Extra bonus if you implement xmit_more() and transfer more than 1 skb > > > > per SPI transfer. > > > > > > Just a quick question here, I mplemented a xmit_more() call and I am > > > testing it right now, but it always returns false even under high > > > pressure. The device has a txqueuelen set to 1000. Do I need to turn > > > some other knob for this to work? > > > > AFAIK you need BQL support: see 0084e298acfe ("can: mcp251xfd: add BQL support"). > > > > The etas_es58x driver implements xmit_more(), I added the Author Vincent > > on Cc. > > Have a look at netdev_queue_set_dql_min_limit() in the etas driver. Thank you, I need to implement BQL, I wasn't aware of that. I may need to delay this a bit just to get some feedback on the current state of my patches, so I know what I need to work on first. But it seems to be just accounting... Anyways, thank you :) Best, Markus