Re: Memory ordering

Liste des GroupesRevenir à c arch 
Sujet : Re: Memory ordering
De : chris.m.thomasson.1 (at) *nospam* gmail.com (Chris M. Thomasson)
Groupes : comp.arch
Date : 19. Nov 2024, 00:20:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vhgi4p$1fms3$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
User-Agent : Mozilla Thunderbird
On 11/17/2024 11:11 PM, Anton Ertl wrote:
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
What if you had to write code for a weakly ordered system, and the
performance guidelines said to only use a membar when you absolutely
have to. If you say something akin to "I do everything using
std::memory_order_seq_cst", well, that is a violation right off the bat.
...
I am trying to say you might not be hired if you only knew how to handle
std::memory_order_seq_cst wrt C++... ?
 I am not looking to be hired.
 In any case, this cuts both ways: If you are an employer working on
multi-threaded software, say, for Windows or Linux, will you reduce
your pool of potential hires by including a requirement like the one
above?  And then pay for longer development time and additional
hard-to-find bugs coming from overshooting the requirement you stated
above.  Or do you limit your software support to TSO hardware (for
lack of widely available SC hardware), and gain all the benefits of
more potential hires, reduced development time, and fewer bugs?
 I have compared arguments against strong memory ordering with those
against floating-point.  Von Neumann argued for fixed point as follows
<https://booksite.elsevier.com/9780124077263/downloads/historial%20perspectives/section_3.11.pdf>:
 |[...] human time is consumed in arranging for the introduction of
|suitable scale factors. We only argue that the time consumed is a
|very small percentage of the total time we will spend in preparing an
|interesting problem for our machine. The first advantage of the
|floating point is, we feel, somewhat illusory. In order to have such
|a floating point, one must waste memory capacity which could
|otherwise be used for carrying more digits per word.
 Kahan writes <https://people.eecs.berkeley.edu/~wkahan/SIAMjvnl.pdf>:
 |Papers in 1947/8 by Bargman, Goldstein, Montgomery and von Neumann
|seemed to imply that 40-bit arithmetic would hardly ever deliver
|usable accuracy for the solution of so few as 100 linear equations in
|100 unknowns; but by 1954 engineers were solving bigger systems
|routinely and getting satisfactory accuracy from arithmetics with no
|more than 40 bits.
 The flaw in the reasoning of the paper was:
 |To solve it more easily without floating–point von Neumann had
|transformed equation Bx = c to B^TBx = B^Tc , thus unnecessarily
|doubling the number of sig. bits lost to ill-condition
 This is an example of how the supposed gains that the harder-to-use
interface provides (in this case the bits "wasted" on the exponent)
are overcompensated by then having to use a software workaround for
the harder-to-use interface.
well, if you used std::memory_order_seq_cst to implement, say, a mutex and/or spinlock memory barrier logic, well, that would raise a red flag in my mind... Not good.

Date Sujet#  Auteur
28 Oct 24 * Arm ldaxr / stxr loop question135jseigh
31 Oct 24 +- Re: Arm ldaxr / stxr loop question1MitchAlsup1
31 Oct 24 +- Re: Arm ldaxr / stxr loop question1Chris M. Thomasson
1 Nov 24 +* Re: Arm ldaxr / stxr loop question123aph
2 Nov 24 i`* Re: Arm ldaxr / stxr loop question122Chris M. Thomasson
8 Nov 24 i `* Re: Arm ldaxr / stxr loop question121Chris M. Thomasson
9 Nov 24 i  `* Re: Arm ldaxr / stxr loop question120Chris M. Thomasson
9 Nov 24 i   +* Re: Arm ldaxr / stxr loop question117Chris M. Thomasson
9 Nov 24 i   i+- Re: Arm ldaxr / stxr loop question1Chris M. Thomasson
11 Nov 24 i   i+* Re: Arm ldaxr / stxr loop question5MitchAlsup1
11 Nov 24 i   ii+- Re: Arm ldaxr / stxr loop question1Michael S
11 Nov 24 i   ii`* Re: Arm ldaxr / stxr loop question3jseigh
11 Nov 24 i   ii `* Re: Arm ldaxr / stxr loop question2Chris M. Thomasson
13 Nov 24 i   ii  `- Re: Arm ldaxr / stxr loop question1Chris M. Thomasson
11 Nov 24 i   i+- Re: Arm ldaxr / stxr loop question1Michael S
12 Nov 24 i   i+- Re: Arm ldaxr / stxr loop question1Chris M. Thomasson
12 Nov 24 i   i+* Re: Arm ldaxr / stxr loop question22aph
13 Nov 24 i   ii+* Re: Arm ldaxr / stxr loop question18Chris M. Thomasson
13 Nov 24 i   iii`* Re: Arm ldaxr / stxr loop question17aph
13 Nov 24 i   iii +* Re: Arm ldaxr / stxr loop question3jseigh
13 Nov 24 i   iii i`* Re: Arm ldaxr / stxr loop question2aph
13 Nov 24 i   iii i `- Re: Arm ldaxr / stxr loop question1Chris M. Thomasson
13 Nov 24 i   iii +- Re: Arm ldaxr / stxr loop question1MitchAlsup1
13 Nov 24 i   iii +* Re: Arm ldaxr / stxr loop question2Chris M. Thomasson
13 Nov 24 i   iii i`- Re: Arm ldaxr / stxr loop question1Chris M. Thomasson
13 Nov 24 i   iii +* Re: Arm ldaxr / stxr loop question2Chris M. Thomasson
13 Nov 24 i   iii i`- Re: Arm ldaxr / stxr loop question1Chris M. Thomasson
13 Nov 24 i   iii `* Re: Arm ldaxr / stxr loop question8Terje Mathisen
13 Nov 24 i   iii  +* Brilliance (was: Arm ldaxr / stxr loop question)4Anton Ertl
13 Nov 24 i   iii  i+- Re: Brilliance1BGB
14 Nov 24 i   iii  i`* Re: Brilliance2Terje Mathisen
17 Nov 24 i   iii  i `- Re: Brilliance1Thomas Koenig
13 Nov 24 i   iii  `* Re: Arm ldaxr / stxr loop question3aph
14 Nov 24 i   iii   `* Re: Arm ldaxr / stxr loop question2Terje Mathisen
15 Nov 24 i   iii    `- Re: Arm ldaxr / stxr loop question1Chris M. Thomasson
13 Nov 24 i   ii`* Re: Arm ldaxr / stxr loop question3BGB
13 Nov 24 i   ii `* Re: Arm ldaxr / stxr loop question2Chris M. Thomasson
13 Nov 24 i   ii  `- Re: Arm ldaxr / stxr loop question1Robert Finch
14 Nov 24 i   i`* Re: Arm ldaxr / stxr loop question86Kent Dickey
14 Nov 24 i   i `* Re: Arm ldaxr / stxr loop question85aph
15 Nov 24 i   i  +* Re: Arm ldaxr / stxr loop question81Chris M. Thomasson
15 Nov 24 i   i  i`* Re: Arm ldaxr / stxr loop question80aph
15 Nov 24 i   i  i +- Re: Arm ldaxr / stxr loop question1Chris M. Thomasson
15 Nov 24 i   i  i `* Memory ordering (was: Arm ldaxr / stxr loop question)78Anton Ertl
15 Nov 24 i   i  i  +* Re: Memory ordering44Chris M. Thomasson
15 Nov 24 i   i  i  i`* Re: Memory ordering43Michael S
15 Nov 24 i   i  i  i `* Re: Memory ordering42Chris M. Thomasson
16 Nov 24 i   i  i  i  `* Re: Memory ordering41Chris M. Thomasson
16 Nov 24 i   i  i  i   +- Re: Memory ordering1Chris M. Thomasson
17 Nov 24 i   i  i  i   `* Re: Memory ordering39jseigh
17 Nov 24 i   i  i  i    +* Re: Memory ordering33Anton Ertl
19 Nov 24 i   i  i  i    i`* Re: Memory ordering32Chris M. Thomasson
3 Dec 24 i   i  i  i    i `* Re: Memory ordering31Anton Ertl
3 Dec 24 i   i  i  i    i  `* Re: Memory ordering30jseigh
3 Dec 24 i   i  i  i    i   `* Re: Memory ordering29MitchAlsup1
4 Dec 24 i   i  i  i    i    +* Re: Memory ordering22Stefan Monnier
4 Dec 24 i   i  i  i    i    i+* Re: Memory ordering3MitchAlsup1
4 Dec 24 i   i  i  i    i    ii`* Re: Memory ordering2Stefan Monnier
4 Dec 24 i   i  i  i    i    ii `- Re: Memory ordering1MitchAlsup1
4 Dec 24 i   i  i  i    i    i`* Re: Memory ordering18jseigh
5 Dec 24 i   i  i  i    i    i `* Re: Memory ordering17Chris M. Thomasson
5 Dec 24 i   i  i  i    i    i  +* Re: Memory ordering8jseigh
16 Dec22:48 i   i  i  i    i    i  i`* Re: Memory ordering7Chris M. Thomasson
17 Dec13:33 i   i  i  i    i    i  i `* Re: Memory ordering6jseigh
17 Dec21:38 i   i  i  i    i    i  i  +- Re: Memory ordering1aph
17 Dec21:41 i   i  i  i    i    i  i  `* Re: Memory ordering4Chris M. Thomasson
17 Dec22:45 i   i  i  i    i    i  i   +- Re: Memory ordering1MitchAlsup1
18 Dec12:43 i   i  i  i    i    i  i   `* Re: Memory ordering2jseigh
19 Dec03:48 i   i  i  i    i    i  i    `- Re: Memory ordering1Chris M. Thomasson
19 Dec19:33 i   i  i  i    i    i  `* Re: Memory ordering8MitchAlsup1
19 Dec22:19 i   i  i  i    i    i   `* Re: Memory ordering7Chris M. Thomasson
20 Dec00:59 i   i  i  i    i    i    +* Re: Memory ordering5MitchAlsup1
20 Dec01:21 i   i  i  i    i    i    i+* Re: Memory ordering2Chris M. Thomasson
20 Dec01:25 i   i  i  i    i    i    ii`- Re: Memory ordering1Chris M. Thomasson
20 Dec01:48 i   i  i  i    i    i    i`* Re: Memory ordering2Chris M. Thomasson
20 Dec01:58 i   i  i  i    i    i    i `- Re: Memory ordering1Chris M. Thomasson
20 Dec21:17 i   i  i  i    i    i    `- Re: Memory ordering1Chris M. Thomasson
4 Dec 24 i   i  i  i    i    +- Re: Memory ordering1Chris M. Thomasson
4 Dec 24 i   i  i  i    i    +- Re: Memory ordering1MitchAlsup1
5 Dec 24 i   i  i  i    i    `* Re: Memory ordering4Tim Rentsch
6 Dec 24 i   i  i  i    i     +* Re: Memory ordering2Terje Mathisen
6 Dec 24 i   i  i  i    i     i`- Re: Memory ordering1Tim Rentsch
20 Dec06:08 i   i  i  i    i     `- Re: Memory ordering1Chris M. Thomasson
17 Nov 24 i   i  i  i    +* Re: Memory ordering2Chris M. Thomasson
19 Nov 24 i   i  i  i    i`- Re: Memory ordering1Chris M. Thomasson
18 Nov 24 i   i  i  i    +- Re: Memory ordering1aph
21 Nov 24 i   i  i  i    +- Re: Memory ordering1Chris M. Thomasson
21 Nov 24 i   i  i  i    `- Re: Memory ordering1Chris M. Thomasson
15 Nov 24 i   i  i  +* Re: Memory ordering (was: Arm ldaxr / stxr loop question)2Michael S
15 Nov 24 i   i  i  i`- Re: Memory ordering (was: Arm ldaxr / stxr loop question)1Anton Ertl
15 Nov 24 i   i  i  +* Re: Memory ordering28jseigh
15 Nov 24 i   i  i  i`* Re: Memory ordering27Anton Ertl
15 Nov 24 i   i  i  i +* Re: Memory ordering18Chris M. Thomasson
16 Nov 24 i   i  i  i i`* Re: Memory ordering17Anton Ertl
17 Nov 24 i   i  i  i i `* Re: Memory ordering16Chris M. Thomasson
17 Nov 24 i   i  i  i i  `* Re: Memory ordering15Anton Ertl
18 Nov 24 i   i  i  i i   `* Re: Memory ordering14Chris M. Thomasson
18 Nov 24 i   i  i  i i    `* Re: Memory ordering13Anton Ertl
19 Nov 24 i   i  i  i i     `* Re: Memory ordering12Chris M. Thomasson
19 Nov 24 i   i  i  i i      `* Re: Memory ordering11Chris M. Thomasson
26 Nov 24 i   i  i  i i       +* Re: Memory ordering4Chris M. Thomasson
3 Dec 24 i   i  i  i i       `* Re: Memory ordering6Anton Ertl
15 Nov 24 i   i  i  i +* Re: Memory ordering7BGB
17 Nov 24 i   i  i  i `- Re: Memory ordering1Tim Rentsch
16 Nov 24 i   i  i  +- Re: Memory ordering (was: Arm ldaxr / stxr loop question)1Anton Ertl
16 Nov 24 i   i  i  +- Re: Memory ordering (was: Arm ldaxr / stxr loop question)1Lawrence D'Oliveiro
18 Nov 24 i   i  i  `- Re: Memory ordering1aph
21 Nov 24 i   i  `* Re: Arm ldaxr / stxr loop question3Kent Dickey
9 Nov 24 i   `* Re: Arm ldaxr / stxr loop question2jseigh
8 Nov 24 +* Re: Arm ldaxr / stxr loop question8Lawrence D'Oliveiro
20 Dec10:11 `- Re: Arm ldaxr / stxr loop question1Chris M. Thomasson

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal