All of lore.kernel.org
 help / color / mirror / Atom feed
From: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
To: "Mattias Rönnblom" <hofors@lysator.liu.se>,
	"Morten Brørup" <mb@smartsharesystems.com>,
	"Mattias Rönnblom" <mattias.ronnblom@ericsson.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "harry.van.haaren@intel.com" <harry.van.haaren@intel.com>,
	nd <nd@arm.com>,
	Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
	nd <nd@arm.com>
Subject: RE: Service core statistics MT safety
Date: Mon, 27 Jun 2022 18:19:16 +0000	[thread overview]
Message-ID: <DBAPR08MB5814937DA34E1EC71B0762FA98B99@DBAPR08MB5814.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <0cfb2d19-ca59-fbba-c428-2e7629da43ec@lysator.liu.se>

<snip>
> >>
> >>> From: Mattias Rönnblom [mailto:mattias.ronnblom@ericsson.com]
> >>> Sent: Monday, 27 June 2022 13.06
> >>>
> >>> Hi.
> >>>
> >>> Is it safe to enable stats on MT safe services?
> >>>
> >>> https://github.com/DPDK/dpdk/blob/main/lib/eal/common/rte_service.c#
> >>> L3
> >>> 6
> >>> 6
> >>>
> >>> It seems to me this would have to be an __atomic_add for this code
> >>> to produce deterministic results.
> >>
> >> I agree. The same goes for the 'calls' field.
> > The calling function does the locking.
> > https://github.com/DPDK/dpdk/blob/main/lib/eal/common/rte_service.c#L3
> > 98
> >
> > For more information you can look at:
> > https://github.com/DPDK/dpdk/blob/main/lib/eal/include/rte_service.h#L
> > 120
> >
> 
> What about the
> https://github.com/DPDK/dpdk/blob/main/lib/eal/common/rte_service.c#L404
> call (for MT safe services)?
> 
> There's no lock held there.
Good point.
This is the case where the service running in service cores is MT safe. However, the stats are incremented outside of the MT Safety mechanism employed by the service. So, yes, this and other updates in the function 'service_runner_do_callback' need to be updated atomically.

  reply	other threads:[~2022-06-27 18:19 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 11:05 Service core statistics MT safety Mattias Rönnblom
2022-06-27 12:31 ` Morten Brørup
2022-06-27 17:39   ` Honnappa Nagarahalli
2022-06-27 17:47     ` Mattias Rönnblom
2022-06-27 18:19       ` Honnappa Nagarahalli [this message]
2022-06-27 20:00         ` Mattias Rönnblom
2022-06-28  0:14           ` Honnappa Nagarahalli
2022-06-28  6:52             ` Mattias Rönnblom
2022-06-28 15:24               ` Honnappa Nagarahalli
2022-06-28 18:30                 ` Mattias Rönnblom
2022-06-28 19:15                   ` Honnappa Nagarahalli
2022-06-29  6:34                     ` Mattias Rönnblom
2022-06-29 20:07                       ` Honnappa Nagarahalli
2022-06-30  8:46                         ` Van Haaren, Harry
2022-07-01 18:37                           ` Honnappa Nagarahalli
2022-07-01 20:51                             ` Morten Brørup
2022-07-05 17:09                               ` Van Haaren, Harry
2022-07-07 17:26                                 ` Honnappa Nagarahalli
2022-07-08 12:58                                   ` Van Haaren, Harry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DBAPR08MB5814937DA34E1EC71B0762FA98B99@DBAPR08MB5814.eurprd08.prod.outlook.com \
    --to=honnappa.nagarahalli@arm.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=hofors@lysator.liu.se \
    --cc=mattias.ronnblom@ericsson.com \
    --cc=mb@smartsharesystems.com \
    --cc=nd@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.