From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6F2FF41EB2; Thu, 16 Mar 2023 18:05:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5D13442D7E; Thu, 16 Mar 2023 18:05:45 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2087.outbound.protection.outlook.com [40.107.237.87]) by mails.dpdk.org (Postfix) with ESMTP id 93C2140DDC for ; Thu, 16 Mar 2023 18:05:44 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WkARUuFUTetA24GaQ5q+qhjlBtx4YuQXcUB+thRxsVGzrGZQQO1KW02Gc8PacamfLXz6Ha1s8is7fj69vd8arHS7aO76VXFTFnXJtKLMETI+URWixLY+f+FQX3ydAr7WIeEUsQcXrrA4s+Mz6yBDyo3j4IpcCmCRopiMUuJMKM06ZbjPjiMjG15j8bAAe7hkQmEkKIIaUfMbOhpKFlE+qk+CZP51XZ+r9xv0jh+wfqItzM/y0IetYuPHZ2Nbgew9C9T4HGy+CaFehhs32ufU1MDIrAVntRMNEfIYTHaK8kzCSy15ysZAEZ4r9ASTlko85FtibcJhJV3gwbtA2Mze8A== 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=MKYDMB4xdVMowPcBc/kZRdu6/7qPlYjxyyF6ceC5saM=; b=m/SdLFsCmjGOfCWRjrfxSeLN+bnRRcViGaqfvFB2o1OwQBX+PlekkcRkQEHI7p26sGUMxhjPm3zjBwY303asCMojjT2zWF1hSmJHa+YudpKfxczl8mgcsU30qTUx2n0eYtocZ6aG61GrC7VDDvnHjlc7BJdifHQBCK0jFjbwTqX0LXcMDB+XTppjG0970DdbDhGkWhGPUpY5/uZIVx8ytsqE0lni6klJR9xq+eTye0WrY+zZImHxto/Ulia5zGIYSVVHPxg6/YRRTek82jwlrmO6qSqROseA5EmZPD8pRL+p6TjXFQA5P2SOM8v04Uh5vMZvRxk4QVkS7GP80ZbuQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MKYDMB4xdVMowPcBc/kZRdu6/7qPlYjxyyF6ceC5saM=; b=zkCadDQoazTuD+QIYlbL+cWkmHLgQ47T8wLTv1dtVIuw89X52xQA7lmBW0yLcm8aKGBsqRvHtb8EOkLQBxog21HtETJ62SF21u973S4JbV9pCgQBBnxLcyqZW+euKRSe7FlYRrdOctBnn3rEgKjuBRw6WwhmwrHJ3AOhUzWUJ6A= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by CH2PR12MB4309.namprd12.prod.outlook.com (2603:10b6:610:a4::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.29; Thu, 16 Mar 2023 17:05:42 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640%5]) with mapi id 15.20.6178.026; Thu, 16 Mar 2023 17:05:42 +0000 Message-ID: <98399365-a3ab-9ade-4102-22e3582e2358@amd.com> Date: Thu, 16 Mar 2023 17:05:33 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH 2/2] app/testpmd: add testpmd based sleeping Content-Language: en-US To: Anthony Harivel , Aman Singh , Yuying Zhang Cc: dev@dpdk.org, rjarry@redhat.com, david.marchand@redhat.com, ktraynor@redhat.com References: <20230316151438.186241-1-aharivel@redhat.com> <20230316151438.186241-2-aharivel@redhat.com> From: Ferruh Yigit In-Reply-To: <20230316151438.186241-2-aharivel@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0072.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2af::21) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CH2PR12MB4309:EE_ X-MS-Office365-Filtering-Correlation-Id: 224ca53e-e85f-4085-a9ec-08db2640ac8c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 54o2TQAjpg6h8WZh1dEme7ripasRTkYrWWEDVIdw6XKXjIZANm9BwK2zY9GhkYvBVXJ7XnvtTa1D8O+1B1uIZyTXZfJCzSnZJBHaYuTgFTMSDeu6pgxdkpgEdef0/2wt9UXDpUpVIaoJbOaJQ1Rnq6dvRw/y91bRxPS3YLJlGLqHztYyRhhTKFC7hOFISYrUW08Cq50gR2af/9TqhBxMiwE0tf/axtFVNLIOGCKlHlgxUkKc797268xV7VzGVFxWIHLikR3KQznZ2ajJC+IUUBNbRLenxb7VpxJmQxA7KYf7lG+Al66ZYYog2RskuZKYFgMif2q9z2UaadT1Xpa9kbaAEo1Uhgm9Lgz4yvzaOLl/EnN6mY78qsd7fp7sKVA/kRlUV7dnQBZGMlt/Hw9dP8OTgZC+QHT30w/BK1mVcAe0Agdb1ajbDBEzRYpXo3BbO/QKpEH3b24ijGvHGhK+Amf8SsV9wtTca08YZloZvWUa+P0nBDVCqBNi5hi8GLb7QXPdiYYes5KwlbFCKO6EQzg37IDRJ1ecjquGeF37s/6KONXW3ifvIB2Mrc4VvRrN9v0IcR/zgdadBGlmavG9dkfBJTEOPBHQ8xMEHr/f9CW32Vl5jIkpnW8kinc8qWqj5tX53HvJFpqZWKKC2XyACF7nyaLq/lskumdZ/DzH3UkgUmnA6OAmihXD8yX0KNI3huj9gI0ON46drWaE9F39V2YqH1N9dKIyRp8xnx1dFHs= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(376002)(39860400002)(366004)(136003)(346002)(396003)(451199018)(31686004)(36756003)(41300700001)(8936002)(5660300002)(4326008)(44832011)(2906002)(31696002)(86362001)(6666004)(478600001)(66946007)(66556008)(966005)(6486002)(8676002)(66476007)(6506007)(26005)(110136005)(316002)(83380400001)(2616005)(6512007)(186003)(53546011)(38100700002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?M2hpbTMraWJPYXB1Um5wSmh4eWlHZVlpVTBQVGFiTXM2WVFPcmp3NDlPSGZo?= =?utf-8?B?R0RVcWU2RDNuaW9DejNSZkp4ZnlId2FYWVRMcCt1M2lUMFg1RG1BYklLcCtw?= =?utf-8?B?RDcxTVZ6OXBFdnNmZ080SHAydjJxZmcyOVdpUVJ2TjFVVTBEWDZPcVJrL2dG?= =?utf-8?B?YkRJNGp2cmNIaHk0d0I2TVdHTEdIWFZPcmNSS0pISXgvRVVWTnNlQTZJdExu?= =?utf-8?B?a3lNb21yMTY0VDVDU1FlV2p6RDliSW5Cd3RZbzlCaE1say9tN1V0e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zhOQzFPRk9wcmliMU1PaFFwbUJQRWNySjRnSjF0eEphVVNsZnFt?= =?utf-8?Q?L66CvMi8w38UYd72byOpHZTAl?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 224ca53e-e85f-4085-a9ec-08db2640ac8c X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2023 17:05:42.3946 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iUeUqr2JXLe6H4tRw/HuOXBLJXWFO9bKgscnd4yUQPLhQzQhHzKpLXlc01De+S8N X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4309 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 3/16/2023 3:14 PM, Anthony Harivel wrote: > Sleep for an incremental amount of time if the fwd engine has processed > less than at least half a burst of packets (i.e 16pkts with default > setting) on a polling iteration of testpmd. > > Upon detecting the threshold of >= 16 pkts on an Rxq, reset the sleep > time to zero (i.e. no sleep). > > Sleep time will be increased on each iteration where the low load > conditions remain up to a total of the max sleep time which is set by > the user with the "--max-sleep-us NUM" command line argument or when in > interactive "mode set max_sleep NUM". > > The default max_sleep value is 0, which means that no sleeps will occur > and the default behaviour is unchanged from previously. > > Testing has been performed on AMD EPYC 7702 server with --nb-cores 12. > The results were obtained via turbostat for each individual lcore: > > max_sleep 0 ====== ======== ======== ======== > idle 4Mpps 16Mpps Bursts > =============== ====== ======== ======== ======== > C1-state % 0 0 0 0 > C2-state % 0 0 0 0 > % usage 100 100 100 100 > Watt / core 1.14 1.18 1.19 1.14 > =============== ====== ======== ======== ======== > > max_sleep 500 ====== ======== ======== ======== > idle 4Mpps 16Mpps Bursts > =============== ====== ======== ======== ======== > C1-state % 99 85 74 98.6 > C2-state % 0 0 0 0 > % usage 1 15 26 1 > Watt / core 0.04 0.18 0.28 0 04 > =============== ====== ======== ======== ======== > > max_sleep 1000 ====== ======== ======== ======== > idle 4Mpps 16Mpps Bursts > =============== ====== ======== ======== ======== > C1-state % 0 85 74 0.3 > C2-state % 99 0 0 97.6 > % usage 1 15 25 1 > Watt / core 0.02 0.18 0.28 0 02 > =============== ====== ======== ======== ======== > > On most cases, the consumption of the cores is greatly improved while > still performing zero packet loss. > > Latency test has been performed on each tests above. The CPU has a C1 > latency of 1us and a C2 latency of 400us. On the worst case scenario, Tx > Burst of thousands packets every seconds, the following latency in us > (micro seconds) has been observed: > > =========== ==== ===== ====== > max_sleep 0 500 1000 > ----------- ---- ----- ------ > max latency 14 560 1260 > min latency 5 5 6 > Avg latency 7 305 617 > =========== ==== ===== ====== > > link: https://www.github.com/torvalds/linux/tree/master/tools/power/x86/turbostat > Signed-off-by: Anthony Harivel Hi Anthony, What is the motivation here?