Virtually tagged L1-caches

By: dmcq (, September 9, 2021 1:58 am
Room: Moderated Discussions
dmcq ( on September 9, 2021 2:46 am wrote:
> Linus Torvalds ( on September 8, 2021 12:34 pm wrote:
> > dmcq ( on September 8, 2021 8:22 am wrote:
> > > sr ( on September 8, 2021 5:49 am wrote:
> > > > So Power10 is using virtually tagged L1 for both instruction and
> > > > data caches and it does address translation only after L1-miss.
> > >
> > > I know the Linux people say the sky will fall if one does that and it
> > > would involve a bit of trickery but it's certainly what I'd go for.
> >
> > Oh, we don't care about implementation of the L1 caches, and they can use
> > whatever indexing and tags they want as long as they aren't stupid.
> >
> > So it's the historical pure virtually tagged caches that are bad, and that used to be
> > reasonably common. They don't exist any more (apart from possibly some broken toy core
> > used for educational purposes - mostly presumably as a "don't do this" education).
> >
> > People learnt their lesson.
> >
> > You can do entirely virtual L1 lookups if you just have all the pieces in place to avoid the bad semantics
> > that the traditional model had (ie no alias issues, proper
> > writeback, yadda yadda). And you can set up those
> > things at cache fill time, rather than at lookup time (although it is likely a combination of the two).
> >
> > The historical problems are about exposing aliases as lack of coherence, and the crazy performance
> > issues you had with direct-mapped or write-through caches. None of them are fundamental to virtual
> > indexing per se, they are just fundamental to overly simplistic and badly done virtual indexing.
> >
> > There is no way that POWER10 uses the traditional broken purely virtual cache model. It's
> > against the POWER cache coherency architectural guarantees. So they'll have the pieces in
> > place to make them act all coherent in hardware, are are multi-way associative etc etc.
> >
> > (And no, I have no inside knowledge, so the above is based
> > purely on "I seriously doubt some IBM CPU engineer
> > went on a crazy drug-induced architectural rampage and screwed up the latest implementation completely").
> >
> > The problem with the old-school virtual caches was that in order to
> > get cache coherence, you needed to jump through hoops in software.
> >
> > And hey, it's not like old-school physically indexed caches were great either. You can
> > most certainly screw that up too. Make it direct-mapped, and it's hot garbage regardless
> > of how many physical index bits you have, although it's slightly less painfully so.
> >
> > I don't really expect to ever see that kind of a train wreck again.
> >
> > Linus
> Yes agree with all that. And by trickery I didn't mean anything too amazing. The problem is to avoid having
> two copies of the same data in L1 because of aliasing. If the L2 cache holds an index into the L1 cache whenever
> data is copied into L1 then it shouldn't be to difficult to evict the old copy before putting in the new. It
> means the data goes ping pong in the L1 cache if one uses aliases at the same time. Probably one would use
> process id as well attached to the virtual address to avoid using the mechanism too much. With this one can
> abort the TLB lookup for L2 as soon as there is a hit in L1, it's never needed for the L1 lookup.

Though I'd still store the physical address from the translation in L1 to help with coherency as things could be popping in and out of L1, one can't be certain there aren't aliases in the pipeline even if they aren't in the cache. Unless of course you block the pipeline until the condition goes away which might also work.
< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
POWER10 SAP SD benchmarkanon22021/09/06 02:36 PM
  POWER10 SAP SD benchmarkDaniel B2021/09/07 01:31 AM
    "Cores" (and SPEC)Rayla2021/09/07 06:51 AM
      "Cores" (and SPEC)anon2021/09/07 02:56 PM
  POWER10 SAP SD benchmarkAnon2021/09/07 02:24 PM
    POWER10 SAP SD benchmarkAnon2021/09/07 02:27 PM
  Virtually tagged L1-cachessr2021/09/08 04:49 AM
    Virtually tagged L1-cachesdmcq2021/09/08 07:22 AM
      Virtually tagged L1-cachessr2021/09/08 07:56 AM
      Virtually tagged L1-cachesHugo Décharnes2021/09/08 07:58 AM
        Virtually tagged L1-cachessr2021/09/08 09:09 AM
          Virtually tagged L1-cachesHugo Décharnes2021/09/08 09:46 AM
            Virtually tagged L1-cachessr2021/09/08 10:35 AM
              Virtually tagged L1-cachesHugo Décharnes2021/09/08 11:23 AM
                Virtually tagged L1-cachessr2021/09/08 11:40 AM
                  Virtually tagged L1-cachesanon2021/09/09 02:16 AM
                    Virtually tagged L1-cachesKonrad Schwarz2021/09/10 04:19 AM
                      Virtually tagged L1-cachesHugo Décharnes2021/09/10 05:59 AM
                        Virtually tagged L1-cachesanon2021/09/14 02:17 AM
                          Virtually tagged L1-cachesdmcq2021/09/14 08:34 AM
                            Or use a PLB (NT)Paul A. Clayton2021/09/14 08:45 AM
                              Or use a PLBLinus Torvalds2021/09/14 02:27 PM
                                Or use a PLBanon2021/09/14 11:15 PM
                                  Or use a PLBMichael S2021/09/15 02:21 AM
                                    Or use a PLBdmcq2021/09/15 02:42 PM
                                      Or use a PLBKonrad Schwarz2021/09/16 03:24 AM
                                        Or use a PLBMichael S2021/09/16 09:13 AM
                                          Or use a PLB---2021/09/16 12:02 PM
                                  PLB referencePaul A. Clayton2021/09/18 01:35 PM
                                    PLB referenceMichael S2021/09/18 03:14 PM
                                      Demand paging/translation orthogonalPaul A. Clayton2021/09/19 06:33 AM
                                        Demand paging/translation orthogonalMichael S2021/09/19 08:10 AM
                                      PLB referenceCarson2021/09/20 09:19 PM
                                    PLB referencesr2021/09/20 05:02 AM
                                      PLB referenceMichael S2021/09/20 06:03 AM
                                        PLB referenceLinus Torvalds2021/09/20 11:10 AM
                                  Or use a PLBsr2021/09/20 03:32 AM
                              Or use a PLBsr2021/09/21 08:36 AM
                                Or use a PLBLinus Torvalds2021/09/21 09:04 AM
                                  Or use a PLBsr2021/09/21 09:48 AM
                                    Or use a PLBLinus Torvalds2021/09/21 12:55 PM
                                      Or use a PLBsr2021/09/22 05:55 AM
                                        Or use a PLBrwessel2021/09/22 06:09 AM
                                        Or use a PLBLinus Torvalds2021/09/22 10:50 AM
                                          Or use a PLBsr2021/09/22 12:00 PM
                                            Or use a PLBdmcq2021/09/22 03:07 PM
                                            Or use a PLBEtienne Lorrain2021/09/23 07:50 AM
                                          Or use a PLBanon22021/09/22 03:09 PM
                                            Or use a PLBdmcq2021/09/23 01:35 AM
                                          Or use a PLB2021/09/23 08:37 AM
                                            Or use a PLBLinus Torvalds2021/09/23 11:01 AM
                                              Or use a PLBgpd2021/09/24 02:59 AM
                                                Or use a PLBLinus Torvalds2021/09/24 09:45 AM
                                                  Or use a PLBdmcq2021/09/24 11:43 AM
                                                  Or use a PLBsr2021/09/25 09:19 AM
                                                    Or use a PLBLinus Torvalds2021/09/25 09:44 AM
                                                      Or use a PLBsr2021/09/25 10:11 AM
                                                        Or use a PLBLinus Torvalds2021/09/25 10:31 AM
                                                          Or use a PLBsr2021/09/25 10:52 AM
                                                            Or use a PLBLinus Torvalds2021/09/25 11:05 AM
                                                              Or use a PLBsr2021/09/25 11:23 AM
                                                                Or use a PLBrwessel2021/09/25 02:29 PM
                                                                  Or use a PLBsr2021/09/30 11:22 PM
                                                                    Or use a PLBrwessel2021/10/01 05:19 AM
                                                                      Or use a PLBDavid Hess2021/10/01 09:35 AM
                                                                        Or use a PLBrwessel2021/10/02 03:47 AM
                                                                      Or use a PLBsr2021/10/02 10:16 AM
                                                                        Or use a PLBrwessel2021/10/02 10:53 AM
                                                          Or use a PLBLinus Torvalds2021/09/25 10:57 AM
                                                            Or use a PLBsr2021/09/25 11:07 AM
                                                              Or use a PLBLinus Torvalds2021/09/25 11:21 AM
                                                                Or use a PLBsr2021/09/25 11:40 AM
                                                                  Or use a PLBnksingh2021/09/27 08:07 AM
                                                          Or use a PLB2021/09/27 08:02 AM
                                                            Or use a PLBLinus Torvalds2021/09/27 09:20 AM
                                                              Or use a PLBLinus Torvalds2021/09/27 11:58 AM
                                                                Or use a PLBdmcq2021/09/28 09:59 AM
                                              Or use a PLBsr2021/09/25 09:34 AM
                                                Or use a PLBrwessel2021/09/25 02:44 PM
                                                  Or use a PLBsr2021/10/01 12:04 AM
                                                    Or use a PLBrwessel2021/10/01 05:33 AM
                                                      I386 segmentation highlightssr2021/10/04 06:53 AM
                                                        I386 segmentation highlightsAdrian2021/10/04 08:53 AM
                                                          I386 segmentation highlightssr2021/10/04 09:19 AM
                                                        I386 segmentation highlightsrwessel2021/10/04 03:57 PM
                                                          I386 segmentation highlightssr2021/10/05 10:16 AM
                                                            I386 segmentation highlightsMichael S2021/10/05 11:27 AM
                                                            I386 segmentation highlightsrwessel2021/10/05 03:20 PM
                                                Or use a PLBJohnG2021/09/25 09:18 PM
                                              Or use a PLB2021/09/27 06:37 AM
                                                Or use a PLBHeikki Kultala2021/09/28 02:53 AM
                                                  Or use a PLBrwessel2021/09/28 06:29 AM
                                        Or use a PLBDavid Hess2021/09/23 05:00 PM
                                          Or use a PLBAdrian2021/09/24 12:21 AM
                                            Or use a PLBdmcq2021/09/25 11:41 AM
                                        Or use a PLBblaine2021/09/26 10:19 PM
                                          Or use a PLBDavid Hess2021/09/27 10:35 AM
                                            Or use a PLBblaine2021/09/27 04:19 PM
                                            Or use a PLBAdrian2021/09/27 09:40 PM
                                              Or use a PLBAdrian2021/09/27 09:59 PM
                                                Or use a PLBdmcq2021/09/28 06:45 AM
                                              Or use a PLBrwessel2021/09/28 06:45 AM
                                              Or use a PLBDavid Hess2021/09/28 11:50 AM
                                                Or use a PLBEtienne Lorrain2021/09/30 12:25 AM
                                                  Or use a PLBDavid Hess2021/10/01 09:40 AM
                                  MMU privilegessr2021/09/21 10:07 AM
                                    MMU privilegesLinus Torvalds2021/09/21 12:49 PM
                            Virtually tagged L1-cachesKonrad Schwarz2021/09/16 03:18 AM
                          Virtually tagged L1-cachesCarson2021/09/16 12:12 PM
                            Virtually tagged L1-cachesanon22021/09/16 04:16 PM
                              Virtually tagged L1-cachesrwessel2021/09/16 05:29 PM
                          Virtually tagged L1-cachessr2021/09/20 03:20 AM
              Virtually tagged L1-caches---2021/09/08 01:28 PM
                Virtually tagged L1-cachesanonymou52021/09/08 07:28 PM
                  Virtually tagged L1-cachesanonymou52021/09/08 07:34 PM
                  Virtually tagged L1-caches---2021/09/09 09:14 AM
                    Virtually tagged L1-cachesanonymou52021/09/09 09:44 PM
                Multi-threading?David Kanter2021/09/09 08:32 PM
                  Multi-threading?---2021/09/10 08:19 AM
                Virtually tagged L1-cachessr2021/09/11 12:19 AM
                Virtually tagged L1-cachessr2021/09/11 12:36 AM
                  Virtually tagged L1-caches---2021/09/11 08:53 AM
                    Virtually tagged L1-cachessr2021/09/11 11:43 PM
                      Virtually tagged L1-cachesLinus Torvalds2021/09/12 10:10 AM
                        Virtually tagged L1-cachessr2021/09/12 10:57 AM
                          Virtually tagged L1-cachesdmcq2021/09/13 07:31 AM
                            Virtually tagged L1-cachessr2021/09/20 03:11 AM
            Virtually tagged L1-cachessr2021/09/11 01:49 AM
      Virtually tagged L1-cachesLinus Torvalds2021/09/08 11:34 AM
        Virtually tagged L1-cachesdmcq2021/09/09 01:46 AM
          Virtually tagged L1-cachesdmcq2021/09/09 01:58 AM
          Virtually tagged L1-cachessr2021/09/11 12:29 AM
            Virtually tagged L1-cachesdmcq2021/09/11 07:59 AM
              Virtually tagged L1-cachessr2021/09/11 11:57 PM
                Virtually tagged L1-cachesdmcq2021/09/12 07:44 AM
                  Virtually tagged L1-cachessr2021/09/12 08:48 AM
                    Virtually tagged L1-cachesdmcq2021/09/12 12:22 PM
                      Virtually tagged L1-cachessr2021/09/20 03:40 AM
    Where do you see this information? (NT)anon22021/09/09 01:45 AM
      Where do you see this information?sr2021/09/11 12:40 AM
        Where do you see this information?anon22021/09/11 12:53 AM
          Where do you see this information?sr2021/09/11 01:08 AM
            Thank you (NT)anon22021/09/11 03:31 PM
Reply to this Topic
Body: No Text
How do you spell avocado?