> -----Original Message----- > From: Christian Ehrhardt [mailto:ehrhardt@xxxxxxxxxxxxxxxxxx] > Sent: Monday, August 11, 2008 7:48 PM > To: Liu Yu > Cc: Hollis Blanchard; kvm-ppc@xxxxxxxxxxxxxxx > Subject: Re: [PATCH 4 of 5] kvm: ppc: Write only modified > shadow entries into theTLB on exit > > > > When you set nearly all tlb entries modified in this loop, > you have to > > write all of them back before entering the guest in > booke_interrupts.S. > > > > So, why not "_tlbia()" here outside this loop, and don't > set them modified. > > Then, you needn't write them back. > > In fact, the shadow tlb entries are still consistent with > the hardware, as all of them are invalidated. > > > > Am I overlooking something ? > > > As Hollis wrote in his patch comment usually just one tlb > entry is modified which saves a lot of updates. > If we invalidate all we later on would have to satisfy the > misses we cause by doing so. In this loop, aren't you invalidating them all? > > With some free time we could test _tlbia() here, but I expect > it to be slower by causing the need for tlb re-population > compared to what we save here. > I don't understand why it will be slower. I think _tlbia will take the same effect as what you do here. That is to say, it will always cause the need for tlb re-population. And what's more, _tlbia will save some time when it enter the guest. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html