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.
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.