On Wed, Nov 04, 2015 at 12:17:16PM +0000, Cohen, Eugene wrote: > > The set/way operations are really only suitable for managing the caches > > themselves > > This makes sense to me and I agree that the majority of developers > should only be dealing with managing buffers and should only use the > VA/address-range interface. > > > there are examples of architecturally compliant systems with system > > level caches where cleaned data has been observed to only make it to > > main memory if you clean by VA. > > I fully expect this given the nature of the ARM architecture - the > scope architectural specifications stop at the interconnect so if > somebody wants to implement wacky hardware then there's nothing to > stop them.
It's worth noting that the (ARMv8) architecture defines some properties of system-level caches (e.g. that they must respect maintenance by VA), which ensures that the architected mechanism for managing caches is portable (i.e. maintenance by VA works everywhere). If someone builds a system cache that does not respect maintenance by VA then they have violated the (ARMv8) architecture. Personally, I expect that system-level caches are likely to become the common case in server systems, assuming that there are coherent masters other than CPUs in the system. I don't think we can consider them a "wacky" niche case. > Presumably for whole-cache management some extra stuff is required on > these systems to make it work - which is fine although not that > helpful for interoperability purposes. > > > But seriously, I understand that there is a performance concern > > here, but 'promoting' a clean by VA operation to clean by set/way > > really makes no sense at all. > > Defaulting to safe/correct for all architectures makes sense to me. > But it would be nice for those of us that understand our architectures > (no system level caches, SMP config understood) to choose an option to > turn on thresholding through a PCD setting or library class selection. I am not necessarily opposed to this, however I am a little concerned that as with other performance options, this is something people may turn on blindly, regardless of whether such maintenance can actually provide useful guarantees for their system. Do we actually see a measurable performance advantage to enabling such thresholding on systems where it is safe to do so? What saving do we see, and in what paths? It's also worth noting that a Set/Way sequence may not be sufficient on all platforms even in the absence of system-level caches, and other IMPLEMENTATION DEFINED sequences may be necessary. In the general case. supporting thresholding would need the platform code to provide its particular mechanism. Thanks, Mark. _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

