From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 13286A052E; Mon, 9 Mar 2020 07:52:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 766491C030; Mon, 9 Mar 2020 07:51:57 +0100 (CET) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80043.outbound.protection.outlook.com [40.107.8.43]) by dpdk.org (Postfix) with ESMTP id 87AC41BFF9 for ; Mon, 9 Mar 2020 07:51:47 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JA1/cmVcjTjH3fZeT1XzXMZQbuDs3QefW8oORtW34jsjeKFljHjT0vcI7Q32bNvU4hdIEfYi6jdz29cTOJS934QBWUbJz8QE1qnPU1JWwwp7ZIBRKUD2y33ifB935/jrMJm7+7KQkdq1naAvSKE0OB29R5ureR/JGrt9D9JlVPezYYECrct3/2eNnf5YM7vUX68GnUcVrD2c7b5CPf4U8r1Klt/6jgr9iodgb7czSrFdGNHprOyIZHUR/BtVYD4EqrbowHwTK5vRQn8EAsVoT1eLQHKGN1H9hnKImMFbPezpkbFpgcEo0v4/Ckxu2PO659MVrOIbrHidBk1vxolKTA== 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-SenderADCheck; bh=tsoqNto0JVw5YaNJuoTlN/Tewx+qYxRVFbCPlo5Ij7E=; b=QY+KvEQYkEnsf88VJQG3pxyl/h1Xc9ngPPYVY71CV2MFC3ojqy+2WNdJUH+vNXtbNixx1KnwdGthkC72lUbCgHpyLPDH5FP8kaVhXmlzY3H13h2avi8h3gLg7C9ezpGhMbW9ypK+KsJgxu7nElR4cUPAkggxQvewJHM1llHBH2PrSrB8sZt3KFwYbLN+WwufUuhQEJr/uS8FatOYJ1eeQph0hr+8Gi1w5HjaNoTuHYHVKKoq06rXZl8kFBVgITJs9+9n941YXFsrit9yDta2AoP/TK37fxuyaXB85QaIiQpBdl7NApeuZf5jkvR4QAixmOTtllsypjj7qVNJfpmy8g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.176.1.74) smtp.rcpttodomain=arm.com smtp.mailfrom=ericsson.com; dmarc=pass (p=reject sp=none pct=100) action=none header.from=ericsson.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tsoqNto0JVw5YaNJuoTlN/Tewx+qYxRVFbCPlo5Ij7E=; b=JCu0K/WQ0MRahJkKgIbFJBOonj55htlJyOa8OQGWi7uARMT2u4O4EPwETwOHvftR4q7e9jhNC4yKp4Ge9DDXtAKNmnPRXBHierfMPq6prJSNy0kpLgyDbiEWPRD/UPjyv62x3G/tGDWcbb+YNFCPsF2doRvvHLltKgbNNoNT+ms= Received: from AM6PR0202CA0071.eurprd02.prod.outlook.com (2603:10a6:20b:3a::48) by AM0PR07MB4450.eurprd07.prod.outlook.com (2603:10a6:208:7a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.9; Mon, 9 Mar 2020 06:51:46 +0000 Received: from HE1EUR02FT025.eop-EUR02.prod.protection.outlook.com (2603:10a6:20b:3a:cafe::ac) by AM6PR0202CA0071.outlook.office365.com (2603:10a6:20b:3a::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.16 via Frontend Transport; Mon, 9 Mar 2020 06:51:46 +0000 Authentication-Results: spf=pass (sender IP is 192.176.1.74) smtp.mailfrom=ericsson.com; arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=pass action=none header.from=ericsson.com; Received-SPF: Pass (protection.outlook.com: domain of ericsson.com designates 192.176.1.74 as permitted sender) receiver=protection.outlook.com; client-ip=192.176.1.74; helo=oa.msg.ericsson.com; Received: from oa.msg.ericsson.com (192.176.1.74) by HE1EUR02FT025.mail.protection.outlook.com (10.152.10.79) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2793.11 via Frontend Transport; Mon, 9 Mar 2020 06:51:46 +0000 Received: from ESESBMB503.ericsson.se (153.88.183.170) by ESESBMR504.ericsson.se (153.88.183.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 9 Mar 2020 07:51:43 +0100 Received: from selio1a020.lmera.ericsson.se (153.88.183.153) by smtp.internal.ericsson.com (153.88.183.186) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Mon, 9 Mar 2020 07:51:43 +0100 Received: from breslau.lmera.ericsson.se (breslau.lmera.ericsson.se [150.132.109.241]) by selio1a020.lmera.ericsson.se (8.15.1+Sun/8.15.1) with ESMTP id 0296pgIL024126; Mon, 9 Mar 2020 07:51:43 +0100 (CET) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: CC: , , , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Date: Mon, 9 Mar 2020 07:50:59 +0100 Message-ID: <20200309065106.23800-2-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200309065106.23800-1-mattias.ronnblom@ericsson.com> References: <20200309065106.23800-1-mattias.ronnblom@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.176.1.74; IPV:; CTRY:SE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(346002)(39860400002)(376002)(396003)(136003)(199004)(189003)(107886003)(6916009)(54906003)(316002)(36756003)(478600001)(4326008)(70206006)(70586007)(356004)(2906002)(6666004)(2616005)(956004)(336012)(8676002)(246002)(5660300002)(86362001)(8936002)(26005)(186003)(1076003)(7636002)(21314003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR07MB4450; H:oa.msg.ericsson.com; FPR:; SPF:Pass; LANG:en; PTR:office365.se.ericsson.net; A:1; MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f55fde8f-378e-4e66-f53e-08d7c3f655b2 X-MS-TrafficTypeDiagnostic: AM0PR07MB4450: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-Forefront-PRVS: 0337AFFE9A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZHOmzmdDusv1j9yTiq1y02n+nyFT96fIz6Jh6nYoVMZwVFtlMyWrj9bDn/FruGw/MWegTeBg7uaiYvV7mBj4x9QsLfsl4mWGGFoT7raOQYBEZbElBV+t/3GrWW0gq3BPY/2Zu8P/A0e3WZj9u1pmsUZ5ZJdP3bb9d2Tj72BDjGlMX9PUYm/l21GcavSe/XRBVNOx34VZsxWkZe8lMARDnSnpC1uKTaO7JUicYpC67/w8f41qkY5KHne+nRfxkLXJhcMi2mWnJdys/1ygr+AOO9j3waRTKVB2KTaAxvNUXXeMhN3WhVXcxEYkA9I+T6FWNNmULfYhsu90DYSCGBp5AdSbKuyLVcgoLuGdd+e+imZ35QGz3atZJKXoQtytw/Ho1UFTG+hY2opn+6ew1My6c3LYFjMCeDaJpRLEn3yiGu6UJkuWAhYS4AS6XbHhKQ4CVV2Q97y1MDVBhKuiUFTeG7BEeJjdLrVJNWNk/fAiXDoJIJioqp8YBPF85ipeCTos X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2020 06:51:46.3036 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f55fde8f-378e-4e66-f53e-08d7c3f655b2 X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=92e84ceb-fbfd-47ab-be52-080c6b87953f; Ip=[192.176.1.74]; Helo=[oa.msg.ericsson.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR07MB4450 Subject: [dpdk-dev] [PATCH 1/8] event/dsw: reduce latency in low-load situations X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In DSW, in case a port can't produce any events for the application to consume, the port is considered idle. To slightly reduce wall-time latency, flush the port's output buffer in case of such an empty dequeue. Signed-off-by: Mattias Rönnblom --- drivers/event/dsw/dsw_event.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c index 296adea18..7f1f29218 100644 --- a/drivers/event/dsw/dsw_event.c +++ b/drivers/event/dsw/dsw_event.c @@ -1245,11 +1245,11 @@ dsw_event_dequeue_burst(void *port, struct rte_event *events, uint16_t num, * seem to improve performance. */ dsw_port_record_seen_events(port, events, dequeued); - } - /* XXX: Assuming the port can't produce any more work, - * consider flushing the output buffer, on dequeued == - * 0. - */ + } else /* Zero-size dequeue means a likely idle port, and thus + * we can afford trading some efficiency for a slightly + * reduced event wall-time latency. + */ + dsw_port_flush_out_buffers(dsw, port); #ifdef DSW_SORT_DEQUEUED dsw_stable_sort(events, dequeued, sizeof(events[0]), dsw_cmp_event); -- 2.17.1