From: Stephen Hemminger <stephen@networkplumber.org>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, stable@dpdk.org
Subject: Re: [PATCH] spinlock: remove volatile qualifier
Date: Mon, 4 May 2026 10:02:39 -0700 [thread overview]
Message-ID: <20260504100239.07d48122@phoenix.local> (raw)
In-Reply-To: <20260504083714.2904729-1-thomas@monjalon.net>
On Mon, 4 May 2026 10:37:14 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:
> diff --git a/lib/eal/include/generic/rte_spinlock.h b/lib/eal/include/generic/rte_spinlock.h
> index c907d4e45c..19c0e34f0a 100644
> --- a/lib/eal/include/generic/rte_spinlock.h
> +++ b/lib/eal/include/generic/rte_spinlock.h
> @@ -197,8 +197,8 @@ rte_spinlock_trylock_tm(rte_spinlock_t *sl)
> */
> typedef struct {
> rte_spinlock_t sl; /**< the actual spinlock */
> - volatile int user; /**< core id using lock, -1 for unused */
> - volatile int count; /**< count of time this lock has been called */
> + int user; /**< core id using lock, -1 for unused */
> + int count; /**< count of time this lock has been called */
It might make sense to use unsigned for count, and sized types.
I.e do you really need 32 bit values?
Only in tree use of recursive spinlock in vdev code.
PS: I wonder if we really need to keep the transactional memory versions of stuff.
I
next prev parent reply other threads:[~2026-05-04 17:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 8:37 [PATCH] spinlock: remove volatile qualifier Thomas Monjalon
2026-05-04 9:06 ` Thomas Monjalon
2026-05-04 9:12 ` [PATCH] spinlock: fix API comments Thomas Monjalon
2026-05-04 12:46 ` Thomas Monjalon
2026-05-04 17:02 ` Stephen Hemminger [this message]
2026-05-05 7:01 ` [PATCH] spinlock: remove volatile qualifier Thomas Monjalon
2026-05-05 13:24 ` Stephen Hemminger
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=20260504100239.07d48122@phoenix.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox