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 AB1BC45C73; Mon, 4 Nov 2024 11:17:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 121C940E18; Mon, 4 Nov 2024 11:17:16 +0100 (CET) Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) by mails.dpdk.org (Postfix) with ESMTP id F1AB54021F; Mon, 4 Nov 2024 11:17:13 +0100 (CET) Received: by mail-qt1-f177.google.com with SMTP id d75a77b69052e-460ad98b043so31995131cf.1; Mon, 04 Nov 2024 02:17:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730715433; x=1731320233; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=zvAoetT5FEa87Xpm9NQB1qJfo0tVQLczKfSh7W+vaz4=; b=nfZe0DrBf769ELOT55//BtA8siqp07k4Kr97FrCEuSL6yVCUyZ150hLtCmjDaxaQ71 9SIt/BqRuhrh6MONZu7N+DQZ4kbO4Y1nONl+vgVGbkPO3pQmOVnl5Wl2PoZdA9rnuE2M 13dCchtql4BcQpOBLUpIvEf61aZ5SslpOyKgzD+dmT/kSUEAlTHXYjAPtmPmPiQTcO82 6QTe8/znsGSho9QOD4fr2HpgeGvucE4sz7AjqI++4G4EQzYlWQ8YgZOVpLgopQM9rZk1 lm4TA7EvNt0Va5qcsD9W+OAzfyLOcsyIP/AHmBC/NCMWwrboPix6FH7eV6RrcD+ELN17 OCbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730715433; x=1731320233; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zvAoetT5FEa87Xpm9NQB1qJfo0tVQLczKfSh7W+vaz4=; b=UTA+yybc2O1zWamAdMvv3UwlGntt0xzpX0j3xFUv8rcEb7wBWePM9SmaVv9G0o385J dG/xwJeAIb4NGbkNTr+kg5IpPKe6aS3XYehmBeKtS6mt+RjjoD8sUnZZUtZSx6M7BXzj b0D8haCAwoJK94K1zxEUQldtwWG9rkjNwfHz/Jqh+vGChPuvBgebRCYfWRBuhPgrL1A1 E8XV374gA5OFPSPJt5aj85scuYr1+olKekS01aOyaqa8Rb1gao89v1Z86fzWtiLaDG8S 7gZbBuwnmHucRyJc83GDQ/h1n2bnQ0Nvn9iNujd5fRhgtyberSIH/75PP4Dj1VvYamRX FXXw== X-Forwarded-Encrypted: i=1; AJvYcCUesyBDFwCmi/ugEuZpXJWgLBfuXJ5obsz5xDdbKphZ5JpeaRBTyr+Ha982k+PlvTl4UYiMOLEm@dpdk.org, AJvYcCXOYskNOzMU+DA/TmvmO3D75x/5H9N/wGM3mw0+fScqb8Xe6Ji2ONep85zYSfTa7lrQxzc=@dpdk.org X-Gm-Message-State: AOJu0Yxh+NM9XJiZljy1RdnstHJygnmDzW8taQOKtfnL0oJ0KvYy4GHl jBDeJMndQx51/FDtKkv/6ptkiCRVtHKJwEh2RQ052nGHk6fTunBZEsisPs17apA2HL83ow/HSX0 YjNyOBF3vqlKHtfDgLCQf8xy4PfY= X-Google-Smtp-Source: AGHT+IH8rQlznUVZvveYmppo1L7zmEtpk0pyDPfaASq01jff7VHwPqy4Xr7CY3I617Ps3489M3xcVfSW7uH+iVAWABk= X-Received: by 2002:ac8:7e84:0:b0:461:6613:18ac with SMTP id d75a77b69052e-462b6c2e761mr173436451cf.17.1730715433187; Mon, 04 Nov 2024 02:17:13 -0800 (PST) MIME-Version: 1.0 References: <20240811065819.575759-1-rkudurumalla@marvell.com> <20240811155957.576645-1-rkudurumalla@marvell.com> <20240811091719.37512e55@hermes.local> In-Reply-To: From: Nithin Dabilpuram Date: Mon, 4 Nov 2024 15:47:00 +0530 Message-ID: Subject: Re: [EXTERNAL] Re: [PATCH v5 1/1] examples/l2fwd-jobstats: fix lock availability To: Rakesh Kudurumalla Cc: Stephen Hemminger , "ferruh.yigit@amd.com" , "andrew.rybchenko@oktetlabs.ru" , "orika@nvidia.com" , "thomas@monjalon.net" , "dev@dpdk.org" , Jerin Jacob , Nithin Kumar Dabilpuram , "stable@dpdk.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Acked-by: Nithin Dabilpuram On Mon, Oct 21, 2024 at 12:43=E2=80=AFPM Rakesh Kudurumalla wrote: > > ping > > > -----Original Message----- > > From: Rakesh Kudurumalla > > Sent: Friday, August 16, 2024 10:55 AM > > To: Stephen Hemminger > > Cc: ferruh.yigit@amd.com; andrew.rybchenko@oktetlabs.ru; > > orika@nvidia.com; thomas@monjalon.net; dev@dpdk.org; Jerin Jacob > > ; Nithin Kumar Dabilpuram > > ; stable@dpdk.org > > Subject: RE: [EXTERNAL] Re: [PATCH v5 1/1] examples/l2fwd-jobstats: fix= lock > > availability > > > > > > > > > -----Original Message----- > > > From: Stephen Hemminger > > > Sent: Sunday, August 11, 2024 9:47 PM > > > To: Rakesh Kudurumalla > > > Cc: ferruh.yigit@amd.com; andrew.rybchenko@oktetlabs.ru; > > > orika@nvidia.com; thomas@monjalon.net; dev@dpdk.org; Jerin Jacob > > > ; Nithin Kumar Dabilpuram > > > ; stable@dpdk.org > > > Subject: [EXTERNAL] Re: [PATCH v5 1/1] examples/l2fwd-jobstats: fix > > > lock availability > > > > > > On Sun, 11 Aug 2024 21:=E2=80=8A29:=E2=80=8A57 +0530 Rakesh Kudurumal= la > > > > marvell.=E2=80=8Acom> wrote: > Race condition between jobstats and ti= me > > > metrics > for forwarding and flushing is maintained using spinlock. > > > > Timer metrics are not displayed > > > On Sun, 11 Aug 2024 21:29:57 +0530 > > > Rakesh Kudurumalla wrote: > > > > > > > Race condition between jobstats and time metrics for forwarding and > > > > flushing is maintained using spinlock. > > > > Timer metrics are not displayed properly due to the frequent > > > > unavailability of the lock.This patch fixes the issue by introducin= g > > > > a delay before acquiring the lock in the loop. This delay allows fo= r > > > > betteravailability of the lock, ensuring that show_lcore_stats() ca= n > > > > periodically update the statistics even when forwarding jobs are > > > > running. > > > > > > > > Fixes: 204896f8d66c ("examples/l2fwd-jobstats: add new example") > > > > Cc: stable@dpdk.org > > > > > > > > Signed-off-by: Rakesh Kudurumalla > > > > > > Would be better if this code used RCU and not a lock > > > > Currently the jobstats app uses the lock only for collecting single sna= pshot of > > different statistics and printing the same from main core. With RCU sin= ce we > > cannot pause the worker core to collect such a single snapshot, integra= ting > > RCU would need a full redesign of the application and would take lot of > > effort.