Message ID | 20221221152537.751564-1-msp@baylibre.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp3585927wrn; Wed, 21 Dec 2022 07:26:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXvgDCM22R5AjL+QPazxW9a+dwS8WEBbyLHKvg9x7pPkfd9BlIj600okOZCEFP/wv+G2nmYP X-Received: by 2002:aa7:880e:0:b0:56c:cde:1a44 with SMTP id c14-20020aa7880e000000b0056c0cde1a44mr20066512pfo.11.1671636398638; Wed, 21 Dec 2022 07:26:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671636398; cv=none; d=google.com; s=arc-20160816; b=ZO94tSjtInED9qHuluj2wFKux13b29MXKOvK/n8n6BMyKBw8Ie4Sz+NAm9nrNInIzZ J1cKIcMJnHwBO6gQBgRjf14gzbcRmy6vi3QT2qki5Spae/5IUhcVmSrIyi1GVbAmClQ8 PHT4qWDfDfvOtlOKtjnl+x+f7YEZgr36tngR9ASQa4IB/kSGPwuGZJvMWiU0yuN6hLuf XkNyemJBV3LUlPF+L6vmxp43Y2Rz0pPwfezYJSUbROqp+Q6Yw6NlDOLnQ0/tclZ4ozuG oJs9kQuzDXA1Vi7Xa3OPWKRqBcEGMZPpVd7Ys9yFW1JwKojuJrmEgW8jq/1du9yOiFIt 8/5A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=e2mkku343U5D/UFeX6GPxNJ2xnofRb9nj6juvn1mIAg=; b=0z93jBA7DqFJSfXrMzi9mgU2gv3KGujUWHAZPhyep/0XPHWiEg4rO3K7yEj3htsg+I AirOOF79OSZjbp27o+D6aG+9pIiujcL9XyjkQEyhKsVsPOmDRk56nTsKiqeGlnyYU/rr x2QQFgsv8jB5CWdoiEVBD/v71HERxQBgXcYGKp/6wBwtgoBhtLu1jJAT38UU5jYgdC2c bJ3CN3PtSz5/D/MwmSWVKSf4po86QX443/lV6/jbnRAhoYf6zzv35lrDilaWSxlM/qBx uV5LpNSRfdyzR+CjlNiq2f6u8HypPrtmfQeH5hLMK0tXJ2ZjvrFVJbH+/+S9EYuEQSb+ A71Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b="UabexA0/"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 127-20020a621985000000b0057791522cb6si15318681pfz.275.2022.12.21.07.26.25; Wed, 21 Dec 2022 07:26:38 -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="UabexA0/"; 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 S234610AbiLUPZr (ORCPT <rfc822;pacteraone@gmail.com> + 99 others); Wed, 21 Dec 2022 10:25:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229679AbiLUPZo (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 21 Dec 2022 10:25:44 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62B78E0D for <linux-kernel@vger.kernel.org>; Wed, 21 Dec 2022 07:25:42 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id d20so22555992edn.0 for <linux-kernel@vger.kernel.org>; Wed, 21 Dec 2022 07:25:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=e2mkku343U5D/UFeX6GPxNJ2xnofRb9nj6juvn1mIAg=; b=UabexA0/CRsCXfwCSv8pNmuh3PvQl3OpCyLgITIz3S7q1+tTnGdqNfTJzjgg62mRcI gxE9n6cdka3y/Fh1yel4m+5E5DDpMCTQP+rVgZ9bqfGv+RMwjkgY4jApbfwLX7ls5+B2 kqPw7ixGW+u4cvthuLYRoGocxctUnOsI+sbyenES+ObkJ304Kb6IfJYVBxoPQjVVeMKJ W0tE6IXzzdUGVjolKsHBnZRSJHJePZPQUJAse8fjNQ5ptJvRZ71WNZhq7tBxRmcQ6tMB HRsEypzKIgHLmGB+u7B1GUET2xgkfxqfTf0OZC3HY0Pn5Hh5ZyWpYRb9Tg0S8cKLpLIi zDcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=e2mkku343U5D/UFeX6GPxNJ2xnofRb9nj6juvn1mIAg=; b=lA3p8pA+KshsuJG+g/moQ7SAxqZIPRU6bZu1uPlgm9H0Kzuy29Z256IDa+y9qaUAr2 ynbqhLmpJgCV5sTfzsy6HCla4VSot0R0Rfg3nFy4hVNsSlQ5fzyOpviABhmJMlNV0LTW BQ8g6FYAeN7HGklX0249mPDeEgDM78u2na5t4ubYD23IK/AV32lsoYZlNSe2uRrjvFag 0qFaVVc52VTQWWy7RXyzx01wRMpdMGhZ9McgGMGTpzWowi1P60o+QvkdlRunhzDc0rbB G3tIXVfSQlES3yhJ2h2Ixbs5fUVv9eSO43hBcNMsuBJ1ZjHi5Wb+NMnCEt86gj8723JE eKcQ== X-Gm-Message-State: AFqh2krX+8npbc/tAVPwNO0pm2ySiDTS00EyuAOLfTxeOSbGbxOr270j XMSMdAmBDzHiEbqEvoV+2nu0dQ== X-Received: by 2002:a05:6402:5285:b0:45c:834b:eb5f with SMTP id en5-20020a056402528500b0045c834beb5fmr2082155edb.42.1671636340912; Wed, 21 Dec 2022 07:25:40 -0800 (PST) Received: from blmsp.fritz.box ([2001:4091:a245:805c:8713:84e4:2a9e:cbe8]) by smtp.gmail.com with ESMTPSA id n19-20020aa7c793000000b0045cf4f72b04sm7105428eds.94.2022.12.21.07.25.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Dec 2022 07:25:40 -0800 (PST) From: Markus Schneider-Pargmann <msp@baylibre.com> To: Marc Kleine-Budde <mkl@pengutronix.de>, Chandrasekar Ramakrishnan <rcsekar@samsung.com>, Wolfgang Grandegger <wg@grandegger.com> Cc: Vincent MAILHOL <mailhol.vincent@wanadoo.fr>, linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Schneider-Pargmann <msp@baylibre.com> Subject: [PATCH 00/18] can: m_can: Optimizations for m_can/tcan part 2 Date: Wed, 21 Dec 2022 16:25:19 +0100 Message-Id: <20221221152537.751564-1-msp@baylibre.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752837808571451862?= X-GMAIL-MSGID: =?utf-8?q?1752837808571451862?= |
Series |
can: m_can: Optimizations for m_can/tcan part 2
|
|
Message
Markus Schneider-Pargmann
Dec. 21, 2022, 3:25 p.m. UTC
Hi Marc and everyone, this is the second part now. I know it is the merge window right now but I am quite sure this won't be merged immediately anyways, so if you have some time for some comments I would appreciate it. So it is still based on v6.1-rc8 + the patches that got applied. I tried to do as small patches as possible so it is easier to understand. The series changed a lot compared to v1 I sent so I didn't call it v2. There are a lot of new patches as well. The series contains a few small fixes and optimizations at the beginning, then adding coalescing support and at the end removing the restrictions on the number of parallel transmits in flight. Note that the last patch 'Implement transmit submission coalescing' does not perform well for me in a loopback testing setup. However I think it may work well in normal testcases. I attached this mechanism to the tx-frames coalescing option, let me know if this is the correct option. Best, Markus part 1: v1 - https://lore.kernel.org/lkml/20221116205308.2996556-1-msp@baylibre.com v2 - https://lore.kernel.org/lkml/20221206115728.1056014-1-msp@baylibre.com Markus Schneider-Pargmann (18): can: tcan4x5x: Remove reserved register 0x814 from writable table can: tcan4x5x: Check size of mram configuration can: m_can: Remove repeated check for is_peripheral can: m_can: Always acknowledge all interrupts can: m_can: Remove double interrupt enable can: m_can: Disable unused interrupts can: m_can: Keep interrupts enabled during peripheral read can: m_can: Write transmit header and data in one transaction can: m_can: Implement receive coalescing can: m_can: Implement transmit coalescing can: m_can: Add rx coalescing ethtool support can: m_can: Add tx coalescing ethtool support can: m_can: Cache tx putidx can: m_can: Use the workqueue as queue can: m_can: Introduce a tx_fifo_in_flight counter can: m_can: Use tx_fifo_in_flight for netif_queue control can: m_can: Implement BQL can: m_can: Implement transmit submission coalescing drivers/net/can/m_can/m_can.c | 498 ++++++++++++++++++------ drivers/net/can/m_can/m_can.h | 36 +- drivers/net/can/m_can/tcan4x5x-core.c | 5 + drivers/net/can/m_can/tcan4x5x-regmap.c | 1 - 4 files changed, 418 insertions(+), 122 deletions(-)
Comments
Hi everyone, On Wed, Dec 21, 2022 at 04:25:19PM +0100, Markus Schneider-Pargmann wrote: > Hi Marc and everyone, > > this is the second part now. I know it is the merge window right now but > I am quite sure this won't be merged immediately anyways, so if you have > some time for some comments I would appreciate it. So it is still based > on v6.1-rc8 + the patches that got applied. > > I tried to do as small patches as possible so it is easier to > understand. The series changed a lot compared to v1 I sent so I didn't > call it v2. There are a lot of new patches as well. > > The series contains a few small fixes and optimizations at the > beginning, then adding coalescing support and at the end removing the > restrictions on the number of parallel transmits in flight. > > Note that the last patch 'Implement transmit submission coalescing' does > not perform well for me in a loopback testing setup. However I think it > may work well in normal testcases. I attached this mechanism to the > tx-frames coalescing option, let me know if this is the correct option. I introduced a bug in this series in the internal m_can driver (not peripheral) and maybe for older m_can versions as well. No need to review at the moment, I will send a new version once they are fixed. Best, Markus > > Best, > Markus > > part 1: > v1 - https://lore.kernel.org/lkml/20221116205308.2996556-1-msp@baylibre.com > v2 - https://lore.kernel.org/lkml/20221206115728.1056014-1-msp@baylibre.com > > Markus Schneider-Pargmann (18): > can: tcan4x5x: Remove reserved register 0x814 from writable table > can: tcan4x5x: Check size of mram configuration > can: m_can: Remove repeated check for is_peripheral > can: m_can: Always acknowledge all interrupts > can: m_can: Remove double interrupt enable > can: m_can: Disable unused interrupts > can: m_can: Keep interrupts enabled during peripheral read > can: m_can: Write transmit header and data in one transaction > can: m_can: Implement receive coalescing > can: m_can: Implement transmit coalescing > can: m_can: Add rx coalescing ethtool support > can: m_can: Add tx coalescing ethtool support > can: m_can: Cache tx putidx > can: m_can: Use the workqueue as queue > can: m_can: Introduce a tx_fifo_in_flight counter > can: m_can: Use tx_fifo_in_flight for netif_queue control > can: m_can: Implement BQL > can: m_can: Implement transmit submission coalescing > > drivers/net/can/m_can/m_can.c | 498 ++++++++++++++++++------ > drivers/net/can/m_can/m_can.h | 36 +- > drivers/net/can/m_can/tcan4x5x-core.c | 5 + > drivers/net/can/m_can/tcan4x5x-regmap.c | 1 - > 4 files changed, 418 insertions(+), 122 deletions(-) > > -- > 2.38.1 >