Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6015956pxb; Mon, 14 Feb 2022 13:11:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHS4UDwxvkQKaJDjTzhti+bV46FGK7GCO6KXet1Vv4j4eQnruKThbOlTATY2UaOXpCDeN4 X-Received: by 2002:a17:902:8a90:: with SMTP id p16mr763118plo.60.1644873110866; Mon, 14 Feb 2022 13:11:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1644873110; cv=pass; d=google.com; s=arc-20160816; b=poO4FTgeNmBCuTpllftR3haNKKLFZTE5WHdlkWyR5E2yRqesvXRkaCgEiZqug8eEjs keXwCXdUjXKy5wCRnb4qhP7gJn7oA2N1EQVoP4CNrXgH2QdB+65RtVKFqEZmnPYrRWRG eTPnFpS1A7BHZcS6aPEpOixixI4L/uQYpaVyouk31cXgvKILwildRvhqjtIgRJDEFaSy ZfI7JLW0yed6n58E9W8BW7f5p8KSUezgbnaTWmaqSBHRxqaL4SoiiUX/DeW2WyNU6Z9K ieTZZE2nT5VEXzr49XCldNkM+vDKfz71DtUvrvI04E5KjzubSDTdBv+uH8ZAm/ywcK3g S4Yg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=7s5qj6ZbAYYJo2HZeMMBwMaIySq+Z6lG7jSlAFeUt0k=; b=CKLFvy6/ZYURCeeBzBxz0cNL/6OvySXQydN9Qa24iN6nNoU4DyPgK7qMifmMz1cjl9 ayJjgqIW5QwjwYkldzFl8eoiaM7Cj0upjekJJbJYEWtSkn+vkxtLh5E5Ml2Sp7cJSkEh mBwFYaZ7UGAuuMkpTapcQuj0HY64pWcBfUNlVk1rQznIOR4ix82xZ/p98lNvPHGhEOvm kiYSV6C5EOu2fNglcCw368FwyyVlQJKbAkYHIFl4VihW6QV32ka58xNCXGsPcRXSHilk QhrXzH5/gxgDLbGbtCeYta5kmrwaPudcnTlbLbbUz9Ke0I66xxjdI4bU9sq+vT7GNYr+ KfMA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Ok1QPf7Y; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w9si619821pga.603.2022.02.14.13.11.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 13:11:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Ok1QPf7Y; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2F6301986E7; Mon, 14 Feb 2022 12:32:14 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230373AbiBNKO5 (ORCPT + 99 others); Mon, 14 Feb 2022 05:14:57 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:42060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345779AbiBNKNO (ORCPT ); Mon, 14 Feb 2022 05:13:14 -0500 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130055.outbound.protection.outlook.com [40.107.13.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A909E657A7; Mon, 14 Feb 2022 01:51:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jw6X5MYEb5vqJw1VTPOYyiKLTGczPlCBPimZruUeQTJ6Aj/vghkB3DKfAWiKHnJvdpreconYu3ZC8n6t1oe1fXjfp6Bn0PyJJSSaDoloSo2F81woSm4/C1B61+AUoJ5HdmbwUwHWVJVwp1lAm+eTm5E80LPmzzkuqqWhzgQh9CZcC7QX/h4sFkD16A8G7TglTUzh+OxHahskJ+1a3O7J2nnXlmtdSqC5x3wkgdEFbQmr8Fgyg2jLAww1Rw8yH6SFOMgqriDXDvDkcHs+MNdY54kJDIHgig8URXruubXoaYTgZM2Ffh4HmHa1VpPUj29Sk1qMEH44k8krLBNjtQgsVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7s5qj6ZbAYYJo2HZeMMBwMaIySq+Z6lG7jSlAFeUt0k=; b=cQKUVg9/Vk/lTMIfUoNM4Sl2Q4ji/R5CTYXGWeYeKs3DNToLbuV+hcbzvLrWvkAxjqA8Do6MZyaBRKPKzAZ7XGOHph/S7yLxjUQTr2qZoAEXpnsJugbp12kjDvIWJO3E4XOGQz3g5Mx2tKoYNfyWDWnpuEe+Aj8QMv8e2knt8OdHgTwmF5dJ03e6Nxif219G3kuzLTLmOE7oRWmBYw4eYTnNhq05DbBZ0oL0b9MY/P3tL0oBcM8g1tS//K11DAFC90At+zeO1GfA2uqLf5hU+lXXHtPvwWEDLiMUiT0Ej+i/7T2Y1VuOwSR6X5MHcgZHUDJwS/yQ2aaGEsIoX1R6Nw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7s5qj6ZbAYYJo2HZeMMBwMaIySq+Z6lG7jSlAFeUt0k=; b=Ok1QPf7Y5A0ipfxLzsluY6jcmKysIUlvZ42Qv1gvxpM921Mm1woQonYT0TGi1ag0ehyxQcG+Xf1VcnlTT6aOz9ZZUaq9sBEJlsctFCVlZm4ko8YIraYqX0j8qhkMWiYkllubNpEWmFN+kc3azk87hvnFGAIIh9Jen8Gg5q8mNXU= Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by AM9PR04MB8382.eurprd04.prod.outlook.com (2603:10a6:20b:3ea::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.18; Mon, 14 Feb 2022 09:51:41 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::95cf:8c40:b887:a7b9]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::95cf:8c40:b887:a7b9%4]) with mapi id 15.20.4951.019; Mon, 14 Feb 2022 09:51:40 +0000 From: Vladimir Oltean To: Colin Foster CC: "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , Jakub Kicinski , "David S. Miller" , "UNGLinuxDriver@microchip.com" , Alexandre Belloni , Claudiu Manoil Subject: Re: [PATCH v7 net-next 4/4] net: mscc: ocelot: use bulk reads for stats Thread-Topic: [PATCH v7 net-next 4/4] net: mscc: ocelot: use bulk reads for stats Thread-Index: AQHYIQ3AYXOdYKMSCUmkRckqwTRmUaySztIA Date: Mon, 14 Feb 2022 09:51:40 +0000 Message-ID: <20220214095140.gkltte6lbr7uzoze@skbuf> References: <20220213191254.1480765-1-colin.foster@in-advantage.com> <20220213191254.1480765-5-colin.foster@in-advantage.com> In-Reply-To: <20220213191254.1480765-5-colin.foster@in-advantage.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f0648487-c5a1-4e41-6872-08d9ef9f99de x-ms-traffictypediagnostic: AM9PR04MB8382:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2043; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: m7WmOTpHqC/qYnhjh/1klJCgUMpEuShS9z4X5wUdx7al2xHgbg6kCO9fWkO61QByxakKn8VaePHkY4Ddvhu0YoVcssQ24F1GS+9ag7LJrHw/Y02bWmLIoHq2t1sVmbOpDVmescu2wBl+34PcQ/Rh05S8mOcXXRXelCzTG9gHqTxoCS6EWk7DcUQgtjVjwb+8YgpUTfGDA6HmQxOI41y/GMqvb8Vp8QNv24WuIyH1iiZC4YyMqSqaQdGn15ySDalsdvkHq76BLQuWNlX8f87IByErMnbdVF5+y7gGJvA40VjWD4iGZa0Ximt+LLcO/d1K74779k1v+vneY/XMS65eIEmIok0wAIAicXriXo9lL3KSdYAaSj80plcn6qY2Op9N9Jm6MrMDqtNW5GB7eGqNUbbCD9Y87cY6fi5gWXr57MoDzMBpLsEfW/pxkWR1kfr/+r7A6EMiAVTLfTSiXoOawbNx0dADKdD/pfo2Xob7/6NZYV/Uc6+CKFlx++MVrKkOuS25QV4V2ULb1PB91cyicbjUmrl/GSPM6ADLWvV9S/xpaJ8YvHHg5rrUy9CQb1NbwSYGTLDgFPNiTV3+JCCiS0bxEIQPIm3T6SoA2M1VAwVk+y1cKflp3TRCVLH7aQOYoyIyEDwBFV4FJXkGUkzu6lTSTpXtTzB7bKRff4BM5Bt+pU/1c09xAGeUHbgKOHto2U25vGVReY1L8BD59aXbPA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(7916004)(4636009)(366004)(38100700002)(8936002)(26005)(186003)(86362001)(6506007)(122000001)(38070700005)(71200400001)(2906002)(83380400001)(1076003)(4326008)(91956017)(5660300002)(9686003)(6512007)(44832011)(4744005)(33716001)(508600001)(6486002)(54906003)(6916009)(316002)(76116006)(66476007)(8676002)(66446008)(66946007)(66556008)(64756008);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?SoFwHl+8hHlSJrhmc2bzQf363t1LRlvaMrJvcEoOsVTnv1PtKmgS5HlruP8i?= =?us-ascii?Q?9WRnmq2H8OLBIt193vJo1eGmydEzkk5A8TuegGXLSC/JjuTNo/WJ4MjaB4ow?= =?us-ascii?Q?VTCoDV3SuQnZmmcq1IDQYSU3pirvFNA1yWlJSmTUjU5ATtk4Bs44xIxCHwy3?= =?us-ascii?Q?Egk3N4ncLpAq5XJ68+VFDbGQ+k+IoVtZDschtYuFtEDDyYO+YGuPOtsZIAjT?= =?us-ascii?Q?d1AEW1RSeLWFoY2UUJ0VBOI9LmvfOPDSnqMj7tiAwWtRpx/A4vToPiBVzL1J?= =?us-ascii?Q?Pgl6z4+J2yDcjiw3d3ZOUPex9apkErVLiUMVYfnCBF046qCYrY+V+OLs8At7?= =?us-ascii?Q?Cu39Zr0NIfo9jq9IdUFsVKyUDmBGuhz+7F+kwU90ZmF1J861x2JnKv+1gx/6?= =?us-ascii?Q?BSGoPTdQbbWU9HBlqvsQGxHvgmt67WyEfjOolsqFmuRxb2XfalpTX7MdbB7V?= =?us-ascii?Q?IPbD4OMfXVj9jlJp5s5t7qzTjr1qdWX90/3tf79pnzXANUqVL1kRSPAojJj2?= =?us-ascii?Q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kTXEHh17dYQ?= =?us-ascii?Q?7lm+jGODyfVJyDRSNrcV88Kd/aAYrmOqcJYM226sCICYgQ+UGubnZxEPLxn/?= =?us-ascii?Q?KNLHt0EhnK+b7VXGMU2mCKY4IPCjJMvI7OQU7b1u9Qqo3OEo0GgvGqJPzhG9?= =?us-ascii?Q?OcuTPtbWdetcdsVwG2IYA/6rqLsTxHIH4IdttI8+CtuFIDT+t+q7uR+6iDNw?= =?us-ascii?Q?JXguyze9TpHU1nCJnAIt0Dk=3D?= Content-Type: text/plain; charset="us-ascii" Content-ID: <7F3DADFB82496F47AB8941F075547397@eurprd04.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f0648487-c5a1-4e41-6872-08d9ef9f99de X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Feb 2022 09:51:40.8870 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 69iiEutXixPtTId9+GhsYPTNl7+uZQXWu8Nd/3bZcWXTX8AYAEJ5TSJT7fuaCiiadMuoeOT/FoOxvmr+d1z60Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8382 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Sun, Feb 13, 2022 at 11:12:54AM -0800, Colin Foster wrote: > Create and utilize bulk regmap reads instead of single access for gatheri= ng > stats. The background reading of statistics happens frequently, and over > a few contiguous memory regions. >=20 > High speed PCIe buses and MMIO access will probably see negligible > performance increase. Lower speed buses like SPI and I2C could see > significant performance increase, since the bus configuration and registe= r > access times account for a large percentage of data transfer time. >=20 > Signed-off-by: Colin Foster > --- Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean =