Example of memory ordering causing excitement in the real world

By: anon (anon.delete@this.anon.com), July 12, 2015 9:48 pm
Room: Moderated Discussions
anon (anon.delete@this.anon.com) on July 12, 2015 7:42 pm wrote:
> Linus Torvalds (torvalds.delete@this.linux-foundation.org) on July 12, 2015 11:24 am wrote:
> > anon (anon.delete@this.anon.com) on July 12, 2015 3:42 am wrote:
> > >
> > > So all of that happens inside the core. Memory ordering instructions
> > > have to prevent these reorderings within the core.
> >
> > No, they really don't.
>
> Obviously:
> * I was responding to the claim about hardware in general. Not a particular implementation.
> * I meant prevent the *appearance* of those reorderings.
> * I acknowledged speculative approaches that work to prevent apparent reordering.
>
> I appreciate the time you took to respond though.
>
> > So just look at that example of "do a load early" model: just do the load early, you marked
> > it somewhere in the memory subsystem, and you added it to your memory access retirement queue.
> > Now you just need to figure out if anybody did a store that invalidated the load.
> >
> > And guess what? That's not so hard. If you did an early load, that means that you had to get the cacheline
> > with the load data. Now, how do you figure out whether another store disturbed that data? Sure, you
> > still have the same store buffer logic that you used fro UP for the local stores, but you also see
> > the remote stores: they'd have to get the cacheline from you. So all your "marker in the memory subsystem"
> > has to react to is that the cacheline it marked went away (and maybe the cacheline comes back, but
> > that doesn't help - if it went away, it causes the marker to be "invalid").
> >
> > See? No memory barriers. No nothing. Just that same model of "load early and mark".
>
> This doesn't invalidate my comment as I explained above, but I'd
> like to respond to it because this topic is of interest to me.
>
> You're talking about memory operations to a single address, and as such, it has nothing
> to do with the memory ordering problem. Fine, speculatively load an address and check
> for invalidation, but that does not help the memory ordering problem.
>
> The problem (and the reason why x86 explicitly allows and actually does reorder in practice) is load vs older
> store. You have moved your load before the store executes, and you have all the mechanism in place to ensure
> that load is valid. How do you determine if *another* CPU has loaded the location of your store within that
> reordered window? Eh? And no, you can't check that the store cacheline remains exclusive on your CPU because
> you may not even own it exclusive let alone know the address of it at the time you performed your load.
>
> Example, all memory set to 0:
>

Uh, this got messed up with html parsing of course. It was just the canonical load/store reordering example (CPU0 store x, load y; CPU1 store y, load x;).
< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
Cyclone Macro-op fusionMaynard Handley2015/07/05 06:01 PM
  Cyclone Macro-op fusionGabriele Svelto2015/07/06 02:11 AM
    Cyclone Macro-op fusionMaynard Handley2015/07/06 10:25 AM
      Cyclone Macro-op fusionWilco2015/07/06 11:17 AM
        Cyclone Macro-op fusionMaynard Handley2015/07/06 12:07 PM
          Cyclone Macro-op fusionMaynard Handley2015/07/06 12:55 PM
            Cyclone Macro-op fusionGabriele Svelto2015/07/07 02:49 AM
      Power8 branch conversionSHK2015/07/06 12:41 PM
        Power8 branch conversionMaynard Handley2015/07/06 01:01 PM
          Power8 branch conversionMaynard Handley2015/07/06 01:09 PM
        Benefit of dynamic hammock predicationPaul A. Clayton2015/07/06 03:02 PM
          Benefit of dynamic hammock predicationMaynard Handley2015/07/06 03:34 PM
            Benefit of dynamic hammock predicationEduardoS2015/07/06 07:56 PM
            Benefit of dynamic hammock predicationPatrick Chase2015/07/06 10:30 PM
          Benefit of dynamic hammock predicationLinus Torvalds2015/07/06 03:59 PM
            Benefit of dynamic hammock predicationWilco2015/07/06 04:35 PM
              Benefit of dynamic hammock predicationLinus Torvalds2015/07/06 05:25 PM
                Benefit of dynamic hammock predicationanon2015/07/06 09:02 PM
            Benefit of dynamic hammock predicationPatrick Chase2015/07/06 10:31 PM
              Benefit of dynamic hammock predicationanon2015/07/06 11:02 PM
              Benefit of dynamic hammock predicationMichael S2015/07/07 01:07 AM
              Benefit of dynamic hammock predicationLinus Torvalds2015/07/07 09:23 AM
                Benefit of dynamic hammock predicationPatrick Chase2015/07/07 10:49 AM
                  Benefit of dynamic hammock predicationSHK2015/07/07 11:34 AM
                  Benefit of dynamic hammock predicationMaynard Handley2015/07/07 12:00 PM
                    Benefit of dynamic hammock predicationExophase2015/07/07 01:26 PM
                      Benefit of dynamic hammock predicationWilco2015/07/07 04:54 PM
                      Benefit of dynamic hammock predicationMaynard Handley2015/07/07 05:25 PM
                    Benefit of dynamic hammock predicationPatrick Chase2015/07/07 02:32 PM
                    Benefit of dynamic hammock predicationMichael S2015/07/08 01:57 AM
                  Benefit of dynamic hammock predicationSylvain Collange2015/07/08 06:30 AM
                    Benefit of dynamic hammock predicationMaynard Handley2015/07/08 09:46 AM
                      Benefit of dynamic hammock predicationSylvain Collange2015/07/08 10:32 AM
                        Benefit of dynamic hammock predicationMaynard Handley2015/07/08 10:57 AM
                        Sadly, skewed associativity has not been broadly adoptedPaul A. Clayton2015/07/08 02:00 PM
                        Prediction quality of A8 and Intel (was Benefit of dynamic hammock predication)Maynard Handley2015/07/08 08:23 PM
                          Prediction quality of A8 and Intel (was Benefit of dynamic hammock predication)David Kanter2015/07/09 07:20 AM
                            Prediction quality of A8 and Intel (was Benefit of dynamic hammock predication)Maynard Handley2015/07/09 10:04 AM
                              Prediction quality of A8 and Intel (was Benefit of dynamic hammock predication)Tim McCaffrey2015/07/09 10:41 AM
                                Prediction quality of A8 and Intel (was Benefit of dynamic hammock predication)Patrick Chase2015/07/09 01:08 PM
                                  Prediction quality of A8 and Intel (was Benefit of dynamic hammock predication)Sylvain Collange2015/07/10 02:03 AM
                              Prediction quality of A8 and Intel (was Benefit of dynamic hammock predication)David Kanter2015/07/09 04:15 PM
                                Prediction quality of A8 and Intel (was Benefit of dynamic hammock predication)Maynard Handley2015/07/09 05:21 PM
                            Prediction quality of A8 and Intel (was Benefit of dynamic hammock predication)Patrick Chase2015/07/09 12:44 PM
                          Prediction quality of A8 and Intel (was Benefit of dynamic hammock predication)Patrick Chase2015/07/09 09:43 AM
                          Prediction quality of A8 and Intel (was Benefit of dynamic hammock predication)someone2015/07/10 05:43 AM
            Benefit of dynamic hammock predicationKonrad Schwarz2015/07/07 07:54 AM
            Benefit of dynamic hammock predicationdmcq2015/07/07 02:38 PM
              Benefit of dynamic hammock predicationLinus Torvalds2015/07/08 08:23 AM
                Benefit of dynamic hammock predicationdmcq2015/07/08 10:11 AM
                  Benefit of dynamic hammock predicationLinus Torvalds2015/07/08 01:38 PM
                    Example of memory ordering causing excitement in the real worldMark Roulo2015/07/08 04:54 PM
                      Example of memory ordering causing excitement in the real worlddmcq2015/07/09 04:37 AM
                        Example of memory ordering causing excitement in the real worldMark Roulo2015/07/09 08:24 AM
                          Example of memory ordering causing excitement in the real worlddmcq2015/07/09 10:09 AM
                          Example of memory ordering causing excitement in the real worldMaynard Handley2015/07/09 10:12 AM
                            Example of memory ordering causing excitement in the real worldLinus Torvalds2015/07/09 12:14 PM
                              Example of memory ordering causing excitement in the real worlddmcq2015/07/09 04:24 PM
                                Example of memory ordering causing excitement in the real worldSimon Farnsworth2015/07/10 01:07 PM
                                  Example of memory ordering causing excitement in the real worlddmcq2015/07/10 03:49 PM
                                    Example of memory ordering causing excitement in the real worldSimon Farnsworth2015/07/12 01:02 PM
                                      Example of memory ordering causing excitement in the real worlddmcq2015/07/13 05:03 AM
                                        Example of memory ordering causing excitement in the real worldMichael S2015/07/13 05:19 AM
                                        Example of memory ordering causing excitement in the real worldSimon Farnsworth2015/07/14 01:21 PM
                                          Example of memory ordering causing excitement in the real worlddmcq2015/07/14 02:54 PM
                                            Example of memory ordering causing excitement in the real worldSimon Farnsworth2015/07/15 01:13 PM
                                              Example of memory ordering causing excitement in the real worlddmcq2015/07/15 03:43 PM
                                                Example of memory ordering causing excitement in the real worldSimon Farnsworth2015/07/16 12:41 PM
                                                  Example of memory ordering causing excitement in the real worldWilco2015/07/17 01:57 PM
                                                    Example of memory ordering causing excitement in the real worldLinus Torvalds2015/07/17 04:29 PM
                                                      Example of memory ordering causing excitement in the real worlddmcq2015/07/18 04:07 AM
                                          Example of memory ordering causing excitement in the real worldJouni Osmala2015/07/16 03:52 AM
                                            Example of memory ordering causing excitement in the real worldSimon Farnsworth2015/07/16 01:05 PM
                                              Example of memory ordering causing excitement in the real worldJouni Osmala2015/07/17 01:18 AM
                                                ISA support for bound checkingMichael S2015/07/17 04:51 AM
                                                  ISA support for bound checkingEtienne2015/07/17 06:39 AM
                                                  MPX on SkylakeMark Roulo2015/07/17 08:19 AM
                                                    MPX on SkylakeMichael S2015/07/17 08:44 AM
                                                      MPX on SkylakeMark Roulo2015/07/17 09:03 AM
                                  Example of memory ordering causing excitement in the real worldanon2015/07/12 03:42 AM
                                    Example of memory ordering causing excitement in the real worlddmcq2015/07/12 10:27 AM
                                    Example of memory ordering causing excitement in the real worldLinus Torvalds2015/07/12 11:24 AM
                                      Example of memory ordering causing excitement in the real worldEduardoS2015/07/12 11:53 AM
                                        Example of memory ordering causing excitement in the real worldLinus Torvalds2015/07/12 01:07 PM
                                          Example of memory ordering causing excitement in the real worldanon2015/07/12 07:52 PM
                                            Example of memory ordering causing excitement in the real worldLinus Torvalds2015/07/13 11:05 AM
                                              Example of memory ordering causing excitement in the real worlddmcq2015/07/13 12:20 PM
                                                Example of memory ordering causing excitement in the real worldLinus Torvalds2015/07/13 01:46 PM
                                                  Example of memory ordering causing excitement in the real worldMaynard Handley2015/07/13 02:10 PM
                                                    Example of memory ordering causing excitement in the real worldanon2015/07/13 08:51 PM
                                                    Simple cores justifying weak ordering?Paul A. Clayton2015/07/14 09:01 AM
                                                      David's Paul A. Clayton2015/07/14 09:37 AM
                                                      David's 2015-07-12 10:34 post confirmed some of that (NT)Paul A. Clayton2015/07/14 09:39 AM
                                                    Example of memory ordering causing excitement in the real worldEtienne2015/07/17 01:15 AM
                                                  Example of memory ordering causing excitement in the real worlddmcq2015/07/13 02:14 PM
                                                  Reality is even worseTerry Gray2015/07/13 06:05 PM
                                                    Reality is even worseKonrad Schwarz2015/07/21 12:13 AM
                                                  A simple CAS/MCAS semantics2015/07/15 12:54 PM
                                                    A simple CAS/MCAS semanticsLinus Torvalds2015/07/15 01:55 PM
                                                    A simple CAS/MCAS semanticsEduardoS2015/07/15 02:31 PM
                                                Example of memory ordering causing excitement in the real worldsylt2015/07/13 02:19 PM
                                                  Example of memory ordering causing excitement in the real worlddmcq2015/07/13 03:24 PM
                                                    Example of memory ordering causing excitement in the real worldEduardoS2015/07/13 04:48 PM
                                                      Example of memory ordering causing excitement in the real worldMaynard Handley2015/07/13 07:18 PM
                                                        Example of memory ordering causing excitement in the real worldEduardoS2015/07/13 07:57 PM
                                                      Example of memory ordering causing excitement in the real worldanon2015/07/13 09:01 PM
                                                    What high level languages do you have in mind?Mark Roulo2015/07/13 05:00 PM
                                                      What high level languages do you have in mind?dmcq2015/07/14 06:54 AM
                                                  Example of memory ordering causing excitement in the real worldWilco2015/07/13 04:36 PM
                                                    Example of memory ordering causing excitement in the real worldEduardoS2015/07/13 04:56 PM
                                                      Example of memory ordering causing excitement in the real worldanon2015/07/13 06:43 PM
                                                        Example of memory ordering causing excitement in the real worldEduardoS2015/07/13 08:11 PM
                                                          Example of memory ordering causing excitement in the real worldanon2015/07/13 09:07 PM
                                      Example of memory ordering causing excitement in the real worldMaynard Handley2015/07/12 12:32 PM
                                        Example of memory ordering causing excitement in the real worldEduardoS2015/07/12 01:35 PM
                                        Example of memory ordering causing excitement in the real worldLinus Torvalds2015/07/12 01:38 PM
                                          Example of memory ordering causing excitement in the real worldEduardoS2015/07/12 06:47 PM
                                            Example of memory ordering causing excitement in the real worldNoSpammer2015/07/13 12:34 PM
                                              Example of memory ordering causing excitement in the real worldWilco2015/07/13 04:50 PM
                                                Example of memory ordering causing excitement in the real worldNoSpammer2015/07/14 02:02 PM
                                                  Example of memory ordering causing excitement in the real worldanon2015/07/14 09:37 PM
                                                    Example of memory ordering causing excitement in the real worldMichael S2015/07/15 01:19 AM
                                                      Example of memory ordering causing excitement in the real worldanon2015/07/15 02:26 AM
                                                        Example of memory ordering causing excitement in the real worldNoSpammer2015/07/15 07:05 AM
                                                          Example of memory ordering causing excitement in the real worlddmcq2015/07/15 08:04 AM
                                                            Example of memory ordering causing excitement in the real worldMichael S2015/07/15 08:29 AM
                                                              Example of memory ordering causing excitement in the real worlddmcq2015/07/15 10:09 AM
                                                              Can string ops use microarchitectural state?Paul A. Clayton2015/07/16 09:33 AM
                                                                Can string ops use microarchitectural state?rwessel2015/07/16 01:00 PM
                                                                  Can string ops use microarchitectural state?Paul A. Clayton2015/07/16 06:16 PM
                                                                    Can string ops use microarchitectural state?rwessel2015/07/16 09:34 PM
                                                                      Can string ops use microarchitectural state?Michael S2015/07/17 05:39 AM
                                                                        Can string ops use microarchitectural state?rwessel2015/07/17 09:02 AM
                                                                Consider interrupt followed by task preemptionMichael S2015/07/16 04:31 PM
                                                                  Consider interrupt followed by task preemptionPaul A. Clayton2015/07/16 06:23 PM
                                                            Example of memory ordering causing excitement in the real worldNoSpammer2015/07/15 12:50 PM
                                                              Example of memory ordering causing excitement in the real worldLinus Torvalds2015/07/15 02:27 PM
                                                                Example of memory ordering causing excitement in the real worldNoSpammer2015/07/15 03:14 PM
                                                                  Example of memory ordering causing excitement in the real worldLinus Torvalds2015/07/15 05:42 PM
                                                      Example of memory ordering causing excitement in the real worldNoSpammer2015/07/15 02:44 AM
                                                    Example of memory ordering causing excitement in the real worldLinus Torvalds2015/07/15 02:17 PM
                                                      Example of memory ordering causing excitement in the real worldWilco2015/07/15 02:43 PM
                                                        Example of memory ordering causing excitement in the real worldanon2015/07/15 05:45 PM
                                                        Example of memory ordering causing excitement in the real worldLinus Torvalds2015/07/15 06:35 PM
                                                          Example of memory ordering causing excitement in the real worlddmcq2015/07/16 02:46 AM
                                                            Example of memory ordering causing excitement in the real worlddmcq2015/07/16 02:49 AM
                                        Example of memory ordering causing excitement in the real worldKonrad Schwarz2015/07/21 07:15 AM
                                      Example of memory ordering causing excitement in the real worldanon2015/07/12 07:42 PM
                                        Example of memory ordering causing excitement in the real worldanon2015/07/12 09:48 PM
                                        Example of memory ordering causing excitement in the real worldDavid Kanter2015/07/12 10:34 PM
                                          Example of memory ordering causing excitement in the real worldMichael S2015/07/13 01:51 AM
                                            Example of memory ordering causing excitement in the real worldDavid Kanter2015/07/13 08:31 AM
                                          Example of memory ordering causing excitement in the real worldanon2015/07/13 06:05 AM
                                            Example of memory ordering causing excitement in the real worldGabriele Svelto2015/07/17 05:40 AM
                                          Example of memory ordering causing excitement in the real worlddmcq2015/07/13 08:09 AM
                                        Example of memory ordering causing excitement in the real worldanon2015/07/13 07:46 AM
                                          Example of memory ordering causing excitement in the real worldanon2015/07/14 04:12 AM
                                        Example of memory ordering causing excitement in the real worlddmcq2015/07/15 03:51 AM
                                          Example of memory ordering causing excitement in the real worldanon2015/07/15 04:38 AM
                                            Example of memory ordering causing excitement in the real worlddmcq2015/07/15 06:21 AM
                                      Store queues in POWER/PowerPC processorsGabriele Svelto2015/07/16 01:55 AM
                                        Not sure about that conclusionDavid Kanter2015/07/16 07:34 AM
                                          The POWER4 had the same structureGabriele Svelto2015/07/17 05:20 AM
                                        Committing stores in program orderPaul A. Clayton2015/07/16 01:35 PM
                                          Committing stores in program orderMaynard Handley2015/07/17 12:52 PM
                                      Example of memory ordering causing excitement in the real worldKonrad Schwarz2015/07/20 04:44 AM
                                        Example of memory ordering causing excitement in the real worldanon2015/07/20 07:29 AM
                                          Example of memory ordering causing excitement in the real worldKonrad Schwarz2015/07/21 12:08 AM
                                            Example of memory ordering causing excitement in the real worlddmcq2015/07/21 01:27 AM
                                            Example of memory ordering causing excitement in the real worldMichael S2015/07/21 03:11 AM
                                              Example of memory ordering causing excitement in the real worldKonrad Schwarz2015/07/21 05:24 AM
                                            Example of memory ordering causing excitement in the real worldanon2015/07/21 06:22 AM
                                              Example of memory ordering causing excitement in the real worldKonrad Schwarz2015/07/21 07:36 AM
                                                Example of memory ordering causing excitement in the real worldanon2015/07/21 08:25 AM
                                              Example of memory ordering causing excitement in the real worldanon2015/07/21 08:17 AM
                                                Example of memory ordering causing excitement in the real worldanon2015/07/21 09:50 AM
                                                Example of memory ordering causing excitement in the real worldGabriele Svelto2015/07/21 12:46 PM
                                                Example of memory ordering causing excitement in the real worldKonrad Schwarz2015/07/22 12:35 AM
                                                  Example of memory ordering causing excitement in the real worldKonrad Schwarz2015/07/22 01:37 AM
                                                  Example of memory ordering causing excitement in the real worldanon2015/07/23 03:17 AM
                                                    Example of memory ordering causing excitement in the real worldKonrad Schwarz2015/07/23 04:59 AM
                                                      Example of memory ordering causing excitement in the real worldMichael S2015/07/23 07:31 AM
                                                        Example of memory ordering causing excitement in the real worldKonrad Schwarz2015/07/23 03:38 PM
                                                          Example of memory ordering causing excitement in the real worldKonrad Schwarz2015/07/23 11:44 PM
                                                            Example of memory ordering causing excitement in the real worlddmcq2015/07/24 01:08 AM
                                    Example of memory ordering causing excitement in the real worlddmcq2015/07/13 07:27 AM
                          Example of memory ordering causing excitement in the real worldKonrad Schwarz2015/07/16 05:11 AM
                      Example of memory ordering causing excitement in the real worldAnonymousse2015/07/16 05:07 AM
          Benefit of dynamic hammock predicationsomeotherdude2015/07/06 05:12 PM
            Benefit of dynamic hammock predicationMichael S2015/07/07 01:19 AM
          Benefit of dynamic hammock predicationPatrick Chase2015/07/06 10:20 PM
            SIMD predication is also helpful, of course (NT)Paul A. Clayton2015/07/07 07:45 AM
        Power8 branch conversionGabriele Svelto2015/07/07 02:50 AM
          isel works for storesPaul A. Clayton2015/07/07 07:43 AM
            isel works for storesPatrick Chase2015/07/07 11:08 AM
            isel DOES NOT work for storessomeotherdude2015/07/07 04:01 PM
              isel DOES NOT work for storesWilco2015/07/07 04:40 PM
              Yes it doesPatrick Chase2015/07/07 11:14 PM
                Yes it doesvvid2015/07/08 09:51 AM
            You don't need isel eitherGabriele Svelto2015/07/08 02:01 AM
              You don't need isel eitherPaul A. Clayton2015/07/08 04:46 AM
                You don't need isel eitherGabriele Svelto2015/07/08 05:22 AM
Reply to this Topic
Name:
Email:
Topic:
Body: No Text
How do you spell tangerine? 🍊