Re: [PATCH] Implements SPIN_LOCK on ARM - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Implements SPIN_LOCK on ARM
Date
Msg-id 216939.1608329671@sss.pgh.pa.us
Whole thread Raw
In response to [PATCH] Implements SPIN_LOCK on ARM  (David CARLIER <devnexen@gmail.com>)
List pgsql-hackers
David CARLIER <devnexen@gmail.com> writes:
> Hi here a little update proposal for ARM architecture.

This sort of thing is not a "little proposal" where you can just
send in an unsupported patch and expect it to be accepted.
You need to provide some evidence that (a) it actually does anything
useful and (b) it isn't a net loss on some ARM architectures.

For comparison's sake, see

https://www.postgresql.org/message-id/flat/CAB10pyamDkTFWU_BVGeEVmkc8%3DEhgCjr6QBk02SCdJtKpHkdFw%40mail.gmail.com

where we still haven't pulled the trigger despite a great deal
more than zero testing.

FWIW, some casual googling suggests that ARM "yield" is not
all that much like x86 "pause": it supposedly encourages
the system to swap control away from the thread altogether,
exactly what we *don't* want in a spinloop.  So I'm a little
doubtful whether there's a case to be made for this at all.
But for sure, you haven't tried to make a case.

            regards, tom lane



pgsql-hackers by date:

Previous
From: David CARLIER
Date:
Subject: [PATCH] Implements SPIN_LOCK on ARM
Next
From: Justin Pryzby
Date:
Subject: Re: terminate called after throwing an instance of 'std::bad_alloc'