CN108572926A - A kind of method and apparatus for synchronizing caching belonging to central processing unit - Google Patents

A kind of method and apparatus for synchronizing caching belonging to central processing unit Download PDF

Info

Publication number
CN108572926A
CN108572926A CN201710147292.5A CN201710147292A CN108572926A CN 108572926 A CN108572926 A CN 108572926A CN 201710147292 A CN201710147292 A CN 201710147292A CN 108572926 A CN108572926 A CN 108572926A
Authority
CN
China
Prior art keywords
central processing
processing unit
belonging
memory
buffer zone
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710147292.5A
Other languages
Chinese (zh)
Other versions
CN108572926B (en
Inventor
张扬
罗犇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Cloud Computing Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710147292.5A priority Critical patent/CN108572926B/en
Publication of CN108572926A publication Critical patent/CN108572926A/en
Application granted granted Critical
Publication of CN108572926B publication Critical patent/CN108572926B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0844Multiple simultaneous or quasi-simultaneous cache accessing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/065Replication mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

It is used to synchronize the method cached belonging to central processing unit the invention discloses a kind of, including:Determine source central processing unit and purpose central processing unit;The data for the buffer zone specified belonging to the source central processing unit are synchronized to the corresponding buffer zone belonging to purpose central processing unit.The corresponding region that can will be cached belonging to data direct replication synchronization to other central processing units in being cached belonging to central processing unit, when ensuring program operation, can data directly be accessed inside local cache in other central processing units, effectively reduce expense, improve program operational efficiency.

Description

A kind of method and apparatus for synchronizing caching belonging to central processing unit
Technical field
The present invention relates to a kind of methods for the affiliated cache synchronization of central processing unit.
Background technology
Using the framework of multiple physical central processors (CPU) in the more and more common (industry in server field on one machine Boundary is known as NUMA architecture), each central processing unit has caching (cache) resource of oneself, and each CPU accesses oneself The cache that cache ratios access other CPU is many soon, but this part caching only its described CPU is able to access that, can to other CPU Can be sightless.
If an application program is run on CPU0 but the data to be accessed are at present inside the cache of CPU1, existing Some modes are that CPU maintains cache, the synchronization between memory (memory) by being referred to as spying upon the mechanism of (snoop).
When CPU0 needs go to access a data, the mode of snoop can be triggered to find out newest data at which In.For example, when in the cache that newest data are located at another CPU1, need CPU1 that cache is first synchronized to memory In, then CPU0 read again in be stored to cache, this process since CPU0 initiate access request, so to CPU0 come Say that the expense for entirely accessing and bringing will be embodied in the execution delay for the process for initiating request on CPU0.
The mode of snoop is a kind of passive mode, when needing to access the data of non-local cache storages, in addition to snoop Outside the expense of itself, once finding out newest data inside the cache of other CPU, also need to introduce additional number According to synchronization overhead.
As it can be seen that the mode of the data of the cache of the current different CPU of access there are expenses big, the low problem of operational efficiency.
Invention content
The present invention provides a kind of method for synchronizing caching belonging to central processing unit, including:
Determine source central processing unit and purpose central processing unit;
The data for the buffer zone specified belonging to the source central processing unit are synchronized to belonging to purpose central processing unit Corresponding buffer zone;
Specified buffer zone belonging to the central processing unit includes the corresponding central processing unit in specified region of memory Affiliated buffer zone.
Optionally, further include before the operation of the determining source central processing unit and purpose central processing unit:
Judge whether to meet the condition for carrying out synchronizing between the affiliated caching of central processing unit;
If satisfied, executing subsequent operation.
Optionally, described to judge whether that meeting the condition for carrying out being synchronized between the affiliated caching of central processing unit includes:
Judge whether the data of the specified region affiliated buffer zone of corresponding central processing unit of the memory are updated;
If being updated, judge the specified region of the memory mark whether include sync mark and following labels at least It is a kind of:It writes back label or writes and wear label;
If including meeting condition synchronous between carrying out caching belonging to central processing unit.
Optionally, described to judge whether that meeting the condition for carrying out being synchronized between the affiliated caching of central processing unit includes:
Judge whether to get the instruction for synchronizing the specified buffer zone belonging to central processing unit, described instruction The specified region of specified purpose central processing unit and memory;
If getting, meet condition synchronous between carrying out caching belonging to central processing unit.
Optionally, the determining source central processing unit and purpose central processing unit include:
The central processing unit that the specified region affiliated buffer zone of corresponding central processing unit of the memory is updated is made For source central processing unit;
Determine purpose central processing unit.
Optionally, the data of the specified buffer zone by the source central processing unit are synchronized to purpose central processing Before the operation of the corresponding buffer zone of device, further include:
It executes to write back or write and wears the corresponding operation of label.
Optionally, the determining source central processing unit and purpose central processing unit include:
Source central processing unit is determined using the module cached belonging to isochronous memory and central processing unit;
Determine purpose central processing unit.
Optionally, the determining source central processing unit and purpose central processing unit include:
Determine source processor;
Search the association central processing unit corresponding to the specified region of the memory;
By the centre as a purpose of other central processing units in addition to the central processing unit of source in the association central processing unit Manage device.
Optionally, the data by the buffer zone specified belonging to the source central processing unit are synchronized to purpose centre Corresponding buffer zone belonging to reason device includes:
Using the module cached belonging to isochronous memory and central processing unit, not by memory, directly by the source centre The data for the buffer zone specified belonging to reason device are synchronized to the corresponding buffer zone belonging to purpose central processing unit.
Optionally, described using the module cached belonging to isochronous memory and central processing unit, not by memory, directly by institute The data for stating the buffer zone specified belonging to the central processing unit of source are synchronized to corresponding buffer area belonging to purpose central processing unit Before the operation in domain, further include:
Judge whether the module cached belonging to isochronous memory and central processing unit is idle.
Optionally, the module of the isochronous memory and central processing unit caching is deployed in:In central processing unit or independently of Central processing unit is individually disposed.
Optionally, the data by the buffer zone specified belonging to the source central processing unit are synchronized to purpose centre Corresponding buffer zone belonging to reason device includes:
It is connected using express passway, the data for the buffer zone specified belonging to the source central processing unit is synchronized to purpose Corresponding buffer zone belonging to central processing unit.
It is used to trigger the method cached belonging to synchronous central processing unit the present invention also provides a kind of, including:
Judge whether the data of the specified region affiliated buffer zone of corresponding central processing unit of memory are updated;
If being updated, judge the specified region of the memory mark whether include sync mark and following labels at least It is a kind of:It writes back label or writes and wear label;
If including triggering synchronizes the operation cached belonging to central processing unit.
Optionally, further include before the triggering synchronizes the operation cached belonging to central processing unit:
It executes to write back or write and wears the corresponding operation of label.
It is used to start the method cached belonging to synchronous central processing unit the present invention also provides a kind of, including:
The instruction for starting and being cached belonging to synchronous central processing unit is generated, described instruction includes the mark of purpose central processing unit With the mark in the specified region of memory;
It sends described instruction and starts caching belonging to synchronous central processing unit.
The present invention also provides a kind of methods of operation memory, including:
The label in the specified region of memory is set as synchronous;
According to the label, the corresponding region of caching belonging to synchronous central processing unit.
It is used to synchronize the device cached belonging to central processing unit the present invention also provides a kind of, including:
Determination unit, for determining source central processing unit and purpose central processing unit;
Synchronization unit, for the data for the buffer zone specified belonging to the source central processing unit to be synchronized to purpose center Corresponding buffer zone belonging to processor.
Optionally, further include:
Judging unit meets the condition synchronized between caching belonging to progress central processing unit for judging whether.
Optionally, the judging unit includes:
First judgment sub-unit, the specified region affiliated buffer zone of corresponding central processing unit for judging the memory Data whether be updated;
Marker for judgment subelement, if for being updated, judge the specified region of the memory marks whether to include synchronizing At least one of label and following labels:It writes back label or writes and wear label;
Including subelement, if for including, meet condition synchronous between carrying out caching belonging to central processing unit.
Optionally, the judging unit includes:
Second judgment sub-unit carries out the specified buffer zone belonging to central processing unit for judging whether to get Synchronous instruction, described instruction specify the specified region of purpose central processing unit and memory;
Subelement is got, if with getting, meets condition synchronous between carrying out caching belonging to central processing unit.
Optionally, the determination unit includes:
Source determination subelement is used for the specified region affiliated buffer zone of corresponding central processing unit of the memory by more New central processing unit is as source central processing unit;
Purpose determination subelement, for determining purpose central processing unit.
Optionally, further include:
Corresponding operating execution unit wears the corresponding operation of label for executing to write back or write.
Optionally, the determination unit includes:
Source determines the second subelement, for determining source center using the module cached belonging to isochronous memory and central processing unit Processor;
Purpose determination subelement, for determining purpose central processing unit.
Optionally, the determination unit includes:
Source determination subelement, for determining source processor;
Subelement is searched, for searching the association central processing unit corresponding to the specified region of the memory;
As subelement, it is used for other central processing units in the association central processing unit in addition to the central processing unit of source Central processing unit as a purpose.
Optionally, the synchronization unit is specifically used for:
Using the module cached belonging to isochronous memory and central processing unit, not by memory, directly by the source centre The data for the buffer zone specified belonging to reason device are synchronized to the corresponding buffer zone belonging to purpose central processing unit.
Optionally, further include:
Whether idle determination unit, the module for judging to cache belonging to isochronous memory and central processing unit are idle.
It is used to trigger the device cached belonging to synchronous central processing unit the present invention also provides a kind of, including:
Judging unit, for judge memory the specified region affiliated buffer zone of corresponding central processing unit data whether It is updated;
Marker for judgment unit, if for being updated, judge the specified region of the memory marks whether to include synchronous mark At least one of note and following labels:It writes back label or writes and wear label;
Trigger element, if for including, triggering synchronizes the operation cached belonging to central processing unit.
Optionally, further include:
Execution unit wears the corresponding operation of label for executing to write back or write.
It is used to start the device cached belonging to synchronous central processing unit the present invention also provides a kind of, including:
Generation unit, for generating the instruction for starting and being cached belonging to synchronous central processing unit, described instruction includes in purpose The mark of the mark of central processor and the specified region of memory;
Transmission unit is cached for sending belonging to the synchronous central processing unit of described instruction startup.
The present invention also provides a kind of devices of operation memory, including:
Setting unit, for the label in the specified region of memory to be set as synchronous;
Synchronization unit, for according to the label, the synchronous affiliated corresponding region cached of central processing unit.
The present invention also provides a kind of machine readable storage medium, during the storage medium is stored or is carried for synchronizing The instruction cached belonging to central processor, after described instruction is performed, leads to operations described below:
Judge whether to meet the condition for carrying out synchronizing between the affiliated caching of central processing unit;
If satisfied, determining source central processing unit and purpose central processing unit;
The data for the buffer zone specified belonging to the source central processing unit are synchronized to belonging to purpose central processing unit Corresponding buffer zone;
Specified buffer zone belonging to the central processing unit includes the corresponding central processing unit in specified region of memory Affiliated buffer zone.
The present invention also provides a kind of machine readable storage medium, the storage medium stores or carries same for triggering The instruction cached belonging to central processing unit is walked, after described instruction is performed, leads to operations described below:
Judge whether the data of the specified region affiliated buffer zone of corresponding central processing unit of memory are updated;
If being updated, judge the specified region of the memory mark whether include sync mark and following labels at least It is a kind of:It writes back label or writes and wear label;
If including synchronizing the operation cached belonging to central processing unit.
The present invention also provides a kind of machine readable storage medium, the storage medium stores or carries same for starting The instruction cached belonging to central processing unit is walked, after described instruction is performed, leads to operations described below:
The instruction for starting and being cached belonging to synchronous central processing unit is generated, described instruction includes the mark of purpose central processing unit With the mark in the specified region of memory;
It sends described instruction and starts caching belonging to synchronous central processing unit.
The present invention also provides a kind of machine readable storage medium, the storage medium stores or carries operation memory Instruction, described instruction, which is performed, can lead to operations described below:
The label in the specified region of memory is set as synchronous;
According to the label, the corresponding region of caching belonging to synchronous central processing unit.
The present invention also provides a kind of electronic equipment, including storage medium and processor, the storage medium storage or carrying There are the program realized for synchronizing the method cached belonging to central processing unit, the equipment to be powered and run institute by the processor After stating the program realized for synchronizing the method cached belonging to central processing unit, operations described below is executed:
Judge whether to meet the condition for carrying out synchronizing between the affiliated caching of central processing unit;
If satisfied, determining source central processing unit and purpose central processing unit;
The data for the buffer zone specified belonging to the source central processing unit are synchronized to belonging to purpose central processing unit Corresponding buffer zone;
Specified buffer zone belonging to the central processing unit includes the corresponding central processing unit in specified region of memory Affiliated buffer zone.
The present invention also provides a kind of electronic equipment, including storage medium and processor, the storage medium storage or carrying There are the program realized for triggering the method cached belonging to synchronous central processing unit, the equipment to be powered and transported by the processor After program of the row realization for triggering the method cached belonging to synchronous central processing unit, operations described below is executed:
Judge whether the data of the specified region affiliated buffer zone of corresponding central processing unit of memory are updated;
If being updated, judge the specified region of the memory mark whether include sync mark and following labels at least It is a kind of:It writes back label or writes and wear label;
If including synchronizing the operation cached belonging to central processing unit.
The present invention also provides a kind of electronic equipment, including storage medium and processor, and the present invention also provides storage Jie Matter stores or carries the program realized for starting the method cached belonging to synchronous central processing unit, which is powered and passes through After the processor runs program of the realization for starting the method cached belonging to synchronous central processing unit, following behaviour are executed Make:
The instruction for starting and being cached belonging to synchronous central processing unit is generated, described instruction includes the mark of purpose central processing unit With the mark in the specified region of memory;
It sends described instruction and starts caching belonging to synchronous central processing unit.
The present invention also provides a kind of electronic equipment, including storage medium and processor, the storage medium storage or carrying There are the program for the method for realizing operation memory, the equipment to be powered and run the side for realizing operation memory by the processor After the program of method, operations described below is executed:
The label in the specified region of memory is set as synchronous;
According to the label, the corresponding region of caching belonging to synchronous central processing unit.
The present invention also provides a kind of methods that the caching for more CPU architectures accesses, including:According to setting Fixed condition determines source central processing unit and purpose central processing unit in more CPU architectures;
The data for the buffer zone specified belonging to the source central processing unit are synchronized to belonging to purpose central processing unit Corresponding buffer zone;
The purpose central processing unit is operated and is accessed to the data in its affiliated region cached;
Specified buffer zone belonging to the central processing unit includes the corresponding central processing unit in specified region of memory Affiliated buffer zone.
The present invention also provides a kind of devices that the caching for more CPU architectures accesses, including:It determines single Member, for determining source central processing unit and purpose central processing unit in more CPU architectures according to imposing a condition;
Synchronization unit, for the data for the buffer zone specified belonging to the source central processing unit to be synchronized to purpose center Corresponding buffer zone belonging to processor;
Operating unit, the data in the region for the purpose central processing unit to caching belonging to it carry out operation and It accesses.
Compared with prior art, it is provided by the invention it is a kind of for synchronize the method cached belonging to central processing unit have with Lower advantage:It can will be cached belonging to data direct replication synchronization to other central processing units in being cached belonging to central processing unit Corresponding region, it is ensured that when program is run, can data directly be accessed inside local cache in other central processing units, have Effect reduces expense, improves program operational efficiency.
Compared with prior art, provided by the invention a kind of for triggering the method cached belonging to synchronous central processing unit tool It has the advantage that:By starting to cache belonging to synchronous central processing unit to the judgement triggering of memory marker.It can make full use of interior The function of label is deposited, realizes and is easy, it is efficient.
Compared with prior art, provided by the invention a kind of for starting the method cached belonging to synchronous central processing unit tool It has the advantage that:Started by the way of instruction and is cached belonging to synchronous central processing unit.Flexible center can be provided for program Processor cache it is synchronous mode.
Compared with prior art, a kind of method tool for synchronizing buffer zone described in central processing unit provided by the invention It has the advantage that:By marking the specified region of memory synchronous and being cached according to belonging to the synchronous central processing unit of the label Corresponding region can provide flexible trigger condition for the cache synchronization of central processing unit.
Compared with prior art, have provided by the present invention for the method that the caching of more CPU architectures accesses It has the advantage that:Operational access after other central processing unit cache synchronizations to local cache can be improved efficiency.
Description of the drawings
Fig. 1 is a kind of schematic diagram for synchronizing the method cached belonging to central processing unit of the application first embodiment;
Fig. 2 is a kind of flow signal for synchronizing the method cached belonging to central processing unit of the application first embodiment Figure;
Fig. 3 is that a kind of flow for triggering the method cached belonging to synchronous central processing unit of the application second embodiment is shown It is intended to;
Fig. 4 is that a kind of flow for starting the method cached belonging to synchronous central processing unit of the application 3rd embodiment is shown It is intended to;
Fig. 5 is a kind of flow diagram of the method for operation memory of the application fourth embodiment;
Fig. 6 is a kind of structure diagram for synchronizing the device cached belonging to central processing unit of the 5th embodiment of the application;
Fig. 7 is a kind of structural frames for triggering the device cached belonging to synchronous central processing unit of the application sixth embodiment Figure;
Fig. 8 is a kind of structural frames for starting the device cached belonging to synchronous central processing unit of the 7th embodiment of the application Figure;
Fig. 9 is a kind of structure diagram of the device of operation memory of the 8th embodiment of the application;
Figure 10 is that a kind of caching for more CPU architectures that the 17th embodiment of the application provides accesses Method flow diagram;
Figure 11 is to apply for that a kind of caching for more CPU architectures that the 18th embodiment provides accesses The structure diagram of device.
Specific implementation mode
Many details are elaborated in the following description in order to fully understand the application.But the application can be with Much implement different from other manner described here, those skilled in the art can be without prejudice to the application intension the case where Under do similar popularization, therefore the application is not limited by following public specific implementation.
The application first embodiment provides a kind of method for synchronizing caching belonging to central processing unit, and application scenarios are such as Shown in Fig. 1,
In with multiple central processing unit computer systems, each central processing unit (CPU0 and CPU1) has oneself institute The caching (Cache) of category, the data (DATA) used in application program are in addition to being stored in memory (Memory), it is also possible to same When be present in the buffer zone specified belonging to central processing unit (corresponding region of the caching belonging to CPU0 or CPU1) so as in The processing that central processor carries out it.
Specified buffer zone belonging to the central processing unit for memory the corresponding central processing unit institute in specified region The buffer zone of category.It the specified region of the memory can be specified by the address by memory.Data in EMS memory (DATA) i.e. in figure Buffer zone of the region corresponding to the storage data of CPU0 and CPU1.The region of memory by memory address institute It determines.
The data may be updated to different values after being handled by central processing unit, such as the data in memory in figure (DATA) it is updated to newest value (DATA ') after task 0 (TASK0) processing after being read into caching belonging to CPU0, when it When the task 1 (TASK1) of his central processing unit (such as CPU1) needs to access newest value (DATA ') of the data, need Start the position (in the caching belonging to CPU0) for the newest value (DATA ') for searching the data and is copied to corresponding The sequence of operations in corresponding buffer zone belonging to central processing unit (CPU1).
In addition to need belonging to memory and each central processing unit cache in search latest data position other than, when it is described most (be located in figure in the caching belonging to CPU0) when new data are present in caching belonging to other central processing units, the application it Mode in the preceding existing respective cache region that the newest value of the data is copied to corresponding central processing unit can only It is first to be synchronized to it from memory again from the cache synchronization to memory of the central processing unit to need to access the data In the caching of central processing unit (CPU1).
As it can be seen that existing mode time overhead is larger, speed is slow, and efficiency is low.
The method that the application example provides can be copied before the newest data are used by other central processing units In shellfish to the caching of the central processing unit.Its flow diagram is as shown in Figure 2.
It, can also be first right before the operation for determined shown in frame 101 source central processing unit and purpose central processing unit System present case is judged, judges whether to meet the condition for carrying out synchronizing between the affiliated caching of central processing unit.
Specifically, the present embodiment provides following two kinds to judge whether that satisfaction carries out synchronization between being cached belonging to central processing unit The method of condition:
Method one specifies the label in region to determine whether same between meeting caching belonging to progress central processing unit by memory The condition of step.Specifically, following operation can be taken to judge:
First determine whether the data of the specified region affiliated buffer zone of corresponding central processing unit of the memory whether by more Newly.Such as, can using the module cached belonging to isochronous memory in system and central processing unit come sentence to the update status of data into Row judges.
The caching and memory of each central processing unit of module monitors cached belonging to the isochronous memory and central processing unit In data, the information that data are updated can be obtained, it is known that the position of latest data.Judge the specified of the memory using it It is simple and easy to do whether the data of the region affiliated buffer zone of corresponding central processing unit are updated, and is not necessarily to additional development cost. For example, the Agent modules of more central processing unit systems are data cached and synchronous belonging to monitoring central processing unit in snooping mechanism The module of caching and memory, can know that data are in the respective cache belonging to central processing unit using it belonging to central processing unit It is no to be updated.
After knowing that the data are updated, judge the specified region of the memory mark whether include sync mark and At least one of following labels:It writes back label or writes and wear label.
In the system of more central processing units, and type of memory register (Memory Type Range Register, referred to as MTRR it) is made of some type registers (MSR register), the attribute of Installed System Memory different zones is marked, to The internal storage access behavior of CPU is prompted, such as whether needing to cache (cache), if need to be synchronized to memory etc. immediately.
By being configured to MTRR, Installed System Memory different zones can be stamped to one of above-mentioned label, opened in system Under paging mode situations, corresponding label can be also carried in page table entry (Page Table Entry, abbreviation PTE).These Label is used for prompting behaviors of the CPU after accessing data.
The attribute of the region of memory marks:UC (UnCacheable), WC (Write Combining), WP (Write Protected), WT (Write Through), WB (Write Back) etc..
PTE and MTRR may be different to the label of memory, and when different, selection carries out the most stringent of mode of data safety Operation, for example, MTRR be labeled as WB, but PTE be WT when, CPU will select WT, that is, be also written while writing data into cache Memory.
In the present embodiment, when MTRR or PTE alternative one is synchronous to the label of the specified region of memory Mark (such as Remote Sync, abbreviation RS), and another be labeled as WB or WT when, then it is assumed that meet carry out central processing Synchronous condition between caching belonging to device.If the zone marker that MTRR PTE alternative one specifies the memory is UC/ One kind of WP/WC is all unsatisfactory for carrying out delaying belonging to central processing unit then no matter another marks whether the label to indicate synchronous Synchronous condition between depositing.
Such as in MTRR it is the specified zone marker in RS and PTE to the memory to the specified zone marker of the memory For WT when or MTRR in be specified zone marker in WB and PTE to the memory to the specified zone marker of the memory For RS when, then it is assumed that meet condition synchronous between carrying out caching belonging to central processing unit.
Method two, by judging whether that get the instruction for starting simultaneously operating carries out central processing to determine whether meeting Synchronous condition between caching belonging to device.
Application program or software itself often become more apparent upon factum, being capable of visit of the Accurate Prediction oneself to data Ask behavior.
The application software or program that can be operated on multiple central processing units know which data may be by multiple centers Processor accesses, it is known that when which central processing unit needs to access which data and whether the data are possible to It is present in the caching belonging to other central processing units.
Middle above application program or software are used in central processing unit needs is likely stored in other central processing units caching In data before, can send start simultaneously operating instruction.The method of the present embodiment is by whether get described instruction Judge whether to meet the condition for carrying out synchronizing between the affiliated caching of central processing unit.
If not getting described instruction, then it is assumed that have not been met item synchronous between carrying out caching belonging to central processing unit Part continues waiting for and judges whether to get described instruction;Think to meet if getting described instruction and carries out central processing unit Synchronous condition between affiliated caching.
Above-mentioned two methods can also be combined judge to meet cached belonging to central processing unit between it is synchronous Condition.As judged that meeting the condition synchronized between caching belonging to progress central processing unit can think to work as when one of which method Preceding system meets the condition for carrying out being synchronized between the affiliated caching of central processing unit.Can also when above two method all obtain meet into The case where synchronous condition, thinks that system currently meets caching belonging to progress central processing unit between caching belonging to row central processing unit Between synchronous condition.Particular situation can be determined according to application scenarios.
Above two method be capable of providing it is flexible judge whether to meet carry out caching belonging to central processing unit between it is synchronous Condition.Convenient for configuring and calling.
Between judging that system current state meets caching belonging to progress central processing unit after synchronous condition, then determine same Step operates correspondingly source central processing unit and purpose central processing unit.Current state is met before subsequent operation and carries out center Synchronous condition carries out judging to enable to the more efficient of subsequent operation between caching belonging to processor.
Frame 101 determines source central processing unit and purpose central processing unit.
Determine source central processing unit mode can there are many, the present embodiment provides following two kinds determining source central processing units Mode:
For hereinbefore using method one to judge to show that satisfaction carries out synchronous condition between caching belonging to central processing unit Situation, the central processing unit that the specified region affiliated buffer zone of corresponding central processing unit of the memory will can be updated As source central processing unit.
For hereinbefore using method two to judge to show that satisfaction carries out synchronous condition between caching belonging to central processing unit Situation can utilize the module cached belonging to isochronous memory and central processing unit described in method one to determine source central processing Device:Using the newest central processing unit of data in the corresponding caching of data in the specified region of the memory as source central processing Device.
The module (such as Agent modules) cached belonging to the isochronous memory and central processing unit, can obtain data by more New information, it is known that the position of latest data, therefore determine that source central processing unit is convenient and efficient using it.
Determine the mode of purpose central processing unit equally can there are many, such as using hereinbefore method two, passing through Judge whether to get the instruction for synchronizing the specified buffer zone belonging to central processing unit, judgement show that satisfaction carries out Between caching belonging to central processing unit the case where synchronous condition, the mark of purpose central processing unit is specified in described instruction, according to This can determine woodenware central processing unit.
In addition, the case where for determining purpose central processing unit not yet, the present embodiment, which also provides following modes, to be come really Determine purpose central processing unit:Search the association central processing unit corresponding to the specified region of the memory.
Specifically, MSR register can be configured, for recording the base address of one section of memory, this section of memory is equivalent to one A memory specifies region and the corresponding table for being associated with central processing unit, and the content that each of which records is:Memory address and institute State the mark of the corresponding association central processing unit of memory address.
The memory address corresponds to the specified region of memory, and the association central processing unit is that possible be stored in described Deposit the data in specified region or the central processing unit of its updated value.
The corresponding table is searched, described other central processing units being associated in central processing unit in addition to the central processing unit of source are made For purpose central processing unit.
Such as memory address is that A corresponds to central processing unit 0, central processing unit 1,2 He of central processing unit in the corresponding table Central processing unit 3, and source central processing unit is central processing unit 0, then by central processing unit 1, central processing unit 2 and central processing The central processing unit as a purpose of device 3.
So far source central processing unit and purpose central processing unit be can determine, can be carried out corresponding same described in frame 103 Step operation.
Before carrying out the simultaneously operating described in frame 102, the marker for judgment in region is specified to obtain by memory for described previously Go out the case where satisfaction carries out the condition synchronized between caching belonging to central processing unit, can also be performed to write back or write accordingly and wear label Corresponding operation.
For example, being when writing to wear (WT) label (such as RS) synchronous with mark, after progress for MTRR and memory marker in PTE Before buffer zone belonging to continuous central processing unit, the operation corresponding to WT is first carried out, is also written while writing data into caching In memory.
Aforesaid operations can be carried out according to the meaning of memory marker to being cached belonging to memory and its corresponding central processing unit It is synchronous, the synchronization between follow-up different central processing unit category cachings is not influenced.
It is corresponding to be synchronized to purpose central processing unit by frame 102 for the data for the buffer zone that the source central processing unit is specified Buffer zone.
After source central processing unit and the purpose central processing unit corresponding to simultaneously operating is determined, behaviour can be synchronized Make, specifically, the module (such as Agent) cached belonging to previously described isochronous memory and central processing unit can be utilized, it is obstructed Memory is crossed, directly the data for the buffer zone specified belonging to the source central processing unit are synchronized to belonging to purpose central processing unit Corresponding buffer zone.The buffer zone specified belonging to the central processing unit is the buffer area corresponding to the specified region of memory Domain.
The module cached belonging to the isochronous memory and central processing unit can be by the data and central processing unit in memory Corresponding data synchronize in caching, using it directly between the caching of different central processing units synchrodata facilitate it is fast It is prompt.
Before the module memory simultaneously operating cached belonging to the isochronous memory and central processing unit, it can also be judged Whether state is idle, is only just synchronized accordingly using it when its state is idle.The reading of memory can not be influenced in this way Write performance.
The module cached described in the isochronous memory and central processing unit can be both deployed in central processing unit (as each All deployment can also be disposed only in some central processing unit in central processing), the outer conduct of central processing unit can also be deployed in Independent module work.
Simultaneously operating described in this frame can also be connects (QPI) using express passway, by the source central processing unit institute The data for belonging to specified buffer zone are synchronized to the corresponding buffer zone belonging to purpose central processing unit.It may not necessarily lead in this way Memory is crossed directly the data for the buffer zone specified belonging to the source central processing unit are synchronized to belonging to purpose central processing unit Corresponding buffer zone.
The application second embodiment provides a kind of method for triggering caching belonging to synchronous central processing unit, and flow is shown It is intended to as shown in figure 3, including operations described below:
Frame 201, judges whether the data of the specified region affiliated buffer zone of corresponding central processing unit of memory are updated.
The data in region and specified buffer zone belonging to corresponding central processing unit are specified by monitoring the memory, it can be with Know whether data are updated, the operation described in this frame can utilize the module cached belonging to isochronous memory and central processing unit The information that data are updated is obtained, more detailed description can refer to relevant description in the application first embodiment, herein not It repeats.
Frame 202, if being updated, judge the specified region of the memory marks whether to include sync mark and following labels At least one:It writes back label or writes and wear label.
After obtaining the information that data are updated, the label in region is specified to memory, if MTRR and PTE are judged, More detailed description can refer to relevant description in the application first embodiment, and this will not be repeated here.
Frame 203, if including, triggering synchronizes the operation cached belonging to central processing unit.
When the label in the specified region of the memory includes the synchronous label of expression and writes back label or sync mark and is write When wearing label, triggering synchronizes the operation cached belonging to central processing unit.
When the label in the specified region of the memory includes the synchronous label of expression and writes back label or sync mark and is write When wearing label, before synchronizing caching belonging to central processing unit, it can also be performed to write back or write and wear the corresponding operation of label. To not interfere with system to internal memory operation.
The application 3rd embodiment provides a kind of method for starting caching belonging to synchronous central processing unit, flow Schematic diagram is as shown in figure 4, include operations described below:
Frame 301 generates the instruction for starting and being cached belonging to synchronous central processing unit, and described instruction includes purpose central processing unit Mark and memory specified region mark.
When that may need to specify memory the latest data in the affiliated buffer zone of the central processing unit corresponding to region When synchronizing, instruction is generated, the specified central processing unit for needing to use the latest data of described instruction and described interior The specified region deposited.
Such as the mark of central processing unit and the address of memory can be specified to formulate the central processing unit and described interior The specified region deposited.
More detailed description can refer to relevant description in the application first embodiment, and this will not be repeated here.
Frame 302 sends described instruction and starts caching belonging to synchronous central processing unit.
After generating described instruction, the synchronous recipient of preset management is sent it to, it is corresponding synchronous to start Operation.
The application fourth embodiment provides a kind of method of operation memory, and flow diagram is as shown in figure 5, including following Operation:
The label in the specified region of memory is set as synchronous by frame 401.
The region of memory is indicated into synchronous label labeled as preset.Such as can will in MTRR or PTE in The label deposited is set as RS etc., the specified region of memory can the address of memory again specify.Detailed description can refer to this Apply for relevant description in first embodiment, this will not be repeated here.
Frame 402, according to the label, the corresponding region of caching belonging to synchronous central processing unit.
It sets after synchronizing the label in the specified region of memory to, may need to carry out to cache belonging to central processing unit When simultaneously operating, operated accordingly according to the label.
The 5th embodiment of the application provides a kind of device for synchronizing caching belonging to central processing unit, and structure diagram is such as Shown in Fig. 6, including:
Determination unit 501, for determining source central processing unit and purpose central processing unit;
Synchronization unit 502, for the data for the buffer zone specified belonging to the source central processing unit to be synchronized to purpose Corresponding buffer zone belonging to central processing unit.
Optionally, described for synchronizing the device cached belonging to central processing unit, further include:
Judging unit meets the condition synchronized between caching belonging to progress central processing unit for judging whether.
Optionally, the judging unit may include:
First judgment sub-unit, the specified region affiliated buffer zone of corresponding central processing unit for judging the memory Data whether be updated;
Marker for judgment subelement, if for being updated, judge the specified region of the memory marks whether to include synchronizing At least one of label and following labels:It writes back label or writes and wear label;
Including subelement, if for including, meet condition synchronous between carrying out caching belonging to central processing unit.
Optionally, the judging unit can also include:
Second judgment sub-unit carries out the specified buffer zone belonging to central processing unit for judging whether to get Synchronous instruction, described instruction specify the specified region of purpose central processing unit and memory;
Subelement is got, if with getting, meets condition synchronous between carrying out caching belonging to central processing unit.
Optionally, the determination unit includes:
Source determination subelement is used for the specified region affiliated buffer zone of corresponding central processing unit of the memory by more New central processing unit is as source central processing unit;
Purpose determination subelement, for determining purpose central processing unit.
Optionally, described device can also include:
Corresponding operating execution unit wears the corresponding operation of label for executing to write back or write.
Optionally, the determination unit can also include:
Source determines the second subelement, for determining source center using the module cached belonging to isochronous memory and central processing unit Processor;
Purpose determination subelement, for determining purpose central processing unit.
Optionally, the determination unit can also include:
Source determination subelement, for determining source processor;
Subelement is searched, for searching the association central processing unit corresponding to the specified region of the memory;
As subelement, it is used for other central processing units in the association central processing unit in addition to the central processing unit of source Central processing unit as a purpose.
Optionally, the synchronization unit can be specifically used for:
Using the module cached belonging to isochronous memory and central processing unit, not by memory, directly by the source centre The data for the buffer zone specified belonging to reason device are synchronized to the corresponding buffer zone belonging to purpose central processing unit.
Optionally, described device can also include:
Whether idle determination unit, the module for judging to cache belonging to isochronous memory and central processing unit are idle.
The application sixth embodiment provides a kind of for triggering the device cached belonging to synchronous central processing unit, structural frames Figure as shown in fig. 7, be characterized in that, including:
Judging unit 601, the data of the specified region affiliated buffer zone of corresponding central processing unit for judging memory Whether it is updated;
Marker for judgment unit 602, if for being updated, judge the specified region of the memory marks whether to include synchronizing At least one of label and following labels:It writes back label or writes and wear label;
Trigger element 603, if for including, triggering synchronizes the operation cached belonging to central processing unit.
Optionally, described device can also include execution unit, and the corresponding operation of label is worn for executing to write back or write.
The 7th embodiment of the application provides a kind of for starting the device cached belonging to synchronous central processing unit, structural frames Figure is as shown in figure 8, include:
Generation unit 701, for generating the instruction for starting and being cached belonging to synchronous central processing unit, described instruction includes purpose The mark of the mark of central processing unit and the specified region of memory;
Transmission unit 702 is cached for sending belonging to the synchronous central processing unit of described instruction startup.
The 8th embodiment of the application provides a kind of device of operation memory, and structure diagram is as shown in figure 9, include:
Setting unit 801, for the label in the specified region of memory to be set as synchronous;
Synchronization unit 802, for according to the label, the synchronous affiliated corresponding region cached of central processing unit.
The 9th embodiment of the application provides a kind of machine readable storage medium, and the storage medium is stored or carried useful The instruction cached belonging to synchronous central processing unit, after described instruction is performed, leads to operations described below:
Judge whether to meet the condition for carrying out synchronizing between the affiliated caching of central processing unit;
If satisfied, determining source central processing unit and purpose central processing unit;
The data for the buffer zone specified belonging to the source central processing unit are synchronized to belonging to purpose central processing unit Corresponding buffer zone;
Specified buffer zone belonging to the central processing unit includes the corresponding central processing unit in specified region of memory Affiliated buffer zone.
The tenth embodiment of the application provides a kind of machine readable storage medium, and the storage medium is stored or carried useful The instruction cached belonging to the synchronous central processing unit of triggering, after described instruction is performed, leads to operations described below:
Judge whether the data of the specified region affiliated buffer zone of corresponding central processing unit of memory are updated;
If being updated, judge the specified region of the memory mark whether include sync mark and following labels at least It is a kind of:It writes back label or writes and wear label;
If including synchronizing the operation cached belonging to central processing unit.
The 11st embodiment of the application provides a kind of machine readable storage medium, and the storage medium is stored or carried For starting the instruction cached belonging to synchronous central processing unit, after described instruction is performed, lead to operations described below:
The instruction for starting and being cached belonging to synchronous central processing unit is generated, described instruction includes the mark of purpose central processing unit With the mark in the specified region of memory;
It sends described instruction and starts caching belonging to synchronous central processing unit.
The 12nd embodiment of the application provides a kind of machine readable storage medium, and the storage medium is stored or carried The instruction of memory is operated, described instruction, which is performed, can lead to operations described below:
The label in the specified region of memory is set as synchronous;
According to the label, the corresponding region of caching belonging to synchronous central processing unit.
The 13rd embodiment of the application provides a kind of electronic equipment, including storage medium and processor, the storage medium The program realized for synchronizing the method cached belonging to central processing unit is stored or carries, which is powered and passes through the place After reason device runs program of the realization for synchronizing the method cached belonging to central processing unit, operations described below is executed:
Judge whether to meet the condition for carrying out synchronizing between the affiliated caching of central processing unit;
If satisfied, determining source central processing unit and purpose central processing unit;
The data for the buffer zone specified belonging to the source central processing unit are synchronized to belonging to purpose central processing unit Corresponding buffer zone;
Specified buffer zone belonging to the central processing unit includes the corresponding central processing unit in specified region of memory Affiliated buffer zone.
The 14th embodiment of the application provides a kind of electronic equipment, including storage medium and processor, the storage medium The program realized for triggering the method cached belonging to synchronous central processing unit is stored or carries, which is powered and passes through institute It states after processor runs the program of the realization for triggering the method cached belonging to synchronous central processing unit, executes following behaviour Make:
Judge whether the data of the specified region affiliated buffer zone of corresponding central processing unit of memory are updated;
If being updated, judge the specified region of the memory mark whether include sync mark and following labels at least It is a kind of:It writes back label or writes and wear label;
If including synchronizing the operation cached belonging to central processing unit.
The 15th embodiment of the application provides a kind of electronic equipment, including storage medium described in storage medium and processor is deposited The program realized for starting the method cached belonging to synchronous central processing unit is stored up or carries, which is powered and passes through described After processor runs program of the realization for starting the method cached belonging to synchronous central processing unit, operations described below is executed:
The instruction for starting and being cached belonging to synchronous central processing unit is generated, described instruction includes the mark of purpose central processing unit With the mark in the specified region of memory;
It sends described instruction and starts caching belonging to synchronous central processing unit.
The 16th embodiment of the application provides a kind of electronic equipment, including storage medium and processor, the storage medium The program for the method for realizing operation memory is stored or carries, which is powered and runs the realization by the processor and grasp After the program for making the method for memory, operations described below is executed:
The label in the specified region of memory is set as synchronous;
According to the label, the corresponding region of caching belonging to synchronous central processing unit.
The 17th embodiment of the application provides a kind of method that the caching for more CPU architectures accesses, Flow diagram is as shown in Figure 10, including once operates:
Frame 1001 determines source central processing unit and purpose central processing in more CPU architectures according to imposing a condition Device.
The condition of the setting includes the alternative condition to source central processing unit, to the alternative condition of purpose central processing unit And execute this method condition etc., as the time whether meet execute this method time requirement or system hardware and software state whether Meet the requirement etc. for executing this method.This operation illustrates the detailed description that can be referred in the application first embodiment, This will not be repeated here.
The data for the buffer zone specified belonging to the source central processing unit are synchronized to purpose central processing unit by frame 1002 Affiliated corresponding buffer zone.
This operation illustrates the detailed description that can be referred in the application first embodiment, and this will not be repeated here.
Frame 1003, the purpose central processing unit are operated and are accessed to the data in its affiliated region cached.
After the data in the region cached described in purpose central processing unit are updated, purpose central processing unit can be to institute The data for stating buffer zone are read out, the operations such as write-in.
The application 18 embodiments a kind of device that the caching for more CPU architectures accesses is provided, Structure diagram is as shown in figure 11, including:
Determination unit 1101, for determining source central processing unit and purpose in more CPU architectures according to imposing a condition Central processing unit.
Synchronization unit 1102, for the data for the buffer zone specified belonging to the source central processing unit to be synchronized to purpose Corresponding buffer zone belonging to central processing unit.
Operating unit 1103 grasps the data in its affiliated region cached for the purpose central processing unit Make and accesses.
Although the present invention is disclosed as above with preferred embodiment, it is not for limiting the present invention, any this field skill Art personnel without departing from the spirit and scope of the present invention, can make possible variation and modification, therefore the guarantor of the present invention Shield range should be subject to the range that the claims in the present invention are defined.

Claims (40)

1. a kind of method for synchronizing caching belonging to central processing unit is characterized in that, including:
Determine source central processing unit and purpose central processing unit;
The data for the buffer zone specified belonging to the source central processing unit are synchronized to corresponding belonging to purpose central processing unit Buffer zone;
Specified buffer zone belonging to the central processing unit includes belonging to the corresponding central processing unit in specified region of memory Buffer zone.
2. it is according to claim 1 for synchronizing the method cached belonging to central processing unit, it is characterized in that, the determining source Further include before the operation of central processing unit and purpose central processing unit:
Judge whether to meet the condition for carrying out synchronizing between the affiliated caching of central processing unit;
If satisfied, executing subsequent operation.
3. it is according to claim 2 for synchronizing the method cached belonging to central processing unit, it is characterized in that, the judgement is No satisfaction carries out condition synchronous between being cached belonging to central processing unit:
Judge whether the data of the specified region affiliated buffer zone of corresponding central processing unit of the memory are updated;
If being updated, judge the specified region of the memory marks whether to include at least the one of sync mark and following labels Kind:It writes back label or writes and wear label;
If including meeting condition synchronous between carrying out caching belonging to central processing unit.
4. it is according to claim 2 for synchronizing the method cached belonging to central processing unit, it is characterized in that, the judgement is No satisfaction carries out condition synchronous between being cached belonging to central processing unit:
Judge whether to get the instruction for synchronizing the specified buffer zone belonging to central processing unit, described instruction is specified The specified region of purpose central processing unit and memory;
If getting, meet condition synchronous between carrying out caching belonging to central processing unit.
5. it is according to claim 3 for synchronizing the method cached belonging to central processing unit, it is characterized in that, the determining source Central processing unit and purpose central processing unit include:
The central processing unit that the specified region affiliated buffer zone of corresponding central processing unit of the memory is updated is as source Central processing unit;
Determine purpose central processing unit.
6. according to claim 3 for synchronizing the method cached belonging to central processing unit, be characterized in that, it is described will be described The data of the specified buffer zone of source central processing unit are synchronized to the operation of the corresponding buffer zone of purpose central processing unit Before, further include:
It executes to write back or write and wears the corresponding operation of label.
7. it is according to claim 1 for synchronizing the method cached belonging to central processing unit, it is characterized in that, the determining source Central processing unit and purpose central processing unit include:
Source central processing unit is determined using the module cached belonging to isochronous memory and central processing unit;
Determine purpose central processing unit.
8. it is according to claim 1 for synchronizing the method cached belonging to central processing unit, it is characterized in that, the determining source Central processing unit and purpose central processing unit include:
Determine source processor;
Search the association central processing unit corresponding to the specified region of the memory;
By the central processing unit as a purpose of other central processing units in addition to the central processing unit of source in the association central processing unit.
9. according to claim 1 for synchronizing the method cached belonging to central processing unit, be characterized in that, it is described will be described The data for the buffer zone specified belonging to the central processing unit of source are synchronized to corresponding buffer zone packet belonging to purpose central processing unit It includes:
Using the module cached belonging to isochronous memory and central processing unit, not by memory, directly by the source central processing unit The data of affiliated specified buffer zone are synchronized to the corresponding buffer zone belonging to purpose central processing unit.
10. it is according to claim 9 for synchronizing the method cached belonging to central processing unit, it is characterized in that, the utilization The module cached belonging to isochronous memory and central processing unit will directly specify not by memory belonging to the source central processing unit Buffer zone data be synchronized to the operation of the corresponding buffer zone belonging to purpose central processing unit before, further include:
Judge whether the module cached belonging to isochronous memory and central processing unit is idle.
11. it is according to claim 9 for synchronizing the method cached belonging to central processing unit, it is characterized in that, the synchronization The module of memory and central processing unit caching is deployed in:It is individually disposed in central processing unit or independently of central processing unit.
12. the method according to claim 1 for synchronizing the caching of central processing unit is characterized in that, it is described will be described The data for the buffer zone specified belonging to the central processing unit of source are synchronized to the corresponding buffer zone belonging to purpose central processing unit Including:
It is connected using express passway, the data for the buffer zone specified belonging to the source central processing unit is synchronized to purpose center Corresponding buffer zone belonging to processor.
13. a kind of method for triggering caching belonging to synchronous central processing unit is characterized in that, including:
Judge whether the data of the specified region affiliated buffer zone of corresponding central processing unit of memory are updated;
If being updated, judge the specified region of the memory marks whether to include at least the one of sync mark and following labels Kind:It writes back label or writes and wear label;
If including triggering synchronizes the operation cached belonging to central processing unit.
14. the method according to claim 13 for triggering caching belonging to synchronous central processing unit is characterized in that, described Further include before triggering the operation for synchronizing and being cached belonging to central processing unit:
It executes to write back or write and wears the corresponding operation of label.
15. a kind of method for starting caching belonging to synchronous central processing unit is characterized in that, including:
Generate the instruction for starting and being cached belonging to synchronous central processing unit, described instruction includes the mark of purpose central processing unit and interior The mark in the specified region deposited;
It sends described instruction and starts caching belonging to synchronous central processing unit.
16. a kind of method of operation memory, is characterized in that, including:
The label in the specified region of memory is set as synchronous;
According to the label, the corresponding region of caching belonging to synchronous central processing unit.
17. a kind of device for synchronizing caching belonging to central processing unit is characterized in that, including:
Determination unit, for determining source central processing unit and purpose central processing unit;
Synchronization unit, for the data for the buffer zone specified belonging to the source central processing unit to be synchronized to purpose central processing Corresponding buffer zone belonging to device.
18. it is according to claim 17 for synchronizing the device cached belonging to central processing unit, it is characterized in that, further includes:
Judging unit meets the condition synchronized between caching belonging to progress central processing unit for judging whether.
19. it is according to claim 18 for synchronizing the device cached belonging to central processing unit, it is characterized in that, the judgement Unit includes:
First judgment sub-unit, the number of the specified region affiliated buffer zone of corresponding central processing unit for judging the memory According to whether being updated;
Marker for judgment subelement, if for being updated, judge the specified region of the memory marks whether to include sync mark With at least one of following labels:It writes back label or writes and wear label;
Including subelement, if for including, meet condition synchronous between carrying out caching belonging to central processing unit.
20. it is according to claim 18 for synchronizing the device cached belonging to central processing unit, it is characterized in that, the judgement Unit includes:
Second judgment sub-unit synchronizes the specified buffer zone belonging to central processing unit for judging whether to get Instruction, described instruction specify purpose central processing unit and memory specified region;
Subelement is got, if with getting, meets condition synchronous between carrying out caching belonging to central processing unit.
21. it is according to claim 19 for synchronizing the device cached belonging to central processing unit, it is characterized in that, the determination Unit includes:
Source determination subelement, for be updated the specified region affiliated buffer zone of corresponding central processing unit of the memory Central processing unit is as source central processing unit;
Purpose determination subelement, for determining purpose central processing unit.
22. it is according to claim 19 for synchronizing the device cached belonging to central processing unit, it is characterized in that, further includes:
Corresponding operating execution unit wears the corresponding operation of label for executing to write back or write.
23. it is according to claim 17 for synchronizing the device cached belonging to central processing unit, it is characterized in that, the determination Unit includes:
Source determines the second subelement, for determining source central processing using the module cached belonging to isochronous memory and central processing unit Device;
Purpose determination subelement, for determining purpose central processing unit.
24. it is according to claim 17 for synchronizing the device cached belonging to central processing unit, it is characterized in that, the determination Unit includes:
Source determination subelement, for determining source processor;
Subelement is searched, for searching the association central processing unit corresponding to the specified region of the memory;
As subelement, for using other central processing units in the association central processing unit in addition to the central processing unit of source as Purpose central processing unit.
25. it is according to claim 17 for synchronizing the device cached belonging to central processing unit, it is characterized in that, the synchronization Unit is specifically used for:
Using the module cached belonging to isochronous memory and central processing unit, not by memory, directly by the source central processing unit The data of affiliated specified buffer zone are synchronized to the corresponding buffer zone belonging to purpose central processing unit.
26. it is according to claim 25 for synchronizing the device cached belonging to central processing unit, it is characterized in that, further includes:
Whether idle determination unit, the module for judging to cache belonging to isochronous memory and central processing unit are idle.
27. a kind of device for triggering caching belonging to synchronous central processing unit is characterized in that, including:
Judging unit, for judge memory the specified region affiliated buffer zone of corresponding central processing unit data whether by more Newly;
Marker for judgment unit, if for being updated, judge the specified region of the memory mark whether include sync mark and At least one of following labels:It writes back label or writes and wear label;
Trigger element, if for including, triggering synchronizes the operation cached belonging to central processing unit.
28. it is according to claim 27 for triggering the device cached belonging to synchronous central processing unit, it is characterized in that, also wraps It includes:
Execution unit wears the corresponding operation of label for executing to write back or write.
29. a kind of device for starting caching belonging to synchronous central processing unit is characterized in that, including:
Generation unit, for generating the instruction for starting and being cached belonging to synchronous central processing unit, described instruction includes purpose centre Manage the mark of the mark of device and the specified region of memory;
Transmission unit is cached for sending belonging to the synchronous central processing unit of described instruction startup.
30. a kind of device of operation memory, is characterized in that, including:
Setting unit, for the label in the specified region of memory to be set as synchronous;
Synchronization unit, for according to the label, the synchronous affiliated corresponding region cached of central processing unit.
31. a kind of machine readable storage medium, is characterized in that, the storage medium is stored or is carried for synchronizing centre The instruction cached belonging to device is managed, after described instruction is performed, leads to operations described below:
Judge whether to meet the condition for carrying out synchronizing between the affiliated caching of central processing unit;
If satisfied, determining source central processing unit and purpose central processing unit;
The data for the buffer zone specified belonging to the source central processing unit are synchronized to corresponding belonging to purpose central processing unit Buffer zone;
Specified buffer zone belonging to the central processing unit includes belonging to the corresponding central processing unit in specified region of memory Buffer zone.
32. a kind of machine readable storage medium, is characterized in that, the storage medium storage or carry in triggering and synchronizing The instruction cached belonging to central processor, after described instruction is performed, leads to operations described below:
Judge whether the data of the specified region affiliated buffer zone of corresponding central processing unit of memory are updated;
If being updated, judge the specified region of the memory marks whether to include at least the one of sync mark and following labels Kind:It writes back label or writes and wear label;
If including synchronizing the operation cached belonging to central processing unit.
33. a kind of machine readable storage medium, is characterized in that, the storage medium storage or carry in starting and synchronizing The instruction cached belonging to central processor, after described instruction is performed, leads to operations described below:
Generate the instruction for starting and being cached belonging to synchronous central processing unit, described instruction includes the mark of purpose central processing unit and interior The mark in the specified region deposited;
It sends described instruction and starts caching belonging to synchronous central processing unit.
34. a kind of machine readable storage medium, is characterized in that, the storage medium storage or the finger for carrying operation memory It enables, described instruction, which is performed, can lead to operations described below:
The label in the specified region of memory is set as synchronous;
According to the label, the corresponding region of caching belonging to synchronous central processing unit.
35. a kind of electronic equipment, including storage medium and processor, are characterized in that, the storage medium stores or carries reality The program of the current method cached belonging to synchronous central processing unit, the equipment are powered and run the reality by the processor After the program of the current method cached belonging to synchronous central processing unit, operations described below is executed:
Judge whether to meet the condition for carrying out synchronizing between the affiliated caching of central processing unit;
If satisfied, determining source central processing unit and purpose central processing unit;
The data for the buffer zone specified belonging to the source central processing unit are synchronized to corresponding belonging to purpose central processing unit Buffer zone;
Specified buffer zone belonging to the central processing unit includes belonging to the corresponding central processing unit in specified region of memory Buffer zone.
36. a kind of electronic equipment, including storage medium and processor, are characterized in that, the storage medium stores or carries reality The program of the current method cached belonging to the synchronous central processing unit of triggering, the equipment are powered and run institute by the processor After stating the program realized for triggering the method cached belonging to synchronous central processing unit, operations described below is executed:
Judge whether the data of the specified region affiliated buffer zone of corresponding central processing unit of memory are updated;
If being updated, judge the specified region of the memory marks whether to include at least the one of sync mark and following labels Kind:It writes back label or writes and wear label;
If including synchronizing the operation cached belonging to central processing unit.
37. a kind of electronic equipment, including storage medium and processor, are characterized in that, the storage medium stores or carries reality The program of the current method cached belonging to the synchronous central processing unit of startup, which, which is powered, simultaneously passes through processor operation institute After stating the program realized for starting the method cached belonging to synchronous central processing unit, operations described below is executed:
Generate the instruction for starting and being cached belonging to synchronous central processing unit, described instruction includes the mark of purpose central processing unit and interior The mark in the specified region deposited;
It sends described instruction and starts caching belonging to synchronous central processing unit.
38. a kind of electronic equipment, including storage medium and processor, are characterized in that, the storage medium stores or carries reality The now program of the method for operation memory, the equipment are powered and run the method for realizing operation memory by the processor After program, operations described below is executed:
The label in the specified region of memory is set as synchronous;
According to the label, the corresponding region of caching belonging to synchronous central processing unit.
39. a kind of method that caching for more CPU architectures accesses, is characterized in that, including:
Source central processing unit and purpose central processing unit in more CPU architectures are determined according to imposing a condition;
The data for the buffer zone specified belonging to the source central processing unit are synchronized to corresponding belonging to purpose central processing unit Buffer zone;
The purpose central processing unit is operated and is accessed to the data in its affiliated region cached;
Specified buffer zone belonging to the central processing unit includes belonging to the corresponding central processing unit in specified region of memory Buffer zone.
40. the device that a kind of caching for more CPU architectures accesses, is characterized in that, including:
Determination unit, for determining source central processing unit and purpose central processing in more CPU architectures according to imposing a condition Device;
Synchronization unit, for the data for the buffer zone specified belonging to the source central processing unit to be synchronized to purpose central processing Corresponding buffer zone belonging to device;
Operating unit is operated and is visited to the data in its affiliated region cached for the purpose central processing unit It asks.
CN201710147292.5A 2017-03-13 2017-03-13 Method and device for synchronizing caches of central processing units Active CN108572926B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710147292.5A CN108572926B (en) 2017-03-13 2017-03-13 Method and device for synchronizing caches of central processing units

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710147292.5A CN108572926B (en) 2017-03-13 2017-03-13 Method and device for synchronizing caches of central processing units

Publications (2)

Publication Number Publication Date
CN108572926A true CN108572926A (en) 2018-09-25
CN108572926B CN108572926B (en) 2022-02-22

Family

ID=63577367

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710147292.5A Active CN108572926B (en) 2017-03-13 2017-03-13 Method and device for synchronizing caches of central processing units

Country Status (1)

Country Link
CN (1) CN108572926B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111340202A (en) * 2018-12-18 2020-06-26 上海寒武纪信息科技有限公司 Operation method, device and related product

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0589661A1 (en) * 1992-09-24 1994-03-30 International Business Machines Corporation Memory access
EP0591695A1 (en) * 1992-09-18 1994-04-13 Hitachi, Ltd. Processor system using synchronous dynamic memory
US5752045A (en) * 1995-07-14 1998-05-12 United Microelectronics Corporation Power conservation in synchronous SRAM cache memory blocks of a computer system
US20040044850A1 (en) * 2002-08-28 2004-03-04 George Robert T. Method and apparatus for the synchronization of distributed caches
US20050050374A1 (en) * 2003-08-25 2005-03-03 Tomohiro Nakamura Method for synchronizing processors in a multiprocessor system
CN1940876A (en) * 2005-09-30 2007-04-04 联想(北京)有限公司 Memory backup device and method
CN101086715A (en) * 2007-07-23 2007-12-12 北京中星微电子有限公司 Method and device for reading CPU code
CN101776983A (en) * 2009-01-13 2010-07-14 中兴通讯股份有限公司 Synchronization method of information of double controllers in disk array and disk array system
CN103559095A (en) * 2013-10-30 2014-02-05 武汉烽火富华电气有限责任公司 Data synchronization method for dual-core multiprocessor framework used for relay protection field
CN104090795A (en) * 2014-07-08 2014-10-08 三星电子(中国)研发中心 Method, system and device for upgrading multi-core mobile terminal
CN104503868A (en) * 2014-12-29 2015-04-08 成都致云科技有限公司 Data synchronizing method, device and system
CN105095116A (en) * 2014-05-19 2015-11-25 华为技术有限公司 Cache replacing method, cache controller and processor
US20150347300A1 (en) * 2014-05-30 2015-12-03 International Business Machines Corporation Synchronizing updates of page table status indicators in a multiprocessing environment
CN105528308A (en) * 2014-10-24 2016-04-27 中兴通讯股份有限公司 Power failure processing method and device and electronic apparatus
CN105930100A (en) * 2016-04-15 2016-09-07 烽火通信科技股份有限公司 Realization method for optimizing file reading/writing speed and frequency of USIM card

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0591695A1 (en) * 1992-09-18 1994-04-13 Hitachi, Ltd. Processor system using synchronous dynamic memory
EP0589661A1 (en) * 1992-09-24 1994-03-30 International Business Machines Corporation Memory access
US5752045A (en) * 1995-07-14 1998-05-12 United Microelectronics Corporation Power conservation in synchronous SRAM cache memory blocks of a computer system
US20040044850A1 (en) * 2002-08-28 2004-03-04 George Robert T. Method and apparatus for the synchronization of distributed caches
US20050050374A1 (en) * 2003-08-25 2005-03-03 Tomohiro Nakamura Method for synchronizing processors in a multiprocessor system
CN1940876A (en) * 2005-09-30 2007-04-04 联想(北京)有限公司 Memory backup device and method
CN101086715A (en) * 2007-07-23 2007-12-12 北京中星微电子有限公司 Method and device for reading CPU code
CN101776983A (en) * 2009-01-13 2010-07-14 中兴通讯股份有限公司 Synchronization method of information of double controllers in disk array and disk array system
CN103559095A (en) * 2013-10-30 2014-02-05 武汉烽火富华电气有限责任公司 Data synchronization method for dual-core multiprocessor framework used for relay protection field
CN105095116A (en) * 2014-05-19 2015-11-25 华为技术有限公司 Cache replacing method, cache controller and processor
US20150347300A1 (en) * 2014-05-30 2015-12-03 International Business Machines Corporation Synchronizing updates of page table status indicators in a multiprocessing environment
CN104090795A (en) * 2014-07-08 2014-10-08 三星电子(中国)研发中心 Method, system and device for upgrading multi-core mobile terminal
CN105528308A (en) * 2014-10-24 2016-04-27 中兴通讯股份有限公司 Power failure processing method and device and electronic apparatus
CN104503868A (en) * 2014-12-29 2015-04-08 成都致云科技有限公司 Data synchronizing method, device and system
CN105930100A (en) * 2016-04-15 2016-09-07 烽火通信科技股份有限公司 Realization method for optimizing file reading/writing speed and frequency of USIM card

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JOEL HESTNESS 等: "GPU Computing Pipeline Inefficiencies and Optimization Opportunities in Heterogeneous CPU-GPU Processors", 《IEEE》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111340202A (en) * 2018-12-18 2020-06-26 上海寒武纪信息科技有限公司 Operation method, device and related product
CN111340202B (en) * 2018-12-18 2023-06-09 上海寒武纪信息科技有限公司 Operation method, device and related product

Also Published As

Publication number Publication date
CN108572926B (en) 2022-02-22

Similar Documents

Publication Publication Date Title
US9390012B2 (en) Multi-core processor system, cache coherency control method, and computer product
US5276828A (en) Methods of maintaining cache coherence and processor synchronization in a multiprocessor system using send and receive instructions
JP3434439B2 (en) Device for enhancing data coherency in information processing system
US20170161194A1 (en) Page-based prefetching triggered by tlb activity
US11042469B2 (en) Logging trace data for program code execution at an instruction level
US7363435B1 (en) System and method for coherence prediction
KR101805561B1 (en) Method and apparatus of maintaining data for online analytical processing in a database system
JP2005018772A (en) Multiprocessor computer system with multiple coherency regions and software migration across coherency regions without cache purges
US9292341B2 (en) RPC acceleration based on previously memorized flows
TW201636838A (en) Resource management
CN100461136C (en) Method and system for maintaining data coherency in multiprocessor system
US8468531B2 (en) Method and apparatus for efficient inter-thread synchronization for helper threads
JP6722182B2 (en) Execution of context-sensitive barrier instructions
US9176821B2 (en) Watchpoint support system for functional simulator
US6052530A (en) Dynamic translation system and method for optimally translating computer code
US7640400B2 (en) Programmable data prefetching
CN108572926A (en) A kind of method and apparatus for synchronizing caching belonging to central processing unit
WO2018188959A1 (en) Method and apparatus for managing events in a network that adopts event-driven programming framework
Tamura et al. A real-time operating system supporting distributed shared memory for embedded control systems
JP4594889B2 (en) Method for tracing program executed on a system including a plurality of processing devices, and system including a plurality of processing devices
WO2007088582A1 (en) Asynchronous remote procedure calling method in shared-memory multiprocessor, asynchronous remote procedure calling program, and recording medium
US11263151B2 (en) Dynamic translation lookaside buffer (TLB) invalidation using virtually tagged cache for load/store operations
CN116383134B (en) Trace generation method, system, equipment and medium for multi-core network-on-chip evaluation
JP5614483B2 (en) Multi-core processor system, cache coherency control method, and cache coherency control program
JP4974638B2 (en) Simulation apparatus and simulation method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1260916

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20230605

Address after: Room 1-2-A06, Yungu Park, No. 1008 Dengcai Street, Sandun Town, Xihu District, Hangzhou City, Zhejiang Province

Patentee after: Aliyun Computing Co.,Ltd.

Address before: Box 847, four, Grand Cayman capital, Cayman Islands, UK

Patentee before: ALIBABA GROUP HOLDING Ltd.

TR01 Transfer of patent right