[EXTERNAL] Re: [PATCH v5 1/1] examples/l2fwd-jobstats: fix lock availability

Rakesh Kudurumalla rkudurumalla at marvell.com
Mon Oct 21 09:13:19 CEST 2024


ping

> -----Original Message-----
> From: Rakesh Kudurumalla
> Sent: Friday, August 16, 2024 10:55 AM
> To: Stephen Hemminger <stephen at networkplumber.org>
> Cc: ferruh.yigit at amd.com; andrew.rybchenko at oktetlabs.ru;
> orika at nvidia.com; thomas at monjalon.net; dev at dpdk.org; Jerin Jacob
> <jerinj at marvell.com>; Nithin Kumar Dabilpuram
> <ndabilpuram at marvell.com>; stable at dpdk.org
> Subject: RE: [EXTERNAL] Re: [PATCH v5 1/1] examples/l2fwd-jobstats: fix lock
> availability
> 
> 
> 
> > -----Original Message-----
> > From: Stephen Hemminger <stephen at networkplumber.org>
> > Sent: Sunday, August 11, 2024 9:47 PM
> > To: Rakesh Kudurumalla <rkudurumalla at marvell.com>
> > Cc: ferruh.yigit at amd.com; andrew.rybchenko at oktetlabs.ru;
> > orika at nvidia.com; thomas at monjalon.net; dev at dpdk.org; Jerin Jacob
> > <jerinj at marvell.com>; Nithin Kumar Dabilpuram
> > <ndabilpuram at marvell.com>; stable at dpdk.org
> > Subject: [EXTERNAL] Re: [PATCH v5 1/1] examples/l2fwd-jobstats: fix
> > lock availability
> >
> > On Sun, 11 Aug 2024 21: 29: 57 +0530 Rakesh Kudurumalla
> <rkudurumalla@ 
> > marvell. com> wrote: > Race condition between jobstats and time
> > 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 <rkudurumalla at marvell.com> 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 at dpdk.org
> > >
> > > Signed-off-by: Rakesh Kudurumalla <rkudurumalla at marvell.com>
> >
> > Would be better if this code used RCU and not a lock
> 
> Currently the jobstats app uses the lock only for collecting single snapshot of
> different statistics and printing the same from main core. With RCU since we
> cannot pause the worker core to collect such a single snapshot, integrating
> RCU would need a full redesign of the application and would take lot of
> effort.


More information about the dev mailing list