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 93C7C45733; Sun, 11 Aug 2024 18:17:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C171400D7; Sun, 11 Aug 2024 18:17:24 +0200 (CEST) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id 52973400D5 for ; Sun, 11 Aug 2024 18:17:22 +0200 (CEST) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1fc587361b6so28418635ad.2 for ; Sun, 11 Aug 2024 09:17:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1723393041; x=1723997841; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=tXdKvxjGp7vG+ATRB/T5zQuI9ZhMPmZDPfZ/UuUO+2Y=; b=Bk3niJoGvedDgWO+UNQ2vbA2xtneCs3Q1G2AmNNrnwjTX0jgmfUTVR7z8pu58dpFT8 fFiKEy1eOISqoI82DuK2glLGagvMgeCKAjM8ImFtX4ny7EEFYzK3LnJKH7c9lidA0g5M KEdtYWUdB2VqSP5SAfBoqII6zSD+677lHO22DsAcRr4WOoMbAEZCREfFgA/tftI2Ehl1 jH8+JXHbglox47Joq5Ce9mvo6T9qTevKZKHqNv4xX/op5i+yVCEFlgwTEtLHbPQ+FEzz bVdCjwMrgnxho9/TKBMm5PH+FvuzH7CCi5efonzQF9Gv1c417K7p6WJJaN6BbPuMToxp FTag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723393041; x=1723997841; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tXdKvxjGp7vG+ATRB/T5zQuI9ZhMPmZDPfZ/UuUO+2Y=; b=gGNH+2hcJ8DActUqhfrwKpTeX4H7C6JRHY6ZQ/sDbxYp0IZHPvxhOn9Lj+B2QQuGQx ba1guJ6UjvbGb+N4k/S6AzTEzNySWcFfIq6XDxyvIw5xwO1kcqUvg3B6f+JmUA2Bhlci Gn9lY0e7svjlWTZBUn6vlHk6bA+jY/Z7GFL5cSQS+ZMer01HNb6rKIl9tEjhTp37j2HW +yb7D9tuChLQ1cRbNNYApP8XHGoo6iURQD5vyMuUHox6kPSJQRDcUZxfiXtflDDeb55D jc7UG/EgUY716I9FfGn59Untp/MKkZM4FX6WPKhCTviWpZDZl952rfqCDXtLCbum/pc9 aKpQ== X-Forwarded-Encrypted: i=1; AJvYcCUpvO8iIJlnuImX1R+X2EdWAfrI4e4Ea3KCK7oOt4Ao+KxJD1cMtNmCJ083ok2YNlqk8jwwtAclddZpYlw= X-Gm-Message-State: AOJu0YzI6SiX/LpUycxMnjCxYy/isk+XyCquBONBtN4Aw9whr6aTCSjU Nzl1wst7WUo8NQx3lDX9ZWiab76j5oKUU34QMWOWFTCHcxWSU+0h2b3V63o8ZA0= X-Google-Smtp-Source: AGHT+IEOrd0gGPyXMWyiSLaDnHUF/Kx9X30/1o0YjeKJ/DBgn1f+f5AsfkT73DcVg7/io3nC+VkdJQ== X-Received: by 2002:a17:903:1c1:b0:1fd:8c25:415d with SMTP id d9443c01a7336-200ae5cfea6mr46811875ad.36.1723393041289; Sun, 11 Aug 2024 09:17:21 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-200bba01937sm24333825ad.200.2024.08.11.09.17.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Aug 2024 09:17:21 -0700 (PDT) Date: Sun, 11 Aug 2024 09:17:19 -0700 From: Stephen Hemminger To: Rakesh Kudurumalla Cc: , , , , , , , Subject: Re: [PATCH v5 1/1] examples/l2fwd-jobstats: fix lock availability Message-ID: <20240811091719.37512e55@hermes.local> In-Reply-To: <20240811155957.576645-1-rkudurumalla@marvell.com> References: <20240811065819.575759-1-rkudurumalla@marvell.com> <20240811155957.576645-1-rkudurumalla@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 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 introducing a delay before acquiring > the lock in the loop. This delay allows for betteravailability > of the lock, ensuring that show_lcore_stats() can > 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