Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751297AbeAELEh (ORCPT + 1 other); Fri, 5 Jan 2018 06:04:37 -0500 Received: from mail-by2nam01on0066.outbound.protection.outlook.com ([104.47.34.66]:27420 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750927AbeAELEf (ORCPT ); Fri, 5 Jan 2018 06:04:35 -0500 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Ioana Radulescu To: CC: , , , , , Subject: [PATCH 0/2] staging: fsl-mc/dpio, fsl-dpaa2/eth: Use affine DPIO services Date: Fri, 5 Jan 2018 05:04:30 -0600 Message-ID: <20180105110432.26813-1-ruxandra.radulescu@nxp.com> X-Mailer: git-send-email 2.11.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131596238467663523;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(346002)(396003)(376002)(39380400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(51416003)(77096006)(105606002)(68736007)(104016004)(106466001)(59450400001)(8656006)(53936002)(5660300001)(97736004)(81166006)(50226002)(39060400002)(16586007)(316002)(6916009)(54906003)(4326008)(2351001)(8936002)(81156014)(356003)(305945005)(86362001)(498600001)(1076002)(48376002)(2906002)(36756003)(50466002)(85426001)(47776003)(8676002);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR03MB2355;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD036;1:jUMS5U36a2q+9wq2Wuuz/4aZ3jO446lxp0deL65yvLQrQC40xIN7YZ31ikve2fQQ0QWspbVac2SCUECGeV5HBhbTUH5zFlVU24m1Nst5hNh5QzM3I4HD9YeL9h1BlE44 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 24001bd0-a741-4953-86a3-08d5542c0a1b X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307);SRVR:BN3PR03MB2355; X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB2355;3:Ywk5xM08pIL0FeM1CSDhbpfV4iCPQAeQ60mKq/kr1/c+nvG6nz8vktkKjtxhea7UWr3Gxy7H6KjXio+yus4SMN3AUg80BhHlEz+DbmUxTt7/pjnRon4QEcelzPwSDTXORJTFSSCFfc7q+UYEQPxacP9hlnLWob+vpGv5zCCeKOLOctY5LYS8UDz6JM9hrhNRQmTxbQWePVLZIUnrXNN9KSpSBZnCkXHsjFYt8V3zeidf3aBoiFnTajDO0TheIawxkfog0p2yLJd+GBQmzS9hAfVTYLCI6eFBuS7PNTsJhvhsRoAWyk01hgh4/CuhO74/5EKIXdY2ypW6xvvZFHTaIHLefiERLivHn8yCD7qWml8=;25:UPpS4g0dmPfKJwsmZVQMgBQT4ORHSIf3VUoBAtXXOBRmn3PMEHPil9rrC3RCyQTd9Pajt8PVLjYUTfSto/DL57R0Q10QABCOtgeJ67O9QnGEFarpnKypWnxjVg+Sj6+NVWinGnlLow8jUQ49HfOYVLqbGMTEdkOw8qlLrpv/ZqVGj3dxrHXBfmqspgWXXN4HzsLskuCkhxgJ0budZTV3ByqhJUJns9K6DP6R8cshap65/uLen3w0f+khbZ6BoLKuj/oZHApXrCCl6aUa6bqb4bj9CBEZvu7nVS03UDerPRg+yqClNxUDWxz5IU98oKu0oO59dHi6pe54otoDEWdMNQ== X-MS-TrafficTypeDiagnostic: BN3PR03MB2355: X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB2355;31:/9700favgIRaA5kFEIJ4b84eP6sWVr0B2nue2D35YBTyKJunGCBkLIGswVSYvZs5t8jmo3MF18PiTklCIkPVmurmpscdMUFdN1Fba+Ys3EXsTRxtccXfZY0yUW/ER+npEeBL45M3wGFr6qLJhkV5wUp2hamtUDQsn7os+KlNUkg5/Rm47w6fhTjBEoRZklOzAW84FoTCDyD+EwpRfHnoXM8NFo7r9aiXrM7hSBE0bM8=;4:AP84cRxfq5x/9sBKyHdo8jFaSJwKUYE/qXb+xgUTuuOKBq6SP9VW/ttciUDlrIgSbV5Z5Khy5k9NIen9upDODCh/ycUMSOvD5KBqeVS28q2MIcWMObI1+y6HgUM6PXhqCtstgUfuEhbUjJ66PhYQxcvgBzs1lx6kwKK7SyR1/sJxsoyQKWDVRZGSUwrKjOSpSUBoGB5wi91Yd43X+oktxq9d5eX9IE5dYmlfsrWuB5zF8a/m9nPEUm3x5w58yxO5WYTcoBLmRDyAowVepsuDEQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095135)(2401047)(8121501046)(5005006)(3231023)(944510075)(944921075)(946801075)(946901075)(3002001)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123559100)(20161123563025)(20161123561025)(20161123556025)(20161123565025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(201708071742011);SRVR:BN3PR03MB2355;BCL:0;PCL:0;RULEID:(100000803101)(100110400095)(400006);SRVR:BN3PR03MB2355; X-Forefront-PRVS: 05437568AA X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN3PR03MB2355;23:pAxY82TOXZzReBkHLFTvE53Kv6b/PX1UWIci3bXOf?= =?us-ascii?Q?mfpPUFUQIehJFKWBcuQUtMnKixHSujRvTGq+o5SHnsBE6LWfm0PqtcZWN35r?= =?us-ascii?Q?/8cfGhudR1LOaf1CcCbTfPKcEItdAv+Yl1QIsEuLIbkSE1rlw31xINMbOjeH?= =?us-ascii?Q?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41DshdPDqm4bg8a?= =?us-ascii?Q?0YofAyEGm5fD0rqiGzZTVh6kEKd?= X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB2355;6:WEak9xRurvYf7+nq32zq1QI6TZzyHR/ucuYWhNhDeyQIRoFrkxi0Vx+pOrG4U38C9Ju6OkjqLB5r7oykUCoxnaJHEOTNUuxLqrljD4lx6otqLp7uBxP8s/zMPUFBtnfQbUgOsI1lt0mvDXETvYru/9GO4Twrwm63aN8xi9rY7/LkxpJvinGETiD7ST5piUaBp5jRAGoO0DUzaX/UHH9QORvTFm4JyLrAXDwArILXOgiPnDQ9/+6q0k9aZUfDb+MUJ55h9qaYMfViS3HE24NBNkbEFRfe2wVgw6UeqBj25+w7S44zjLJjcZrEehzLVqLLf/fwVsPnj3CYGBcntDcH2ExtoHH1ngyLf7XXPGXrrcU=;5:KZsvhhK4sAO9m/hsmv1c0gDWedtecUUwfwszuP/eBb2tt6B48LVVVeTklLAy9bJK65bjXTIKI08W/59LKUn10YGUT+eE5CwzEm84ScrDzRIIzMprikUvSggUuX0a0zPXA/MAYScCkCO0Ck3FTpj1DZAjG3X2Bbhb9dG8tKkpHT0=;24:yZb7tQ0SULELZg91kgUfNZ+UrVBgGdvke0LG7aFIGmyCJ8JwzuuWQdoGgWLhDIqLxTisxyy5Y/xJHwjuzlhis3cS+eW/UbJRvb0+EybTA3c=;7:rXauoKn//nyuzcVvFJQIq3UNU2DhCzCOSrKo8o7CvCK10KtpUXITCnGllyCMwkUXSP3Xc3oMq5Ecw8t/2GVDfAQPLpNRXhLsgkdoEnTndbAWemHjfUvihIbE4HoLSi47GBLoVq2yIRRT6P2QmsK0m68CSKB9NFldA/9rAoXT3kE0f2XmANdWxOCDHaIYVHGe9VWGYB/1t80IITR/VtWDZ4w40x1oPF3N1WBjKf5uuU9LgdpzTbK0UEeAGwnhUYso SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2018 11:04:06.5479 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 24001bd0-a741-4953-86a3-08d5542c0a1b X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB2355 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: The first patch introduces a new DPIO API function allowing the selection of a cpu-affine service. In the second patch, the Ethernet driver uses this new API to map cpu-affine DPIO services to channels. This adds a significant performance boost on the frame dequeue side (see numbers below), but, more importantly, helps us avoid a scenario leading to the kernel running out of memory: In an unidirectional IP forwarding test running on 8cores, with ingress traffic @10Gbps, the rate with which Tx frames are enqueued by the cpu on Tx queues is higher than the rate with which cores manage to dequeue Tx confirmation frames. So these confirmation frames increasingly accumulate on hardware queues, eventually gobbling up all system memory. Enforcing DPIO service affinity takes advantage of the way our hardware was designed to be used, eliminating the bottleneck that caused the imbalance between Rx and Tx processing paths. Performance numbers measured on a LS2088A board with 8cores @2GHz: Bidirectional IP forwarding, 512 flows with 64B frames: 1.68Mpps (before) vs 3.77Mpps (after) Unidirectional IP forwarding, 512 flows with 64B frames: 1.33Mpps (and OOM after ~5-8min) vs 3.72Mpps TCP netperf (client), 256 flows: 17.27Gbps with 100% cpu load vs 18.78Gbps with 77.6% cpu load Ioana Radulescu (2): staging: fsl-mc/dpio: Add dpaa2_io_service_select() API staging: fsl-dpaa2/eth: Use affine DPIO services drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 24 ++++++++++++++---------- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 1 + drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 17 +++++++++++++++++ drivers/staging/fsl-mc/include/dpaa2-io.h | 2 ++ 4 files changed, 34 insertions(+), 10 deletions(-) -- 2.7.4