Re: [PATCH] Implements SPIN_LOCK on ARM

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David CARLIER <devnexen(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Implements SPIN_LOCK on ARM
Date: 2020-12-18 22:14:31
Message-ID: 216939.1608329671@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David CARLIER <devnexen(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2020-12-18 23:56:07 Re: terminate called after throwing an instance of 'std::bad_alloc'
Previous Message David CARLIER 2020-12-18 21:53:20 [PATCH] Implements SPIN_LOCK on ARM