[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2cd81800-12ba-460e-ac28-4532d0be1ec9@intel.com>
Date: Mon, 14 Jul 2025 06:54:50 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: "Reshetova, Elena" <elena.reshetova@...el.com>
Cc: "jarkko@...nel.org" <jarkko@...nel.org>,
"seanjc@...gle.com" <seanjc@...gle.com>, "Huang, Kai" <kai.huang@...el.com>,
"mingo@...nel.org" <mingo@...nel.org>,
"linux-sgx@...r.kernel.org" <linux-sgx@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>, "Mallick, Asit K"
<asit.k.mallick@...el.com>,
"Scarlata, Vincent R" <vincent.r.scarlata@...el.com>,
"Cai, Chong" <chongc@...gle.com>, "Aktas, Erdem" <erdemaktas@...gle.com>,
"Annapurve, Vishal" <vannapurve@...gle.com>,
"dionnaglaze@...gle.com" <dionnaglaze@...gle.com>,
"Bondarevska, Nataliia" <bondarn@...gle.com>,
"Raynor, Scott" <scott.raynor@...el.com>
Subject: Re: [PATCH v7 5/5] x86/sgx: Enable automatic SVN updates for SGX
enclaves
On 7/14/25 00:35, Reshetova, Elena wrote:
> I think you put it: this would require a spinlock in the fast path and
> *in theory* if we are running many many concurrent enclaves can create
> contention
FWIW, my mental model is that spinlocks that are held for short periods
of time are pretty much the same cost as an atomic under contention.
If there are lots of users, the cost of moving the cacheline for the
atomic or the spinlock dominates everything else. It doesn't matter
whether that cacheline is an atomic_t or spinlock_t.
The only difference is that there is _visible_ spinning for a spinlock.
Powered by blists - more mailing lists