









Technisches GebietTechnical area
Die vorliegende Erfindung betrifft das Steuern von Cache-Kohärenz, und insbesondere ein Verfahren, System und Programm zum Steuern von Cache-Kohärenz eines Shared-Memory-Multiprocessor (Multiprozessor mit gemeinsam genutztem Arbeitsspeicher).The present invention relates to controlling cache coherency, and more particularly to a method, system, and program for controlling cache coherency of a shared memory multiprocessor (shared memory multiprocessor).
Stand der TechnikState of the art
Ein Multiprozessorsystem führt eine Vielzahl von Aufgaben (tasks) oder Prozessen (im Folgenden als „Prozesse“ bezeichnet) gleichzeitig durch. Jeder der Vielzahl von Prozessen hat normalerweise einen virtuellen Adressraum und nutzt diesen beim Ausführen des Prozesses. Ein Bereich in so einem virtuellen Adressraum enthält eine Adresse, die auf einer physischen Adresse in einem Systemspeicher abgebildet (mapped) wird. Es ist nichts Ungewöhnliches, dass ein einzelner Bereich in einem Systemspeicher auf einer Vielzahl von virtuellen Adressen in einem Multiprozessor abgebildet wird. Verwendet jeder einzelne einer Vielzahl von Prozessen eine virtuelle Adresse, werden diese Adressen in physische Adressen in einem Systemspeicher übersetzt und, falls keine geeignete Anweisung oder Daten in einem Cachespeicher in einem Prozessor zum Durchführen jeder dieser Prozesse vorliegen, werden sie aus dem Systemspeicher extrahiert und in dem Cachespeicher gespeichert.A multiprocessor system performs a plurality of tasks or processes (hereinafter referred to as "processes") simultaneously. Each of the multiplicity of processes usually has a virtual address space and uses it when executing the process. An area in such a virtual address space contains an address that is mapped to a physical address in system memory. It is not uncommon for a single area in a system memory to be mapped to a plurality of virtual addresses in a multiprocessor. When each one of a plurality of processes uses a virtual address, these addresses are translated into physical addresses in system memory and, if there is no appropriate instruction or data in a cache in a processor to perform each of these processes, they are extracted from the system memory and written to saved to the cache memory.
Um virtuelle Adressen in einem Multiprozessorsystem schnell in physische Adressen in einem Systemspeicher zu übersetzen und um eine geeignete Anweisung oder Daten zu erhalten, wird ein sogenannter Adressumsetzpuffer (Translation Look-aside Buffer) (nachfolgend als TLB bezeichnet) für einen Cachespeicher verwendet. Bei einem TLB handelt es sich um einen Puffer (Zwischenspeicher), der eine Übersetzungsbeziehung zwischen einer virtuellen Adresse und einer physischen Adresse, die unter Verwendung eines Übersetzungsalgorithmus erzeugt wird, enthält. Durch Verwendung des TLB können Adressen sehr effizient übersetzt werden; durch den Einsatz eines solchen Puffers in einem Symmetric Multiprocessing System („symmetrisches Mehrfachverarbeitungssystem“) (nachfolgend als „SMP“ bezeichnet) entsteht jedoch das Problem der Inkohärenz. Bei einem Datenverarbeitungssystem, in dem eine Vielzahl von Prozessoren Daten von einem gemeinsam genutzten Speichersystem lesen und darauf schreiben können, muss genauestens darauf geachtet werden, dass das Speichersystem kohärent arbeitet. Das heißt, Inkohärenz des Speichersystems, die aus dem Ausführen von Prozessen durch die Vielzahl von Prozessoren resultiert, muss vermieden werden. In solch einem Multiprozessorsystem enthält jeder der Prozessoren normalerweise einen TLB zur Verwendung bei der Adressübersetzung für einen Cachespeicher. Um in einem solchen System Kohärenz zu gewährleisten, muss eine Änderung an einem TLB eines einzelnen Prozessors in dem Multiprozessor von einem gemeinsam genutzten Speichermodus genau und ohne Inkonsistenz zu verursachen auf den TLBs der anderen Prozessoren abgebildet werden.To quickly translate virtual addresses in a multiprocessor system into physical addresses in system memory and to obtain an appropriate instruction or data, a so-called translation look-aside buffer (hereinafter referred to as TLB) is used for a cache. A TLB is a buffer containing a translation relationship between a virtual address and a physical address generated using a translation algorithm. By using the TLB, addresses can be translated very efficiently; however, the use of such a buffer in a Symmetric Multiprocessing System (hereinafter referred to as "SMP") creates the problem of incoherence. In a data processing system in which a plurality of processors can read and write data from a shared memory system, care must be taken to ensure that the memory system operates coherently. That is, inconsistency of the memory system resulting from executing processes by the plurality of processors must be avoided. In such a multiprocessor system, each of the processors typically includes a TLB for use in cache address translation. To ensure coherence in such a system, a change to a TLB of a single processor in the multiprocessor from a shared memory mode must be mapped accurately and without inconsistency on the TLBs of the other processors.
In einem Multiprozessor kann Kohärenz von TLBs beispielsweise durch Verwenden eines Inter-Prozessor-Interrupts sowie durch Synchronisieren von Software für Änderungen an allen TLBs gewährleistet werden. Mit dieser Vorgehensweise kann Speicherkohärenz innerhalb des gesamten Multiprozessorsystems sichergestellt werden. In einem typischen Seitenspeichersystem gibt der Inhalt eines einzelnen TLB in einem Multiprozessorsystem einen Abschnitt eines im Cachespeicher gespeicherten Inhaltes einer Seitentabelle wieder, die in dem Systemspeicher geführt wird. Bei einer Seitentabelle handelt es sich im Allgemeinen um eine Speicher-Abbildtabelle (memory map table), die virtuelle Adressen oder Segmente davon sowie dazugehörige physische Adressen enthält. Solch eine Tabelle enthält des Weiteren andere verschiedene Typen von Verwaltungsdaten (management data), unter anderem ein „page protection“-Bit, ein „valid entry“-Bit und verschiedene Arten von Zugriffsbits („access bits“). So kann beispielsweise ein Bit, das die Notwendigkeit von Kohärenz explizit anzeigt (Attribut Speicherkohärenz-erforderlich) als Verwaltungsdaten zum statischen Konfigurieren dahingehend definiert werden, ob die Seite wirklich Kohärenz benötigt. Dieses Verfahren zum statischen Konfigurieren mit Hilfe von Bits kommt tatsächlich jedoch nur in einigen speziellen Programmen, die zum softwarebasierten Steuern eines Cachespeichers umgeschrieben werden dürfen, zum wirkungsvollen Einsatz, da nicht nur das vorstehend beschriebene Bit sondern zusätzlich dazu solch ein Bit auch in dem gesamten Systemspeicher statisch konfiguriert werden muss.In a multiprocessor, coherence of TLBs can be ensured, for example, by using an inter-processor interrupt as well as by synchronizing software for changes to all TLBs. This approach can ensure memory coherency throughout the multiprocessor system. In a typical page storage system, the content of a single TLB in a multiprocessor system reflects a portion of a cached content of a page table maintained in system memory. A page table is generally a memory map table containing virtual addresses or segments thereof and associated physical addresses. Such a table also contains other different types of management data, including a page protection bit, a valid entry bit, and various types of access bits. For example, a bit that explicitly indicates the need for coherency (memory coherence required attribute) can be defined as administrative data for static configuration as to whether the page really needs coherency. In fact, this bitmap static configuration method is effectively used only in some special programs that may be rewritten for software-based control of a cache because not only the bit described above but in addition such a bit also in the total system memory statically must be configured.
In den letzten Jahren kamen Desktop Personal Computer (PC) mit einer Vielzahl von zentralen Verarbeitungseinheiten (CPUs) sowie Linux SMP (Linux ist eine Handelsmarke von Linus Torvalds in den Vereinigten Staaten und anderen Ländern) verstärkt zum Einsatz, und viele Anwendungsprogramme unterstützen mittlerweile SMP (Shared-Memory-Multiprocessor)-Systeme, d.h. Systeme, bei denen mehrere Prozessoren auf einen gemeinsamen Arbeitsspeicher zugreifen. Demnach wird durch eine höhere Anzahl von Prozessoren in einem System eine Durchsatzleistung eines Anwendungsprogramms verbessert, ohne dass Software umgeschrieben werden muss. Ein Universal-Betriebssystem (BS), das eine Weiterentwicklung beim Unterstützen von SMP darstellt, beispielsweise SMP-Linux, wurde einer Kapazitätsverbesserung unterzogen und ist mittlerweile zum Steuern von mindestens 1024 Prozessoren in der Lage. Die Fähigkeit zum Verbessern der Durchsatzleistung durch ein Erhöhen der Anzahl von Prozessoren, ohne dass Software umgeschrieben werden muss, ist ein Vorteil, den ein Multiprozessorsystem, das keinen gemeinsamen Speicher nutzt, wie beispielsweise ein Cluster, das Message Passing Programming verwendet, normalerweise nicht bietet. Somit handelt es sich bei SMP (Shared-Memory-Multiprocessor) um ein Multiprozessorsystem, das zum Schutz von Lizenzen (Software Assets) geeignet ist.In recent years, desktop personal computers (PC) with a large number of central processing units (CPUs) and Linux SMP (Linux is a trademark of Linus Torvalds in the United States and other countries) have increasingly been used, and many application programs now support SMP ( Shared memory multiprocessor) systems, ie systems where multiple processors to access a shared memory. Thus, increasing the number of processors in a system improves throughput of an application program without the need to rewrite software. A Universal Operating System (OS), which is a further development in supporting SMP, such as SMP Linux, has undergone capacity improvement and is now capable of controlling at least 1024 processors. The ability to improve throughput by increasing the number of processors without having to rewrite software is an advantage that a multiprocessor system that does not use shared memory, such as a cluster that uses message passing programming, typically does not offer. Thus, SMP (Shared Memory Multiprocessor) is a multiprocessor system that is suitable for the protection of licenses (software assets).
Aufgrund des Message Passing-Verfahrens ist die Skalierbarkeit eines SMP-Systems jedoch niedriger als die eines Clusters. Dies kommt daher, dass mit einem Erhöhen der Anzahl an Prozessoren eines SMP-Systems zur Verbesserung der Skalierbarkeit die Kosten für die Cache-Kohärenz unterstützende Hardware dramatisch ansteigen. Zu Beispielen von Hardware, die Cache-Kohärenz eines SMP-Systems unterstützt, können das Snoop-basierte MESI- (modified, exclusive, shared, invalid) Protokoll, das in einem gemeinsam genutzten Bus (shared bus) eines Desktop-PC verwendet und mit kostengünstiger Hardware umgesetzt wird, sowie ein Directory-basiertes (verzeichnisbasiertes) Protokoll gehören, das mit einem Cache-kohärenten, nicht-einheitlichen Speicherzugriff (non-uniform memory access) (nachfolgend als „CC-NUMA“ bezeichnet) in einem großen Distributed-Shared Memory- (DSM) System verwendet und mit kostengünstiger Hardware umgesetzt wird, die eine spezielle Verbindung zwischen Knoten beispielsweise mit einem Protokollprozessor (protocol processor) und einem Verzeichnisspeicher (directory memory) integriert. Ein Erhöhen der Anzahl an Prozessoren, die CC-NUMA verwenden, führt zu höheren Hardware-Kosten und demzufolge zu einer Erhöhung der Kosten eines Multiprozessors. Das bedeutet demzufolge eine geringe wirtschaftliche Skalierbarkeit von CC-NUMA. Im Gegensatz dazu sind die Hardware-Kosten pro Prozessor für ein Cluster, welches aus Standardkomponenten gebildet werden kann, weniger kostenintensiv als die für den CC-NUMA, der ganz eigene Komponenten benötigt. Insbesondere kann ein Cluster, der mit konstanten Hardware-Kosten pro Prozessor einhergeht, Parallelverarbeitung massiv durchführen, wenn er ein sehr einfach zu parallelisierendes Anwendungsprogramm mit einer hohen Parallelität unter Verwendung einer Schnittstelle für Message Passing umschreibt.However, due to the message passing method, the scalability of an SMP system is lower than that of a cluster. This is because increasing the number of processors of an SMP system to improve scalability dramatically increases the cost of cache coherency supporting hardware. Examples of hardware that supports cache coherency of an SMP system may include the snoop-based MESI (modified, exclusive, shared, invalid) protocol used in a shared bus of a desktop PC, and with low-cost hardware, as well as a directory-based (directory-based) protocol that includes a cache-coherent, non-uniform memory access (hereinafter referred to as "CC-NUMA") in a large distributed shared Memory (DSM) system is used and implemented with low-cost hardware that integrates a special connection between nodes, for example, with a protocol processor (protocol processor) and a directory memory (directory memory). Increasing the number of processors using CC-NUMA results in higher hardware costs and, consequently, an increase in the cost of a multiprocessor. This means low economic scalability of CC-NUMA. In contrast, the hardware cost per processor for a cluster that can be built from standard components is less expensive than that for CC-NUMA, which requires very unique components. In particular, a cluster associated with constant hardware cost per processor can massively perform parallel processing when rewriting a very easy-to-parallelize application program with high parallelism using a message passing interface.
Die Nichtpatentliteratur 1 beschreibt ein auf einem virtuellen Speicher (VM, virtual memory) beruhendes Shared-Memory-Verfahren, das Hardware in einer Speicherverwaltungseinheit (Memory Management Unit) (nachfolgend als „MMU“ bezeichnet) verwendet, die in einem Prozessor zu einer verbesserten Skalierbarkeit und Kostenentwicklung eines SMP-Systems enthalten ist. Dieses Verfahren wurde auf einen nicht Cache-kohärenten NUMA (nachfolgend als „NCC-NUMA“ bezeichnet) angewendet, der in der Nichtpatentliteratur 2 beschrieben ist, der Hardware genauso kostengünstig wie bei einem Cluster verwenden kann. Das VM-basierte Shared-Memory-Verfahren behandelt Cache-Kohärenz in ein und demselben Prozess, kann Cache-Kohärenz jedoch nicht zwischen verschiedenen Prozessen behandeln. Insbesondere aufgrund der Tatsache, dass ein Universal-BS normalerweise eine virtuelle Adresse unterstützt und Speicherverwaltung unter Verwendung des „Copy-on-Write“-Verfahrens zum Abbilden derselben physischen Seite auf einer Vielzahl von Prozessen betreibt, sind die Daten, auf die das VM-basierte Shared-Memory-Verfahren angewendet werden könnte, auf solche Daten begrenzt, mit denen sichergestellt ist, dass ein Anwendungsprogramm nicht von verschiedenen Prozessen gemeinsam genutzt wird, und dementsprechend kann für ein Anwendungsprogramm transparente Cache-Kohärenz nicht implementiert werden. Mit anderen Worten müssen demzufolge Daten desselben virtuellen Adressraumes, der von einer Vielzahl von Prozessoren genutzt wird, explizit angezeigt werden, und um das Verfahren auf bereits verfügbare Software anzuwenden, muss ein Anwendungsprogramm umgeschrieben werden, was zu zusätzlichen, mit dem Anwendungsprogramm verbundenen Software-Kosten führt. Folglich kann das VM-basierte Shared-Memory-Verfahren nicht auf einen Universalcomputer angewendet werden, und die Anwendbarkeit dieses Verfahrens ist auf eine spezielle Nutzung und wissenschaftliche Datenberechnung begrenzt, mit der eine Neuentwicklung des Programms möglich ist.Nonpatent Literature 1 describes a virtual memory (VM) -based shared memory method that uses hardware in a memory management unit (hereafter referred to as "MMU") in a processor for improved scalability and cost development of an SMP system. This method has been applied to a non-cache coherent NUMA (hereinafter referred to as "NCC NUMA") described in Non-Patent Literature 2, which can use hardware as inexpensively as a cluster. The VM-based shared-memory method treats cache coherency in one and the same process, but can not handle cache coherency between different processes. In particular, due to the fact that a general-purpose OS normally supports a virtual address and operates memory management using the "copy-on-write" method of mapping the same physical page on a variety of processes, the data to which the VM based on data limited to ensure that an application program is not shared by different processes, and accordingly, transparent cache coherency can not be implemented for an application program. In other words, therefore, data of the same virtual address space used by a plurality of processors must be explicitly displayed, and to apply the method to already available software, an application program must be rewritten, resulting in additional software costs associated with the application program leads. Consequently, the VM-based shared memory method can not be applied to a general-purpose computer, and the applicability of this method is limited to a special use and scientific data computation with which a new development of the program is possible.
Patentliteratur 1 beschreibt einen Multiprozessor mit einem gemeinsam genutzten Arbeitsspeicher (main memory shared type multiprocessor), bei dem durch Hinzufügen von wenig Hardware über ein Bereitstellen einer Abbildtabelle für physische Seiten (physical page map table) die Notwendigkeit des Sendens einer TLB-Löschungs-Transaktion zum Steuern von TLB-Konsistenz beim Umschreiben der Seitentabelle beseitigt oder erheblich verringert werden kann. Darüber hinaus kann damit auch der mit der TLB-Löschung einhergehende Bus-Verkehr in einem Netzwerk und in Knoten sowie ein zeitweises Blockieren (pipeline stall) eines Prozessors erheblich verringert werden.Patent Literature 1 describes a multiprocessor with a main memory shared type multiprocessor in which, by adding little hardware via providing a physical page map table, the need to send a TLB delete transaction to the Control of TLB consistency when rewriting the page table can be eliminated or significantly reduced. In addition, it can also significantly reduce the bus traffic in a network and nodes associated with the TLB deletion as well as a temporary stalling of a processor.
Patentliteratur 2 beschreibt beispielsweise, wie eine Zugriffsoperation auf einen inhaltsadressierbaren Speicher wie zum Beispiel einen Cachespeicher (CACHE-M) oder einen Adressumsetzpuffer (TLB, address translation buffer) in Reaktion auf eine Anweisung zur Datenübertragung wie eine MOV-Anweisung ermöglicht und ein Eintrag invalidiert werden kann. Patent Literature 2, for example, describes how to allow access to a content-addressable memory such as a cache memory (CACHE-M) or an address translation buffer (TLB) in response to a data transfer instruction such as an MOV instruction and to invalidate an entry can.
Patentliteratur 3 beschreibt die Einführung eines Paares an Softwareanweisungen zum Ermöglichen eines direkten Einfügens von Übersetzungsdaten durch Software, wie beispielsweise eines Adressübersetzungspaares, einer Seitenfehlerroutine, die die Übersetzungsdaten sowohl in das Seitenverzeichnis als auch in den TLB einfügen kann und sicherstellt, dass nach Abschluss der Ausführung einer Routine durch einen Seitenfehler-Handler, das nächste Mal wenn dieselbe virtuelle Adresse bereitgestellt wird, kein TLB-Fehltreffer (TLB miss) sondern ein TLB-Treffer (TLB hit) auftritt.Patent Literature 3 describes the introduction of a pair of software instructions for enabling direct insertion of translation data by software, such as an address translation pair, a page fault routine, which can insert the translation data into both the page directory and the TLB and ensure that upon completion of execution Routine by a page fault handler, the next time the same virtual address is provided, no TLB miss (TLB miss) but a TLB hit (TLB hit) occurs.
Liste der LiteraturstellenList of references
Patentliteraturpatent literature
NichtpatentliteraturNon-patent literature
Karin Petersen und Kai Li, „Cache Coherence for Shared Memory Multiprocessors Based on Virtual Memory Support“, in den Konferenzunterlagen des Seventh International Parallel Processing Symposium, Newport Beach, CA, April 1993, Seiten 1-18Karin Petersen and Kai Li, "Cache Coherence for Shared Memory Multiprocessors Based on Virtual Memory Support," in the conference papers of the Seventh International Parallel Processing Symposium, Newport Beach, CA, April 1993, pages 1-18
Zusammenfassung der ErfindungSummary of the invention
Technisches ProblemTechnical problem
Somit ist es eine Aufgabe der vorliegenden Erfindung, Steuerung von Cache-Kohärenz zu erzielen, womit eine erhöhte Skalierbarkeit eines Shared-Memory-Multiprocessor-Systems und eine verbesserte Kostenentwicklung bei gleichzeitiger Geringhaltung der Hardware- und Softwarekosten erreicht werden. Die Aufgabe der vorliegenden Erfindung umfasst Bereitstellen eines Verfahrens, eines Systems und eines Programmproduktes zum Erzielen einer solchen Steuerung der Cache-Kohärenz. Die Aufgabe der vorliegenden Erfindung umfasst des Weiteren Erzielen einer solchen Steuerung der Cache-Kohärenz durch Software unter Verwendung einer kostengünstigen Hardware-Konfiguration. Die Aufgabe der Erfindung umfasst des Weiteren Erzielen einer solchen Steuerung von Cache-Kohärenz mit einer für die Anwendung transparenten Software, das heißt, ohne Umschreiben eines Anwendungsprogramms.Thus, it is an object of the present invention to achieve control of cache coherency, thereby achieving increased scalability of a shared memory multiprocessor system and improved cost performance while minimizing hardware and software costs. The object of the present invention includes providing a method, a system, and a program product for achieving such cache coherency control. The object of the present invention further comprises achieving such control of cache coherency by software using a low cost hardware configuration. The object of the invention further comprises achieving such control of cache coherency with software transparent to the application, that is without rewriting an application program.
Lösung des Problemsthe solution of the problem
Die der Erfindung zugrunde liegenden Aufgaben werden mit den Merkmalen der unabhängigen Patentansprüche gelöst. Ausführungsformen der Erfindung sind in den abhängigen Ansprüchen angegeben.The objects underlying the invention are achieved by the features of the independent claims. Embodiments of the invention are indicated in the dependent claims.
Ein Verfahren zum Steuern von Cache-Kohärenz gemäß einer Ausführungsform der vorliegenden Erfindung steuert Cache-Kohärenz eines Multiprozessorsystems, in dem eine Vielzahl von Prozessoren gemeinsam einen Systemspeicher und einen TLB-Verzeichnisspeicher nutzten, wobei jeder der Vielzahl von Prozessoren einen Cachespeicher und einen TLB (Adressumsetzpuffer, translation look-aside buffer) aufweist, wobei die Einträge in dem TLB-Verzeichnisspeicher anhand entsprechender Einträge in den TLBs der Vielzahl von Prozessoren dupliziert werden. Ermittelt ein Prozessor der Vielzahl von Prozessoren, dass eine TLB-Unterbrechung, bei der es sich nicht um einen Seitenfehler handelt, in einer TLB-Suche des TLB-Verzeichnisspeichers auftritt, weist das Verfahren Durchführen, durch den Prozessor, eines Schrittes zur TLB-Fehltrefferausnahmebehandlung, mit dem die TLB-Unterbrechung als TLB-Fehltreffer behandelt wird, wenn die TLB-Unterbrechung eine TLB-Fehltrefferunterbrechung ist, die auftritt, wenn keine Registrierungsdaten mit einer übereinstimmenden Adresse in dem TLB vorhanden sind, und einen Schritt zur Speicherausnahmebehandlung auf, mit dem die TLB-Unterbrechung als Speicherunterbrechung behandelt wird, wenn die TLB-Unterbrechung eine Speicherunterbrechung ist, die auftritt, wenn Registrierungsdaten mit einer übereinstimmenden Adresse in dem TLB vorhanden sind, das Zugriffsrecht jedoch ungültig (invalid) ist. Der Schritt zur TLB-Fehltrefferausnahmebehandlung kann den Schritt des Entleerens (flushing) einer Daten-Cachezeile (data cache line) aufweisen, die zu einer physischen Seite gehört, auf die sich ein Auswahl-TLB-Eintrag (victim TLB entry) bezieht, der beim Durchführen von TLB-Ersetzen (TLB replacement) bereinigt und gelöscht wird. Der Schritt zur TLB-Fehltrefferausnahmebehandlung oder der Schritt zur Speicherausnahmebehandlung können die Schritte des Ermittelns, ob es sich bei dem Speicherzugriff, der die TLB-Fehltrefferunterbrechung oder die Speicherunterbrechung verursacht hat, um einen Zugriff auf Daten (data access) oder einen Zugriff auf Anweisungen handelt (instruction access), und, wenn ermittelt wird, dass es sich bei dem Speicherzugriff um den Zugriff auf Daten handelt, des Bereitstellens eines Schreib-, Lese- und Ausführungsrechtes auf eine physische Seite, auf die sich ein TLB-Eintrag bezieht, der im Zusammenhang mit dem Zugriff mit der ausschließlichen Beschränkung, dass es sich dabei um ein exklusives Zugriffsrecht auf die physische Seite in dem TLB eines weiteren Prozessors handelt, ersetzt oder aktualisiert wird, aufweisen.A method of controlling cache coherency in accordance with an embodiment of the present invention controls cache coherency of a multiprocessor system in which a plurality of processors share system memory and a TLB directory store, each of the plurality of processors including a cache and a TLB (address translation buffer translation look-aside buffer), wherein the entries in the TLB directory memory are duplicated by corresponding entries in the TLBs of the plurality of processors. If a processor of the plurality of processors determines that a TLB interrupt that is not a page fault occurs in a TLB search of the TLB directory store, the method comprises performing, by the processor, a step of TLB miss exception handling with which the TLB interrupt is treated as a TLB miss if the TLB interrupt is a TLB miss interrupt that occurs when no registration data is with one matching address in the TLB, and a memory exception handling step that treats the TLB interrupt as a memory interrupt if the TLB interrupt is a memory interrupt that occurs when there is registration data with a matching address in the TLB; however, the access right is invalid. The TLB miss match exception step may comprise the step of flushing a data cache line associated with a physical page to which a victim TLB entry related to the TLB entry belongs Performing TLB replacement is cleaned up and cleared. The TLB miss exception handling step or the memory exception handling step may be the steps of determining whether the memory access causing the TLB miss interrupt or the memory interrupt is data access or accessing instructions (instruction access), and if it is determined that the memory access is data access, providing a write, read and execute right to a physical page to which a TLB entry referenced in the Access is restricted to the exclusive limitation that it is an exclusive right to access the physical page in the TLB of another processor, is replaced or updated.
Vorzugsweise kann der Schritt des Bereitstellens des Schreib-, Lese- und Ausführungsrechtes mit der exklusiven Beschränkung einen Verarbeitungsschritt des Bereitstellens des Schreib-, Lese- und Ausführungsrechtes zusammen mit einer „invalidate-on-write“-Beschränkung aufweisen. Der Schritt des Bereitstellens des Schreib-, Lese- und Ausführungsrechtes zusammen mit der „invalidate-on-write“-Beschränkung kann einen MESI-Emulationsverarbeitungsschritt zum Bereitstellen des Schreib-, Lese- und Ausführungsrechtes zusammen mit einer Beschränkung des MESI-Protokolls aufweisen.Preferably, the exclusive constraint providing step of providing the read, write, and execute right may include a processing step of providing the read, write, and execute right together with an invalidate-on-write constraint. The step of providing the write, read, and execute right along with the invalidate-on-write restriction may include an MESI emulation processing step of providing the read, write, and execute right along with a restriction of the MESI protocol.
Vorzugsweise kann der MESI-Emulationsverarbeitungsschritt die Schritte aufweisen des: Ermittelns, ob es sich bei dem Speicherzugriff um ein Schreiben oder Lesen von Daten handelt, wenn ermittelt wird, dass es sich bei dem Speicherzugriff um das Lesen von Daten handelt, des Einstellens eines Leseattributes auf die physische Seite des Zugriffs in dem TLB des Prozessors und des TLB-Verzeichnisspeichers, der Registrierungsdaten für die TLBs der Vielzahl von Prozessoren enthält, des Durchsuchens des TLB-Verzeichnisspeichers nach der physischen Seite des Zugriffs und des Ermittelns, ob der TLB des anderen Prozessors das Recht zum Schreiben auf die physische Seite des Zugriffs hat, wenn ermittelt wird, dass der andere Prozessor das Recht zum Schreiben hat, des Übermittelns eines Clean Commands an den anderen Prozessor durch einen Inter-Prozessor-Interrupt und des Veranlassens des anderen Prozessors zum Freigeben des Rechtes auf Schreiben an die physische Seite des Zugriffs und des Freigebens eines Schreibattributes an die physische Seite des Zugriffs für den TLB des anderen Prozessors in dem TLB-Verzeichnisspeicher. Der Schritt des Veranlassens des anderen Prozessors zum Freigeben des Rechtes zum Schreiben auf die physische Seite des Zugriffs kann den Schritt des Veranlassens des anderen Prozessors zum Zurückkopieren des Daten-Cachespeichers und zum Deaktivieren des Schreibattributes auf die physische Seite des Zugriffs in dem TLB des anderen Prozessors aufweisen.Preferably, the MESI emulation processing step may comprise the steps of: determining whether the memory access is a data write or read, when the memory access is determined to be reading data, setting a read attribute the physical page of access in the TLB of the processor and the TLB directory store containing registration data for the TLBs of the plurality of processors, searching the TLB directory store for the physical page of the access and determining whether the TLB of the other processor is the Right to write to the physical side of the access, if it is determined that the other processor has the right to write, has a clean command passed to the other processor through an inter-processor interrupt and the other processor to release the one Right to Write to the Physical Page of Access and Sharing ns a write attribute to the physical page of access for the TLB of the other processor in the TLB directory store. The step of causing the other processor to release the right to write to the physical side of the access may include the step of causing the other processor to copy back the data cache and disable the write attribute to the physical side of access in the TLB of the other processor exhibit.
Vorzugsweise kann die MESI-Emulationsverarbeitung die Schritte aufweisen des, wenn ermittelt wird, dass es sich bei dem Speicherzugriff um das Schreiben von Daten handelt, Einstellens des Schreibattributes auf die physische Seite des Zugriffs in dem TLB des Prozessors und des TLB-Verzeichnisspeichers, des Durchsuchens des TLB-Verzeichnisspeichers der physischen Seite des Zugriffs und des Ermittelns, ob der TLB des anderen Prozessors das Recht zum Lesen, Schreiben oder Ausführen auf die physische Seite des Zugriffs hat, wenn ermittelt wird, dass der andere Prozessor das Recht zum Schreiben, Lesen oder Ausführen auf die physische Seite hat, des Übermittelns eines Flush Command (Entleerungsbefehl) an den anderen Prozessor über einen Inter-Prozessor-Interrupt und des Veranlassens des anderen Prozessors zum Freigeben des Rechtes zum Lesen, Schreiben oder Ausführen auf die physische Seite des Zugriffs, und des Freigebens der Lese-, Schreib- und Ausführungsattribute an die physische Seite des Zugriffs für den TLB des anderen Prozessors in dem TLB-Verzeichnisspeicher. Der Schritt des Veranlassens des anderen Prozessors zum Freigeben des Rechtes zum Lesen, Schreiben und Ausführen auf die physische Seite des Zugriffs kann den Schritt des Veranlassens des anderen Prozessors zum Zurückkopieren und Invalidieren des Daten-Cachespeichers und zum Deaktivieren der Lese-, Schreib- und Ausführungsattribute an der physischen Seite des Zugriffs in dem TLB des anderen Prozessors aufweisen.Preferably, the MESI emulation processing may include the steps of, if it is determined that the memory access is data writing, setting the write attribute to the physical side of the access in the TLB of the processor and the TLB directory memory, the browsing the TLB directory store the physical side of the access and determine whether the TLB of the other processor has the right to read, write or execute on the physical side of the access if it is determined that the other processor has the right to write, read or Performing on the physical side, transmitting a Flush Command to the other processor via an inter-processor interrupt and causing the other processor to release the right to read, write, or execute on the physical side of the access, and releasing the read, write, and execute attributes to the physical page te the access for the TLB of the other processor in the TLB directory memory. The step of causing the other processor to release the right to read, write and execute on the physical side of the access may include the step of causing the other processor to copy back and invalidate the data cache and disable the read, write and execute attributes on the physical side of the access in the TLB of the other processor.
Vorzugsweise kann der Schritt zur TLB-Fehltrefferausnahmebehandlung oder der Schritt zur Speicherausnahmebehandlung die Schritte aufweisen des Ermittelns, ob es sich bei dem Speicherzugriff, der die TLB-Fehltrefferunterbrechung oder die Speicherunterbrechung verursacht hat, um einen Zugriff auf Daten oder einen Zugriff auf Anweisungen handelt, wenn ermittelt wird, dass es sich bei dem Speicherzugriff um den Zugriff auf Anweisungen handelt, des Ermittelns, ob ein Eintrag in einer Seitentabelle in dem Systemspeicher ein Recht zur Benutzerschreiberlaubnis auf die physische Seite aufweist, auf der die TLB-Fehltrefferunterbrechung aus einem Anweisungsabruf resultiert hat, wenn ermittelt wird, dass der Eintrag in der Seitentabelle das Recht zur Benutzerschreiberlaubnis aufweist, des Ermittelns, ob der TLB des anderen Prozessors ein Recht zur Benutzerschreiberlaubnis auf die physische Seite hat und, wenn ermittelt wird, dass der TLB den anderen Prozessors das Recht zur Benutzerschreiberlaubnis hat, des Übermittelns eines Clean Command an den anderen Prozessor über einen Inter-Prozessor-Interrupt und des Veranlassens des anderen Prozessors zum Freigeben des Rechtes zur Benutzerschreiberlaubnis. Wenn ermittelt wird, dass der TLB des anderen Prozessors das Recht zur Benutzerschreiberlaubnis nicht hat oder nach dem Schritt des Veranlassens des anderen Prozessors zum Freigeben des Rechtes zur Benutzerschreiberlaubnis können der Schritt zur TLB-Fehltrefferausnahmebehandlung oder der Schritt zur Speicherausnahmebehandlung den Schritt des Invalidierens eines Anweisungs-Cachespeichers des Prozessors, der den Zugriff vorgenommen hat, aufweisen. Wenn ermittelt wird, dass der Eintrag in der Seitentabelle das Recht zur Benutzerschreiberlaubnis nicht aufweist oder nach dem Schritt des Invalidierens des Anweisungs-Cachespeichers des Prozessors, der den Zugriff vorgenommen hat, kann der Schritt zur TLB-Fehltrefferausnahmebehandlung oder der Schritt zur Speicherausnahmebehandlung den Schritt des Einstellens des Ausführungsattributes auf die physische Seite aufweisen, auf der der TLB-Fehltreffer aus dem Anweisungsabruf in dem TLB des Prozessors, der den Zugriff vorgenommen hat, und dem TLB-Verzeichnisspeicher, der Registrierungsdaten für die TLBs der Vielzahl von Prozessoren enthält, resultiert.Preferably, the TLB miss exception handling step or the memory exception handling step may comprise the steps of determining whether the memory access causing the TLB miss interrupt or the memory interrupt is access to data or access to instructions when it is determined that the memory access is the access to instructions, determining if an entry in a page table is in the system memory has a right to user write permission to the physical page on which the TLB miss interrupt resulted from an instruction fetch, if it is determined that the entry in the page table has the right to user write permission, determining whether the TLB of the other processor has a right to Has user write permission to the physical page and, if it is determined that the TLB has the other processor the right to user write permission, to submit a clean command to the other processor via an inter-processor interrupt and to cause the other processor to release the right to the user writer permission. If it is determined that the TLB of the other processor does not have the right to user write permission or after the step of causing the other processor to release the right to user write permission, the TLB miss exception handling step or the memory exception handling step may invalidate the step of invalidating an instruction write permission. Cache of the processor that has made the access. If it is determined that the entry in the page table does not have the right to user-write permission or after the step of invalidating the instruction cache of the processor that made the access, the TLB miss-exception handling step or the memory-exception handling step may perform the step of Setting the execution attribute to the physical page where the TLB miss results from the instruction fetch in the TLB of the processor that made the access and the TLB directory memory that holds registration data for the TLBs of the plurality of processors.
Vorzugsweise kann der MESI-Emulationsverarbeitungsschritt des Weiteren den Schritt des Durchführens von sequenziellem Zugriff unter Verwendung eines Semaphors beim Durchsuchen des TLB-Verzeichnisspeichers nach der physischen Seite des Zugriffs aufweisen.Preferably, the MESI emulation processing step may further comprise the step of performing sequential access using a semaphore when searching the TLB directory store for the physical side of the access.
Mit einer Ausführungsform der vorliegenden Erfindung wird ein Computerprogrammprodukt zum Steuern von Cache-Kohärenz bereitgestellt, wobei das Computerprogrammprodukt einen Prozessor zum Ausführen eines jeden der vorstehend beschriebenen Schritte veranlasst.One embodiment of the present invention provides a computer program product for controlling cache coherency, wherein the computer program product causes a processor to perform each of the steps described above.
Ein System zum Steuern von Cache-Kohärenz gemäß einer weiteren Ausführungsform der vorliegenden Erfindung steuert Cache-Kohärenz eines Multiprozessorsystems, in dem eine Vielzahl von Prozessoren, die jeweils einen Cachespeicher und einen TLB aufweisen, gemeinsam einen Systemspeicher und einen TLB-Verzeichnisspeicher nutzen, wobei die Einträge in dem TLB-Verzeichnisspeicher anhand entsprechender Einträge in den TLBs der Vielzahl von Prozessoren dupliziert werden. Jeder der Prozessoren weist des Weiteren einen TLB-Controller, aufweisend eine TLB-Sucheinheit, die eine TLB-Suche durchführt, und einen Kohärenz-Handler auf, der eine TLB-Registrierungsdaten-Verarbeitung durchführt, wenn bei der TLB-Suche kein Treffer (no hit) sondern eine TLB-Unterbrechung auftritt. Der Kohärenz-Handler weist einen TLB-Replacement-Handler (TLB-Ersetzen-Handler), eine TLB-Fehltrefferausnahmebehandlungs-Einheit und eine Speicherausnahmebehandlungs-Einheit auf. Der TLB-Replacement-Handler durchsucht eine Seitentabelle in dem Systemspeicher und führt ein Ersetzen an TLB-Registrierungsdaten durch. Wenn es sich bei der TLB-Unterbrechung nicht um einen Seitenfehler handelt, behandelt die TLB-Fehltrefferausnahmebehandlungs-Einheit die TLB-Unterbrechung als TLB-Fehltrefferunterbrechung, wenn die TLB-Unterbrechung eine TLB-Fehltrefferunterbrechung ist, die auftritt, wenn keine Registrierungsdaten mit einer übereinstimmenden Adresse in dem TLB vorhanden sind, und die Speicherausnahmebehandlungs-Einheit behandelt die TLB-Unterbrechung als Speicherunterbrechung, wenn die TLB-Unterbrechung eine Speicherunterbrechung ist, die auftritt, wenn Registrierungsdaten mit einer übereinstimmenden Adresse im TLB vorhanden sind, das Zugriffsrecht jedoch ungültig ist. Die TLB-Fehltrefferausnahmebehandlungs-Einheit kann eine Daten-Cachezeile eines Cachespeichers entleeren, der zu einer physischen Seite gehört, auf die sich ein Auswahl-TLB-Eintrag bezieht, der beim Durchführen des TLB-Ersetzens bereinigt und gelöscht wird. Sowohl die TLB-Fehltrefferausnahmebehandlungs-Einheit als auch die Speicherausnahmebehandlungs-Einheit können ermitteln, ob es sich bei dem Speicherzugriff, der den TLB-Fehltreffer oder die Speicherunterbrechung verursacht hat, um einen Zugriff auf Daten oder einen Zugriff auf Anweisungen handelt, und, wenn ermittelt wird, dass es sich bei dem Speicherzugriff um den Zugriff auf Daten handelt, ein Recht zum Schreiben, Lesen und Ausführen auf eine physische Seite bereitstellen, auf die sich ein TLB-Eintrag bezieht, der im Zusammenhang mit dem Zugriff ersetzt oder aktualisiert wird, zusammen mit der exklusiven Beschränkung, dass es sich dabei um ein exklusives Zugriffsrecht auf die physische Seite in dem TLB eines anderen Prozessors handelt.A system for controlling cache coherency according to another embodiment of the present invention controls cache coherency of a multiprocessor system in which a plurality of processors, each having a cache and a TLB, share system memory and a TLB directory store, the Entries in the TLB directory memory are duplicated by means of corresponding entries in the TLBs of the plurality of processors. Each of the processors further includes a TLB controller comprising a TLB search unit that performs a TLB search and a coherency handler that performs TLB registration data processing when no hit is detected in the TLB search (no hit) but a TLB interruption occurs. The coherency handler includes a TLB replacement handler, a TLB miss exception handler, and a memory exception handler. The TLB replacement handler searches a page table in the system memory and performs a replace to TLB registration data. If the TLB interrupt is not a page fault, the TLB miss exception handler treats the TLB interrupt as a TLB miss interrupt if the TLB interrupt is a TLB miss interrupt that occurs if no registration data matches a matching one Address in the TLB, and the memory exception handler treats the TLB interrupt as a memory interrupt if the TLB interrupt is a memory interrupt that occurs when there is registration data with a matching address in the TLB, but the access right is invalid. The TLB miss exception handler may flush a data cache line of a cache associated with a physical page to which a select TLB entry pertains and clears upon performing TLB replacement. Both the TLB miss exception handler and the memory exception handler may determine whether the memory access that caused the TLB miss or memory interrupt is accessing data or accessing instructions, and if detected in that the memory access is data access, providing a right to write, read and execute on a physical page to which a TLB entry related to the access is replaced or updated with the exclusive limitation that it is an exclusive right to access the physical page in another processor's TLB.
Sowohl die TLB-Fehltrefferausnahmebehandlungs-Einheit als auch die Speicherausnahmebehandlungs-Einheit können ermitteln, ob es sich bei dem Speicherzugriff, der den TLB-Fehltreffer oder die Speicherunterbrechung verursacht hat, um einen Zugriff auf Daten oder einen Zugriff auf Anweisungen handelt, wenn ermittelt wird, dass es sich bei dem Speicherzugriff um den Zugriff auf Anweisungen handelt, können sie ermitteln, ob ein Eintrag in einer Seitentabelle in dem Systemspeicher ein Recht zur Benutzerschreiberlaubnis auf die physische Seite aufweist, auf der die TLB-Fehltrefferunterbrechung aus einem Anweisungsabruf resultiert, wenn ermittelt wird, dass der Eintrag in der Seitentabelle das Recht zur Benutzerschreiberlaubnis hat, kann ermittelt werden, ob der TLB des anderen Prozessors ein Recht zur Benutzerschreiberlaubnis auf die physische Seite hat, und wenn ermittelt wird, dass der TLB des anderen Prozessors das Recht zur Benutzerschreiberlaubnis hat, können sie ein Clean Command an den anderen Prozessor über einen Inter-Prozessor-Interrupt übermitteln und den anderen Prozessor zum Freigeben des Rechtes zur Benutzerschreiberlaubnis veranlassen.Both the TLB miss exception handler and the memory exception handler may determine whether the memory access that caused the TLB miss or memory interrupt is accessing data or accessing instructions when it is detected. That the memory access is access to instructions, they can determine whether an entry in a page table in system memory has a right to user write permission on the physical side, where the TLB miss interrupt results from an instruction fetch, if it is determined that the entry in the page table has the right to user write permission, then it can be determined whether the TLB of the other processor has a right to user write permission to the physical Page, and if it is determined that the other processor's TLB has the right to user-write permission, they may submit a clean command to the other processor via an inter-processor interrupt and cause the other processor to release the user-write permission.
Das System zum Steuern von Cache-Kohärenz kann des Weiteren einen TLB-Verzeichnisspeicher (directory memory) aufweisen, der Registrierungsdaten für die TLBs der Vielzahl von Prozessoren enthält und der von der Vielzahl von Prozessoren nach einer physischen Seite durchsucht wird.The system for controlling cache coherency may further comprise a TLB directory memory containing registration data for the TLBs of the plurality of processors and which is searched by the plurality of processors for a physical page.
Vorzugsweise kann das Multiprozessorsystem eine Vielzahl von Knoten aufweisen, wobei jeder der Vielzahl von Knoten die Vielzahl von Prozessoren aufweisen kann, der Systemspeicher über einen kohärenten gemeinsam genutzten Bus („shared Bus“) mit der Vielzahl von Prozessoren und dem TLB-Verzeichnisspeicher und einem Semaphor-Handler verbunden ist, der für den sequenziellen Zugriff auf den TLB-Verzeichnisspeicher durch die Vielzahl von Prozessoren unter Verwendung eines Semaphors verwendet wird, wobei der TLB-Verzeichnisspeicher und der Semaphor-Handler mit dem kohärenten gemeinsam genutzten Bus über einen Bridge-Mechanismus verbunden sind. Die Vielzahl von Knoten kann untereinander durch einen NCC-NUMA-Mechanismus verbunden sein.Preferably, the multiprocessor system may include a plurality of nodes, wherein each of the plurality of nodes may include the plurality of processors, the system memory via a shared bus with the plurality of processors and the TLB directory memory, and a semaphore Handler used for the sequential access to the TLB directory memory by the plurality of processors using a semaphore, the TLB directory memory and the semaphore handler being connected to the coherent shared bus via a bridge mechanism , The plurality of nodes may be interconnected by an NCC NUMA mechanism.
Vorteilhafte Auswirkungen der ErfindungAdvantageous effects of the invention
Mit der vorliegenden Erfindung kann eine Cache-Kohärenz-Steuerung erzielt werden, die eine erhöhte Skalierbarkeit eines Shared-Memory-Multiprocessor-Systems und eine verbesserte Kostenentwicklung bei gleichzeitiger Geringhaltung der Kosten von Hardware und Software ermöglicht. Insbesondere werden ein Verfahren, ein System und ein Programmprodukt zum Erzielen einer solchen Cache-Kohärenz-Steuerung bereitgestellt, wobei die Steuerung der Cache-Kohärenz durch Software unter Verwendung von kostengünstiger Hardware und darüber hinaus ohne ein Umschreiben eines Anwendungsprogramms erzielt werden kann.With the present invention, a cache coherence control can be achieved which allows increased scalability of a shared memory multiprocessor system and improved cost performance while minimizing the cost of hardware and software. In particular, there is provided a method, system, and program product for achieving such cache coherency control, wherein control of cache coherency by software can be achieved using inexpensive hardware and, moreover, without rewriting an application program.
Figurenlistelist of figures
Beschreibung der Ausführungsformen Description of the embodiments
Im Folgenden wird unter Bezugnahme auf die Zeichnungen die am besten geeignete Praktik zum Umsetzen der vorliegenden Erfindung beschrieben. Die nachstehend beschriebenen Ausführungsformen beabsichtigen keine Beschränkung des Umfangs der Ansprüche der Erfindung, und zum Lösen des Problems sind auch nicht alle der Kombinationen und Leistungsmerkmale erforderlich, die in den Ausführungsformen beschrieben werden. Die vorliegende Erfindung kann in vielen unterschiedlichen Formen ausgeführt sein und sollte nicht im auf die Inhalte der hierin beschriebenen Ausführungsformen beschränkenden Sinne erachtet werden. Im Verlauf dieser Beschreibung sind dieselben Abschnitte und Elemente mit den denselben Referenzzahlen versehen.In the following, the most suitable practice for practicing the present invention will be described with reference to the drawings. The embodiments described below are not intended to limit the scope of the claims of the invention, and to solve the problem, not all of the combinations and features described in the embodiments are required. The present invention may be embodied in many different forms and should not be construed as limiting the contents of the embodiments described herein. In the course of this description the same sections and elements are given the same reference numerals.
Die TLB-Sucheinheit
Der Kohärenz-Handler
Die BS-Kernel-Verarbeitung
Die TLB-Fehltrefferbehandlungs-Einheit
Wird oder werden ein TLB-Eintrag, das heißt Registrierungsdaten ersetzt, das heißt ausgetauscht oder für eine TLB-Fehltrefferunterbrechung und eine Speicherunterbrechung aktualisiert, wird das Lese/Schreib/Ausführungsrecht bereitgestellt, das der Beschränkung des MESI-Protokolls entspricht. In einem Prozessor, in dem eine Tabellensuche von Hardware gestützt wird, erfüllt der TLB gerade mal die Funktion, dass ein Teil der Seitentabelle im Cachespeicher zwischengespeichert wird, wohingegen für die Steuerung der Cache-Kohärenz, die in
Bei einer TLB-Fehltrefferunterbrechung oder einer Speicherunterbrechung sucht ein lokaler Prozessor
Wie dies kurz vorstehend erwähnt wurde, wird sowohl bei einer TLB-Fehltrefferunterbrechung als auch bei einer Speicherunterbrechung beim Ersetzen oder Aktualisieren eines TLB-Eintrages, das heißt der Registrierungsdaten, das Lese/Schreib/Ausführungsrecht, das dem nachstehend beschriebenen MESI-Protokoll für die exklusive Beschränkung (exclusive constraint) entspricht, beispielsweise die „invalidate-on-write“-Beschränkung, zwischen einem lokalen und einem fernen TLB eingestellt.As mentioned briefly above, in both a TLB miss and a memory break, when replacing or updating a TLB entry, that is, the registration data, the read / write / execute right becomes the exclusive MESI protocol described below Exclusive constraint, for example, the invalidate-on-write constraint, is set between a local and a remote TLB.
Gemeinsatzes Nutzen von „Nur-Lese-Daten“ (read-only data)Common use of "read-only data" (read-only data)
Das Recht zum Lesen und Ausführen auf derselben physischen Seite kann von einer Vielzahl von Prozessoren gemeinsam genutzt werden. Kommt es zu einer TLB-Unterbrechung in einem Datenlesevorgang (data read) oder einem Anweisungsabruf (instruction fetch) und ein ferner Prozessor hat das Recht zum Schreiben auf diese physische Seite, wird diesem fernen Prozessor über einen IPI (Inter Processor Interrupt) ein Clean Command übermittelt, und dieser Prozessor wird dazu veranlasst, das Recht zum Schreiben auf diese physische Seite freizugeben.The right to read and execute on the same physical page can be shared by a variety of processors. If there is a TLB interrupt in a data read or instruction fetch and a remote processor has the right to write to that physical page, that remote processor becomes a Clean Command via an IPI (Inter Processor Interrupt) and this processor is prompted to release the right to write to this physical page.
Exklusive Steuerung/Kontrolle von SchreibdatenExclusive control / control of write data
Hat ein Prozessor das Recht zum Schreiben auf eine physische Seite, haben die anderen Prozessoren keinerlei Zugriffsrecht auf diese Seite. Mit anderen Worten bedeutet dies, dass ein ferner TLB keinerlei Art von Zugriffsrecht auf eine physische Seite hat, für die ein lokaler TLB Schreibrecht hat. Wenn dementsprechend ein Schreibzugriff (access for writing) eine TLB-Fehltrefferunterbrechung oder eine Speicherunterbrechung verursacht, wird ein ferner TLB überprüft, um zu ermitteln, ob ein ferner Prozessor Zugriffsrecht auf die physische Seite hat; wenn er solch ein Zugriffsrecht hat, wird der ferne Prozessor zum Entleeren der Daten dieser physischen Seiten aus dem fernen Cachespeicher veranlasst.If a processor has the right to write to a physical page, the other processors have no access to that page. In other words, this means that a remote TLB has no type of access to a physical page for which a local TLB has write permission. Accordingly, if an access for writing causes a TLB miss interrupt or a memory interrupt, a remote TLB is checked to determine if a remote processor has access to the physical page; if it has such an access right, the remote processor is caused to empty the data of these physical pages from the remote cache.
Wenn (in Schritt
Auf diese Weise wird Snoop-Filtern, das heißt, Snoop Deletion unter Verwendung des TLB zum Einstellen des Lese/Schreib/Ausführungsrechtes gemäß der MESI-Protokoll-Beschränkung durchgeführt. Es wird ein Ermittlungsschritt zum Beschränken der Fälle eines Sendens einer Snoop-Anforderung auf den Fall eines beim Implementieren des MESI-Protokolls durch Hardware auftretenden Problems beschränkt, in dem die physische Seite, die diese Daten abdeckt, ebenfalls in einem fernen TLB registriert sind. Dementsprechend kann mit der MESI-Emulationsverarbeitung, bei der die MESI-Protokoll-Beschränkung durch Softwaresteuerung auferlegt wird, eine höhere Skalierbarkeit verglichen mit der Implementierung des MESI-Protokolls durch Hardware erzielt werden.In this way, snoop filtering, that is, snoop deletion, is performed using the TLB for setting the read / write / execute right according to the MESI protocol limitation. A determination step is restricted to restricting the cases of sending a snoop request to the case of a hardware-related problem in implementing the MESI protocol, in which the physical page covering that data is also registered in a remote TLB. Accordingly, with MESI emulation processing, where the MESI protocol limitation is imposed by software control, higher scalability can be achieved as compared to implementation of the MESI protocol by hardware.
Mit dem Kohärenz-Handler zum Steuern von Cache-Kohärenz gemäß einer Ausführungsform der vorliegenden Erfindung kann Kohärenz sowohl zwischen Daten-Cachespeichern als auch Kohärenz zwischen einem Anweisungs-Cachespeicher und einem Daten-Cachespeicher gesteuert werden. Dies wird durch Invalidieren der Anweisungs-Cachezeile dann, wenn eine TLB-Fehltrefferunterbrechung von einem Anweisungsabruf (instruction fetch) auf einer beschreibbaren Seite mit einem Schreiberlaubnisrecht resultiert, erreicht. Wie bei Linux muss zum Unterstützen einer dynamischen Link-Bibliothek (dynamic link library) beispielsweise ein Anweisungs-Cachespeicher zu einem Daten-Cachespeicher kohärent sein. Bei Linux muss nur dann ein Anweisungs-Cachespeicher invalidiert werden, wenn eine beschreibbare Seite in einem Benutzerraum (user space) abgerufen wird.With the coherency handler for controlling cache coherency in accordance with an embodiment of the present invention, coherency between both data caches and coherency between an instruction cache and a data cache may be controlled. This is achieved by invalidating the instruction cache line when a TLB miss interrupt results from an instruction fetch on a writable page with a write permission. As with Linux, for example, to support a dynamic link library, an instruction cache must be coherent to a data cache. In Linux, an instruction cache only needs to be invalidated when a writable page in a user space is retrieved.
Auf den TLB-Verzeichnisspeicher
Semaphor-ID = mod(physical page number, S)
wobei mod(a, b) den Rest darstellt, wenn a durch b geteilt wird.To the
Semaphore ID = mod (physical page number, S)
where mod (a, b) represents the remainder when a is divided by b.
Wird dieses Konzept auf NUMA angewendet, bei dem es sich um ein Distributed-Shared-Memory-System handelt, können unterschiedliche Semaphoren für jeweilige NUMA-Knoten zugewiesen werden. Nur wenn ein Fernzugriff durchgeführt wird, kann auf den fernen TLB-Verzeichnisspeicher verwiesen und ein Semaphor erworben werden; anderenfalls kann auf einen lokalen TLB-Verzeichnisspeicher verwiesen und ein Semaphor erworben werden.When this concept is applied to NUMA, which is a distributed shared memory system, different semaphores can be assigned for respective NUMA nodes. Only when a remote access is performed can the remote TLB directory store be referenced and a semaphore acquired; otherwise, a local TLB directory store can be referenced and a semaphore acquired.
Bei einem NUMA-System wird das Zuweisen einer Aufgabe einem Prozessor oder einem physischen Speicher so optimiert, dass die Häufigkeit des Zugriffs auf den lokalen Systemspeicher höher als der auf den fernen Systemspeicher ist. Für eine Anwendung auf solch ein NUMA-System werden vorzugsweise sowohl der TLB-Verzeichnisspeicher als auch Semaphoren an NUMA-Knoten verteilt. Der verteilte TLB-Verzeichnisspeicher zeichnet eine Nummer einer physischen Seite eines lokalen Systemspeichers und die ID eines Prozessors, der sie in einem Cachespeicher zwischenspeichert, auf, und die verteilten Semaphoren schützen den entsprechenden verteilten TLB-Verzeichnisspeicher. Als Ergebnis wird auf den TLB-Verzeichnisspeicher und den fernen Semaphor nur dann verwiesen, wenn ein Fernzugriff (remote access) ausgeführt wird. Ein anderer lokaler Zugriff kann unter Verwendung von lediglich des lokalen TLB-Verzeichnisspeichers und des lokalen Semaphors verarbeitet werden.In a NUMA system, the assignment of a task to a processor or physical memory is optimized so that the frequency of access to the local system memory is higher than that to the remote system memory. For an application to such a NUMA system, preferably both the TLB directory store and semaphores are distributed to NUMA nodes. The distributed TLB directory store records a number of a physical page of a local system memory and the ID of a processor caching it in a cache, and the distributed semaphores protect the corresponding distributed TLB directory store. As a result, the TLB directory store and the remote semaphore are referenced only when a remote access is performed. Another local access can be processed using only the TLB local directory store and the local semaphore.
Die Kosten der durch Hardware gestützten Kohärenz sind für den Zugriff auf den lokalen Systemspeicher gering, für den Zugriff auf einen fernen Systemspeicher jedoch hoch. Um dieses Problem zu behandeln, wird ein erweitertes hybrides System aus SMP und NCC-NUMA verwendet, in dem ein kostengünstiger Snoop-Bus zum Zugriff auf den lokalen Systemspeicher und Steuerung von Cache-Kohärenz gemäß der vorliegenden Erfindung für den Zugriff auf den fernen Systemspeicher angewendet werden kann. Mit anderen Worten bedeutet dies, dass ein Shared-Memory-Multiprocessor-System, das insgesamt kohärent ist, in dem Kohärenz durch Hardware für den Zugriff auf den lokalen Systemspeicher und Steuerung von Cache-Kohärenz gemäß der vorliegenden Erfindung gewährleistet wird, konfiguriert werden kann.
Ist die Anzahl an Einträgen in dem TLB-Verzeichnisspeicher nicht begrenzt, und können sowohl der lokale Systemspeicher als auch der ferne Systemspeicher frei zugeordnet werden, nimmt die Größe des TLB-Verzeichnisspeichers im Verhältnis zu der Anzahl der Prozessoren zu. Wenn beispielsweise jeder der 1024 Prozessoren einen TLB aus 1024 Einträgen hat und ein Eintrag über 4 Bytes verfügt, beträgt die Größe des TLB-Verzeichnisspeichers anhand der folgenden Berechnung 4 MB:
Zum Verringern der Größe des TLB-Verzeichnisspeichers, wenn beispielsweise das System auf ein NUMA-System angewendet wird, wie dies in
Wird das TLB-Verzeichnis auf einem CAM implementiert, beträgt in dem Fall einer 45-nm-Halbleitertechnologie, die Fläche einer Region, die für das TLB-Verzeichnis erforderlich ist, lediglich 1 mm2.When the TLB directory is implemented on a CAM, in the case of 45nm semiconductor technology, the area of a region required for the TLB directory is only 1 mm2 .
Wenn, wie dies vorstehend beschrieben wurde, Steuerung der Cache-Kohärenz gemäß der vorliegenden Erfindung durch Software durchgeführt wird, können die Hardware-Kosten auf ein den Kosten für ein Cluster entsprechendes Maß verringert und die Skalierbarkeit verbessert werden, da ein Shared-Memory-Multiprocessor-System aus einer kostengünstigen Komponente wie beispielsweise einer Universalkomponente gebildet werden kann. Durch das Durchsuchen eines kleinen TLB-Verzeichnisspeichers, der nur TLB-Daten für jeden Prozessor für eine physische Seite verwaltet, können nicht nur eine Vielzahl von Prozessen behandelt werden, es entfällt auch die Notwendigkeit des Änderns des Anwendungsprogramms, womit die Skalierbarkeit ohne zusätzliche Software-Kosten verbessert wird.As described above, if control of cache coherency according to the present invention is performed by software, the hardware cost can be reduced to a cost corresponding to a cluster and the scalability can be improved as a shared memory multiprocessor System can be formed from a low-cost component such as a universal component. By searching a small TLB directory store, which manages only TLB data for each physical page processor, not only a multitude of processes can be handled, it also eliminates the need to modify the application program, thus increasing scalability without the need for additional software. Cost is improved.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010263714 | 2010-11-26 | ||
| JPJP-2010-263714 | 2010-11-26 | ||
| JP2010-263714 | 2010-11-26 | ||
| PCT/JP2011/070116WO2012070291A1 (en) | 2010-11-26 | 2011-09-05 | Method, system, and program for cache coherency control |
| Publication Number | Publication Date |
|---|---|
| DE112011103433T5 DE112011103433T5 (en) | 2013-07-25 |
| DE112011103433B4true DE112011103433B4 (en) | 2019-10-31 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| DE112011103433.4TExpired - Fee RelatedDE112011103433B4 (en) | 2010-11-26 | 2011-09-05 | Method, system and program for controlling cache coherency |
| Country | Link |
|---|---|
| JP (1) | JP5414912B2 (en) |
| CN (1) | CN103229152B (en) |
| DE (1) | DE112011103433B4 (en) |
| GB (1) | GB2499168B (en) |
| TW (1) | TW201234180A (en) |
| WO (1) | WO2012070291A1 (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6303632B2 (en)* | 2014-03-10 | 2018-04-04 | 富士通株式会社 | Arithmetic processing device and control method of arithmetic processing device |
| US9785554B2 (en)* | 2014-05-30 | 2017-10-10 | International Business Machines Corporation | Synchronizing updates of page table status indicators in a multiprocessing environment |
| US9514058B2 (en)* | 2014-12-22 | 2016-12-06 | Texas Instruments Incorporated | Local page translation and permissions storage for the page window in program memory controller |
| CN104750561B (en)* | 2015-04-15 | 2019-09-10 | 苏州中晟宏芯信息科技有限公司 | Dynamic release method, system and a kind of processor of register file cache resources |
| GB2539383B (en)* | 2015-06-01 | 2017-08-16 | Advanced Risc Mach Ltd | Cache coherency |
| CN106326146B (en)* | 2015-06-29 | 2019-05-14 | 上海华虹集成电路有限责任公司 | Check the method whether cache hits |
| US10262721B2 (en)* | 2016-03-10 | 2019-04-16 | Micron Technology, Inc. | Apparatuses and methods for cache invalidate |
| US10503641B2 (en)* | 2016-05-31 | 2019-12-10 | Advanced Micro Devices, Inc. | Cache coherence for processing in memory |
| JP6235088B2 (en)* | 2016-08-24 | 2017-11-22 | ルネサスエレクトロニクス株式会社 | Information processing device |
| CN108536473B (en)* | 2017-03-03 | 2021-02-23 | 华为技术有限公司 | Method and apparatus for reading data |
| TWI622881B (en)* | 2017-04-25 | 2018-05-01 | Chunghwa Telecom Co Ltd | Cache replacement system and method thereof for memory computing cluster |
| KR20190009580A (en)* | 2017-07-19 | 2019-01-29 | 에스케이하이닉스 주식회사 | Controller and operation method thereof |
| GB2570474B (en)* | 2018-01-26 | 2020-04-15 | Advanced Risc Mach Ltd | Region fusing |
| CN112612726B (en)* | 2020-12-08 | 2022-09-27 | 海光信息技术股份有限公司 | Data storage method, device, processing chip and server based on cache coherence |
| CN113779649B (en)* | 2021-09-08 | 2023-07-14 | 中国科学院上海高等研究院 | A Defense Method Against Speculative Execution Attacks |
| KR102571197B1 (en) | 2022-12-07 | 2023-08-30 | 성균관대학교산학협력단 | Method for maintaining cache coherency of cluster file system |
| TWI853567B (en)* | 2023-05-11 | 2024-08-21 | 台達電子工業股份有限公司 | Distributed data backup, restore and synchronization method for multiple devices, electronic device, and data management system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS623357A (en)* | 1985-06-28 | 1987-01-09 | Yokogawa Hewlett Packard Ltd | Tlb control system |
| JPH08320829A (en)* | 1994-09-09 | 1996-12-03 | Hitachi Ltd | Data processor |
| JP2000067009A (en)* | 1998-08-20 | 2000-03-03 | Hitachi Ltd | Shared memory multiprocessor |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0736170B2 (en)* | 1991-04-03 | 1995-04-19 | 工業技術院長 | Multiprocessor system |
| US5437017A (en)* | 1992-10-09 | 1995-07-25 | International Business Machines Corporation | Method and system for maintaining translation lookaside buffer coherency in a multiprocessor data processing system |
| CA2107056C (en)* | 1993-01-08 | 1998-06-23 | James Allan Kahle | Method and system for increased system memory concurrency in a multiprocessor computer system |
| US6553460B1 (en)* | 1999-10-01 | 2003-04-22 | Hitachi, Ltd. | Microprocessor having improved memory management unit and cache memory |
| US6829683B1 (en)* | 2000-07-20 | 2004-12-07 | Silicon Graphics, Inc. | System and method for transferring ownership of data in a distributed shared memory system |
| US6633967B1 (en)* | 2000-08-31 | 2003-10-14 | Hewlett-Packard Development Company, L.P. | Coherent translation look-aside buffer |
| US6854046B1 (en)* | 2001-08-03 | 2005-02-08 | Tensilica, Inc. | Configurable memory management unit |
| US7082500B2 (en)* | 2003-02-18 | 2006-07-25 | Cray, Inc. | Optimized high bandwidth cache coherence mechanism |
| US7073043B2 (en)* | 2003-04-28 | 2006-07-04 | International Business Machines Corporation | Multiprocessor system supporting multiple outstanding TLBI operations per partition |
| US20080191920A1 (en)* | 2007-02-12 | 2008-08-14 | Sangbeom Park | Low-voltage drop reference generation circuit for A/D converter |
| US7809922B2 (en)* | 2007-10-21 | 2010-10-05 | International Business Machines Corporation | Translation lookaside buffer snooping within memory coherent system |
| US20100325374A1 (en)* | 2009-06-17 | 2010-12-23 | Sun Microsystems, Inc. | Dynamically configuring memory interleaving for locality and performance isolation |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS623357A (en)* | 1985-06-28 | 1987-01-09 | Yokogawa Hewlett Packard Ltd | Tlb control system |
| JPH08320829A (en)* | 1994-09-09 | 1996-12-03 | Hitachi Ltd | Data processor |
| JP2000067009A (en)* | 1998-08-20 | 2000-03-03 | Hitachi Ltd | Shared memory multiprocessor |
| Title |
|---|
| K. Petersen and K. Li: Cache coherence for shared memory multiprocessors based on virtual memory support . In: Proceedings Seventh International Parallel Processing Symposium, Newport, CA, USA, 1993, 49-55.* |
| Kontothanassis et Al: Shared Memory Computing on Clusters. In: ACM Transactions on Computer Systems, Vol. 23, No. 3, August 2005, 2005, 301–335.* |
| Publication number | Publication date |
|---|---|
| WO2012070291A1 (en) | 2012-05-31 |
| JP5414912B2 (en) | 2014-02-12 |
| CN103229152A (en) | 2013-07-31 |
| GB2499168B (en) | 2014-04-16 |
| JPWO2012070291A1 (en) | 2014-05-19 |
| TW201234180A (en) | 2012-08-16 |
| GB201310002D0 (en) | 2013-07-17 |
| DE112011103433T5 (en) | 2013-07-25 |
| CN103229152B (en) | 2016-10-19 |
| GB2499168A (en) | 2013-08-07 |
| Publication | Publication Date | Title |
|---|---|---|
| DE112011103433B4 (en) | Method, system and program for controlling cache coherency | |
| DE102007030116B4 (en) | Snoop filter with exclusive ownership | |
| DE112005001798B4 (en) | Managing processor resources during architectural events | |
| DE10262164B4 (en) | Computer system with a hierarchical cache arrangement | |
| US20120137079A1 (en) | Cache coherency control method, system, and program | |
| DE3856552T2 (en) | Multiprocessor digital data processing system and method for operating this system | |
| DE10296989B4 (en) | Multi-thread processor with the capability of an implicit multi-thread execution of a one-thread program | |
| DE102007048507B4 (en) | A cache memory system and method for providing a transaction store | |
| DE102019105879A1 (en) | Management of coherent links and multi-level memory | |
| DE112007001171T5 (en) | Virtualized Transaction Memory Procedure for Global Overflow | |
| DE112011104596T5 (en) | Systems, apparatus, and methods for a hardware and software system for automatically breaking a program into multiple parallel threads | |
| DE202017104840U1 (en) | Hybrid data storage management | |
| DE112010004971T5 (en) | A system, method, and apparatus for a cache flush of a page area and TLB invalidation of a range of entries | |
| DE10393727T5 (en) | Processor cache memory as RAM for executing boot code | |
| DE112016005919T5 (en) | Method and apparatus for sub-page write protection | |
| DE102016222041B4 (en) | INVALIDATION OF AN IMPLEMENTATION ENTRY IN A MULTITHREAD DATA PROCESSING SYSTEM | |
| DE102020108666B4 (en) | CACHE COHERENCE MANAGEMENT FOR MULTI-CATEGORY REMINDERS | |
| DE102019111219A1 (en) | Providing dead-block prediction for determining whether data is to be cached in cache devices. | |
| DE102021116489A1 (en) | Management of prefetch requests based on stream information for previously recognized streams | |
| DE112023001775T5 (en) | Shadow Pointer Directory in an inclusive hierarchical cache | |
| DE102021108478B4 (en) | Device and control for cache directory CAM error detection and correction | |
| DE102021127104B4 (en) | Applying a cache coherence protocol for a standard shared state | |
| DE69033601T2 (en) | Multiprocessor system and method | |
| DE112021006970T5 (en) | ARCHITECTURAL EXTENSIONS FOR ON-DEMAND MEMORY MIRRORIZING AT PAGE GRANULARITY | |
| DE102013022169A1 (en) | ERROR BUFFER TO TRACK SIDE ERRORS IN A UNIFORM VIRTUAL STORAGE SYSTEM |
| Date | Code | Title | Description |
|---|---|---|---|
| R012 | Request for examination validly filed | ||
| R016 | Response to examination communication | ||
| R016 | Response to examination communication | ||
| R018 | Grant decision by examination section/examining division | ||
| R084 | Declaration of willingness to licence | ||
| R020 | Patent grant now final | ||
| R119 | Application deemed withdrawn, or ip right lapsed, due to non-payment of renewal fee |