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 A206DA0543; Sat, 3 Sep 2022 15:33:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4570C40A7F; Sat, 3 Sep 2022 15:33:30 +0200 (CEST) Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) by mails.dpdk.org (Postfix) with ESMTP id 9E23A40698 for ; Sat, 3 Sep 2022 15:33:28 +0200 (CEST) Received: by mail-qt1-f170.google.com with SMTP id r6so3409794qtx.6 for ; Sat, 03 Sep 2022 06:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=D+jgViRvJk7qFdfSsr19D57JGqBP62+yUDqqPJm+Okw=; b=pRO1ChH+tWHppZgCT/0lpkg7pLlI4AhFS3n3zdX67HDSFa3cR6J3WUogSOd0o5g/MP 9l6UHVcTuEkFwC118Avxw6sTDkiI1ewEkMHPS/EfFUq4nSlN9N0zFvWYUHf670+mdQpI 1N3e2Y/tjlxFbBxpaBLksBwS5aHykiwXTsfsl39OTlSQdhXsL8LZtjMXQLfS/lxVrrj9 5JW8azCHDt0x3pYyUrMaqYkCS7DFn8sSWKe181ynU4lOvmRtkwIsfydNjct5+rfHpjeA Uq6xo5QRvli7hFqGCwgC8fGI4Bxj9K3I+jkXJ10i/+ACB75PH1ESz5dx2hXnv82lERK8 HzJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=D+jgViRvJk7qFdfSsr19D57JGqBP62+yUDqqPJm+Okw=; b=y1ZR2k9qN2EA6Sszutr16lwYld2WQbT0EioSHVhzfg2KmP11WRoRaRqMxpJJ7HaM5s JM/QvMAjAVhsHBltt9gUrqaWboWhbdWK+qrhgZROOAHlN+3lP9SqhpVwrO5yC3/znAw6 wDMuNEUL7ObSHNT0/HhQzI/20lgWK45EXnbQZq2s5kjOmuxpheVNvdXUsXrbhbMNxIK4 96oL9fA9B/7h8fTt5ISeuDriYFTbpKDBQouUUuEAIXlTgCh4dPadG4Hrpj6TOAfDnvwv uliy9SB8Zg/G6ieEqAxHlTe7Du8NrBoTctlp3sWQib3Z8wSVctqGzrac6IiirtdKLgFG N+/g== X-Gm-Message-State: ACgBeo2DVh53Y5SipQVN51wHqf0dTCW5CuusIbwRRNtLNgWtkGH7hk+k OkdQZKfHQq3q1Tjccw2Mq5G6xqx/831i0rCShGE= X-Google-Smtp-Source: AA6agR6TVjazpSe9AkvdQcMZK5c/c0fKni9AuqtNvLGGw5Odq+i38xP6nzXNcGPVLlfZDdMhYKmjNhIM3wpkoHSsQF4= X-Received: by 2002:ac8:5cc4:0:b0:344:688f:f06f with SMTP id s4-20020ac85cc4000000b00344688ff06fmr31749528qta.502.1662212007895; Sat, 03 Sep 2022 06:33:27 -0700 (PDT) MIME-Version: 1.0 References: <24c49429394294cfbf0d9c506b205029bac77c8b.1657890378.git.anatoly.burakov@intel.com> <20220902155827.79076-1-kevin.laatz@intel.com> <20220902155827.79076-2-kevin.laatz@intel.com> In-Reply-To: <20220902155827.79076-2-kevin.laatz@intel.com> From: Jerin Jacob Date: Sat, 3 Sep 2022 19:03:01 +0530 Message-ID: Subject: Re: [PATCH v5 1/3] eal: add lcore poll busyness telemetry To: Kevin Laatz Cc: dpdk-dev , Anatoly Burakov , Conor Walsh , David Hunt , Bruce Richardson , Nicolas Chautru , Fan Zhang , Ashish Gupta , Akhil Goyal , Chengwen Feng , Ray Kinsella , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Jerin Jacob , Sachin Saxena , Hemant Agrawal , Ori Kam , Honnappa Nagarahalli , Konstantin Ananyev Content-Type: text/plain; charset="UTF-8" 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 Fri, Sep 2, 2022 at 9:26 PM Kevin Laatz wrote: > > From: Anatoly Burakov > > Currently, there is no way to measure lcore poll busyness in a passive way, > without any modifications to the application. This patch adds a new EAL API > that will be able to passively track core polling busyness. > > The poll busyness is calculated by relying on the fact that most DPDK API's > will poll for work (packets, completions, eventdev events, etc). Empty > polls can be counted as "idle", while non-empty polls can be counted as > busy. To measure lcore poll busyness, we simply call the telemetry > timestamping function with the number of polls a particular code section > has processed, and count the number of cycles we've spent processing empty > bursts. The more empty bursts we encounter, the less cycles we spend in > "busy" state, and the less core poll busyness will be reported. > > In order for all of the above to work without modifications to the > application, the library code needs to be instrumented with calls to the > lcore telemetry busyness timestamping function. The following parts of DPDK > are instrumented with lcore poll busyness timestamping calls: > > - All major driver API's: > - ethdev > - cryptodev > - compressdev > - regexdev > - bbdev > - rawdev > - eventdev > - dmadev > - Some additional libraries: > - ring > - distributor > > To avoid performance impact from having lcore telemetry support, a global > variable is exported by EAL, and a call to timestamping function is wrapped > into a macro, so that whenever telemetry is disabled, it only takes one > additional branch and no function calls are performed. It is disabled at > compile time by default. > > This patch also adds a telemetry endpoint to report lcore poll busyness, as > well as telemetry endpoints to enable/disable lcore telemetry. A > documentation entry has been added to the howto guides to explain the usage > of the new telemetry endpoints and API. > > Signed-off-by: Kevin Laatz > Signed-off-by: Conor Walsh > Signed-off-by: David Hunt > Signed-off-by: Anatoly Burakov This version looks good to me. Thanks for this new feature. I think, we need to add a UT for this new rte_lcore_poll_* APIs also add a performance test case to measure the cycles for RTE_LCORE_POLL_BUSYNESS_TIMESTAMP [1] [1] Reference performance test application for trace: app/test/test_trace_perf.c