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 EFC8A41BE9; Mon, 6 Feb 2023 10:08:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8972F40FAE; Mon, 6 Feb 2023 10:08:18 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 135E840A7A for ; Mon, 6 Feb 2023 10:08:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675674496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/8QY5meHcKrvrxlJiUZoo3QrLsgmdKtlwjA+16dCKD0=; b=aYWunxOA5oUhE/wLuqiqaWgLGQs54I4Y9Y7pCrPijb73h+knEbM5TeTH6rg80mqyKEh6kZ KSUyMSfaM6yhv51mOmL64/FM0IGX523/tr6vJiOTtZ2h/3cJTPccnf7Ui7ZLHHwfKeMmgV 7UXlVDZ6esyx7cMWhupvUNhoqcwUHAs= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-373-D-Jm_WaROUq6vc4ef-pTQw-1; Mon, 06 Feb 2023 04:08:15 -0500 X-MC-Unique: D-Jm_WaROUq6vc4ef-pTQw-1 Received: by mail-wm1-f72.google.com with SMTP id a20-20020a05600c349400b003dfecb98d38so4613899wmq.0 for ; Mon, 06 Feb 2023 01:08:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=/8QY5meHcKrvrxlJiUZoo3QrLsgmdKtlwjA+16dCKD0=; b=RgkjSq0g8pizVstQ8m2cHdarYcy3vPvIUcXE4dM4nhcmPwgKJB0Prci8oN5buW1ADY xEi1Wy5H9EXfG1azxnnZG46eGTDnrkRGi8QrncKT1+tni844Dd+XKTRHf+LdRyWrqn9n tWzK9G4wbjfyeFk06JXb2GKC/XlP//M8Om/P+NaxVxcjNKSiOEqIExS4MLaN0DUPhQHK +Zh3oq3d8o8TZnNHZzhmjpX8nBLVQexknuqWHOkeJ9CoYX9Q1Dy+3IX626aWns7oLwZD UD5svbQziswIt3QuXjQVqANc8KfiKO416B1lr4ReALoan7Iwz8xo10cy9goUdYclJFne dBcg== X-Gm-Message-State: AO0yUKUieWsH1s7r3ZiQxB70arLJwKIBSJtUS0MMCZsjxzhLNJW3a02v i3hOddECgYj6E3/SldeZjI8mJuGJDxvur4Vx7ludPq3AdYVYUDGYYsaTbidzZ9UhLPzMwgj5t/l d8cU= X-Received: by 2002:adf:d0c9:0:b0:2c3:db9e:4af6 with SMTP id z9-20020adfd0c9000000b002c3db9e4af6mr7642078wrh.42.1675674494340; Mon, 06 Feb 2023 01:08:14 -0800 (PST) X-Google-Smtp-Source: AK7set/4YWaLxOmYpSXOsx77ezGvbNgCMb9HkRyuV79GSzn8RFYQJmVg+csUaUSgi/BxZAM9sfqu0Q== X-Received: by 2002:adf:d0c9:0:b0:2c3:db9e:4af6 with SMTP id z9-20020adfd0c9000000b002c3db9e4af6mr7642071wrh.42.1675674494160; Mon, 06 Feb 2023 01:08:14 -0800 (PST) Received: from localhost (2a01cb000f483e0055ae3800781b5cbc.ipv6.abo.wanadoo.fr. [2a01:cb00:f48:3e00:55ae:3800:781b:5cbc]) by smtp.gmail.com with ESMTPSA id s14-20020adfa28e000000b002c3be49ef94sm8468565wra.52.2023.02.06.01.08.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Feb 2023 01:08:13 -0800 (PST) Mime-Version: 1.0 Date: Mon, 06 Feb 2023 10:08:13 +0100 Message-Id: From: "Robin Jarry" To: "David Marchand" Cc: , =?utf-8?q?Morten_Br=C3=B8rup?= , "Konstantin Ananyev" , "Kevin Laatz" , "Aman Singh" , "Yuying Zhang" Subject: Re: [PATCH v8 4/5] app/testpmd: report lcore usage X-Mailer: aerc/0.14.0-60-gc1f7df1a0e5f-dirty References: <20221123102612.1688865-1-rjarry@redhat.com> <20230202134329.539625-1-rjarry@redhat.com> <20230202134329.539625-5-rjarry@redhat.com> In-Reply-To: X-Mimecast-Spam-Score: 1 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=Flowed 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 David Marchand, Feb 06, 2023 at 09:58: > I have been playing a bit with this series with two lcores, each one > polling a net/null port. > At first it looked good, but then I started to have one idle lcore, by > asking net/null not to receive anything. > > $ build-clang/app/dpdk-testpmd -c 7 --no-huge -m 40 -a 0:0.0 --vdev > net_null1,no-rx=3D1 --vdev net_null2 -- --no-mlockall > --total-num-mbufs=3D2048 -ia --record-core-cycles --nb-cores=3D2 > > One thing that struck me is that an idle lcore was always showing less > "total_cycles" than a busy one. > The more time testpmd was running, the bigger the divergence between > lcores would be. > > Re-reading the API, it is unclear to me (which is the reason for my > comments on patch 2). > Let's first sort out my patch 2 comments and we may revisit this patch > 4 implementation afterwards (as I think we are not accounting some > mainloop cycles with current implementation). Indeed, we are not accounting for all cycles. Only the cycles spent in=20 the packet_fwd_t functions. This was already the case before my series=20 I only added the busy cycles accounting. However, I agree that this should be updated to take all cycles into=20 account (as much as it is possible with the current code base). Maybe=20 this could be done as a separate patch or do you want to include it in=20 this series? > A fwd_lcore object is bound to a single lcore, so this lcore_id is=20 > unneeded. [snip] > You can find which fwd_lcore is mapped to a lcore using existing=20 > structures. This requires updating some helper, something like: I had missed that. Indeed, no need for a new field. I'll address that in=20 v9.