Deutsch   English   Français   Italiano  
<vrvegn$fv9$2@reader1.panix.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail
From: cross@spitfire.i.gajendra.net (Dan Cross)
Newsgroups: comp.arch
Subject: Re: MSI interrupts
Date: Tue, 25 Mar 2025 23:33:43 -0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID: <vrvegn$fv9$2@reader1.panix.com>
References: <vqto79$335c6$1@dont-email.me> <e4ecfb53ef4f33f10b6d2548d5930159@www.novabbs.org> <vrva4r$9ka$1@reader1.panix.com> <jwvjz8coho7.fsf-monnier+comp.arch@gnu.org>
Injection-Date: Tue, 25 Mar 2025 23:33:43 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80";
	logging-data="16361"; mail-complaints-to="abuse@panix.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: cross@spitfire.i.gajendra.net (Dan Cross)

In article <jwvjz8coho7.fsf-monnier+comp.arch@gnu.org>,
Stefan Monnier  <monnier@iro.umontreal.ca> wrote:
>Dan Cross [2025-03-25 22:19:07] wrote:
>> From what I gather, you've said to just eschew the atomic event
>> stuff and build a traditional lock using those primitives.  But
>> you have also said that a traditional lock can be silently
>> unlocked if the thread holding it (which, apparently, is an
>> abstraction known to hardware) is preempted.  It will be like
>> the lock had never been acquired.
>
>Here's the misunderstanding: the lock that can be silently taken away
>is the lock implemented in the CPU to run an ATOMIC sequence, not the
>lock implemented as a data-structure on top of it: once you've run
>(atomically) your `lock_acquire`, of course that lock is yours.  The CPU
>doesn't even know that this data-structure is a lock and has no
>way to steal it.

I hope you are right, and I'd like Mitch to confirm.

Even so, I don't see the point of the proposed atomic framework.
It seems to have no significant advantage over a more
traditional scheme; CAS, LL-SC, whatever seem more general and
less intertwined with primitives that the hardware has no real
business injecting itself into (like threads).

	- Dan C.