CN103049392B - The implementation method of CACHE DIRECTORY and device - Google Patents

The implementation method of CACHE DIRECTORY and device Download PDF

Info

Publication number
CN103049392B
CN103049392B CN201210395299.6A CN201210395299A CN103049392B CN 103049392 B CN103049392 B CN 103049392B CN 201210395299 A CN201210395299 A CN 201210395299A CN 103049392 B CN103049392 B CN 103049392B
Authority
CN
China
Prior art keywords
data
directory
publicly
owned
target data
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.)
Active
Application number
CN201210395299.6A
Other languages
Chinese (zh)
Other versions
CN103049392A (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.)
Tsinghua University
Huawei Technologies Co Ltd
Original Assignee
Tsinghua University
Huawei Technologies Co 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 Tsinghua University, Huawei Technologies Co Ltd filed Critical Tsinghua University
Priority to CN201210395299.6A priority Critical patent/CN103049392B/en
Publication of CN103049392A publication Critical patent/CN103049392A/en
Application granted granted Critical
Publication of CN103049392B publication Critical patent/CN103049392B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The invention discloses a kind of implementation method and device of CACHE DIRECTORY, relate to the communications field, the access speed for solving CACHE DIRECTORY in prior art is slow and store the lower problem of utilization rate.Method provided by the invention comprises: create CACHE DIRECTORY, described CACHE DIRECTORY comprises publicly-owned data directory and private data catalogue, described publicly-owned data directory is for recording the data block information of publicly-owned data, and described private data catalogue is for recording the data block information of private data; When receiving the read-write requests that first processor sends, determine the data type of the target data that this read-write requests is corresponding, described data type comprises private data or publicly-owned data; According to described data type, in described CACHE DIRECTORY, record the data block information of described target data.The present invention is applicable to the communications field, for recording the data block information of data in multicomputer system.

Description

The implementation method of CACHE DIRECTORY and device
Technical field
The present invention relates to the communications field, particularly relate to a kind of implementation method and device of CACHE DIRECTORY.
Background technology
Processor (CPU) is requisite vitals in terminal device and server apparatus.Along with improving constantly of terminal device and server equipment performance, multi-core processor system becomes main flow gradually, such as common UMA (UniformMemoryAccess, uniform memory access) system and NUMA (Non-UniformMemoryAccess, nonuniform memory access) system etc., include multiple processor module.In multi-core processor system, due to the difference of read or write speed, when CPU carries out memory access, preferentially can search from local cache and obtain target data; If do not store target data in the local cache memory of this CPU (cache), then search from the cache of other CPU and obtain target data; If do not store target data in the local cache of other CPU, then search from internal memory and obtain target data.
Search and obtain the method for targeted customer according to above-mentioned CPU, need to carry out buffer consistency process to the data in cache and internal memory, to add up the data stored in processor system.A kind of implementation method is by setting up CACHE DIRECTORY, with the position of the data cached and shared data in the mode record multi-CPU system of catalogue and state.A kind of comparatively common CACHE DIRECTORY is full mapping directory, the data message that what this catalogue was complete store all address spaces in processor system (comprising internal memory and cache), comprises all shared data and manages cache information in device cache throughout.
Realizing in process of the present invention, inventor finds that in prior art, at least there are the following problems: because the address space in processor system is comparatively large, processor quantity is more, so full storage space shared by mapping directory is comparatively large, make the access speed of full mapping directory slow and to store utilization rate lower.
Summary of the invention
Embodiments of the invention provide a kind of implementation method and device of CACHE DIRECTORY, and the access speed that can solve CACHE DIRECTORY in prior art is slow and store the lower problem of utilization rate.
For achieving the above object, embodiments of the invention adopt following technical scheme:
First aspect, embodiments provides a kind of implementation method of CACHE DIRECTORY, and described method comprises:
Create CACHE DIRECTORY, described CACHE DIRECTORY comprises publicly-owned data directory and private data catalogue, and described publicly-owned data directory is for recording the data block information of publicly-owned data, and described private data catalogue is for recording the data block information of private data;
When receiving the read-write requests that first processor sends, determine the data type of the target data that this read-write requests is corresponding, described data type comprises private data or publicly-owned data;
According to described data type, in described CACHE DIRECTORY, record the data block information of described target data.
In a kind of possible implementation, described method also comprises:
Receive the read-write requests that first processor sends, described read-write requests comprises the physical address of target data;
Described when receiving the read-write requests that first processor sends, determine the data type of the target data that this read-write requests is corresponding, comprise: according to the physical address of described read-write requests determination target data, detect the physical address whether recording described target data in described CACHE DIRECTORY.
When a kind of possible:
If do not record the physical address of described target data in described CACHE DIRECTORY, then determine that the data type of described target data is private data;
Then described according to described data type, the data block information of described target data is recorded in described CACHE DIRECTORY, comprise: the data block information recording described target data in described private data catalogue, comprise the physical address of described target data and described target data block carried out to the processor flag of read-write operation, be i.e. the mark of first processor.
When another kind is possible:
If record the physical address of described target data in described CACHE DIRECTORY, the described data type determining the target data that this read-write requests is corresponding, comprising:
(1) when the physical address of described target data is recorded in the private data catalogue in described CACHE DIRECTORY, the processor flag that in described private data catalogue, this physical address is corresponding is detected whether identical with the mark of first processor; If so, then determine that the data type of described target data is private data; If not, then determine that the data type of described target data is publicly-owned data; Then described according to described data type, the data block information of described target data is recorded in described CACHE DIRECTORY, comprise: if determine that the data type of described target data is private data, in described private data catalogue, then upgrade the data block information of described target data according to described read-write requests, described data block information comprises read-write number of times, the access time of described target data; If determine that the data type of described target data is publicly-owned data, then the data block information of described target data be recorded in described publicly-owned data directory, it is invalid to be set to by the directory entry of described target data in described private data catalogue.
(2) when the physical address of described target data is recorded in the publicly-owned data directory in described CACHE DIRECTORY, the described data type determining the target data that this read-write requests is corresponding, comprising: determine that the data type of described target data is publicly-owned data; Then described according to described data type, the data block information of described target data is recorded in described CACHE DIRECTORY, comprise: in the publicly-owned data directory in described CACHE DIRECTORY, the bit vector mark of described target data is modified, in institute's bit vector mark, increase the information of first processor.
Second aspect, the embodiment of the present invention additionally provides a kind of implement device of CACHE DIRECTORY, and described device comprises:
Set up unit, for creating CACHE DIRECTORY, described CACHE DIRECTORY comprises publicly-owned data directory and private data catalogue, and described publicly-owned data directory is for recording the data block information of publicly-owned data, and described private data catalogue is for recording the data block information of private data;
Determining unit, for when receiving the read-write requests that first processor sends, determine the data type of the target data that this read-write requests is corresponding, described data type comprises private data or publicly-owned data;
Record cell, for according to described determining unit established data type, sets up described the data block information recording described target data in the CACHE DIRECTORY of unit establishment.
In a kind of possible implementation, described device also comprises:
Receiving element, for receiving the read-write requests that first processor sends, described read-write requests comprises the physical address of target data.
Described determining unit comprises: detection module, for the physical address according to described read-write requests determination target data, detects the physical address whether recording described target data in described CACHE DIRECTORY;
When a kind of possible:
Described determining unit is used for, when not recording the physical address of described target data in described detection module detection CACHE DIRECTORY, determining that the data type of described target data is private data;
Described record cell specifically for recording the data block information of described target data in described private data catalogue, comprise the physical address of described target data and described target data block carried out to the processor flag of read-write operation, be i.e. the mark of first processor.
When another kind is possible:
When described detection module determines the physical address recording described target data in described CACHE DIRECTORY, described detection module is also for determining the particular location in described CACHE DIRECTORY of described target data further, and described particular location comprises private data catalogue and publicly-owned data directory;
(1) described detection module is also for when determining the private data catalogue that the physical address of described target data is recorded in described CACHE DIRECTORY, detects the processor flag that in described private data catalogue, this physical address is corresponding whether identical with the mark of first processor; If so, then described determining unit determines that the data type of described target data is private data; If not, then described determining unit determines that the data type of described target data is publicly-owned data;
Described record cell is specifically for when the data type determining described target data is private data, in described private data catalogue, upgrade the data block information of described target data according to described read-write requests, described data block information comprises read-write number of times, the access time of described target data; And
Described record cell is specifically for when the data type determining described target data is publicly-owned data, the data block information of described target data be recorded in described publicly-owned data directory, it is invalid to be set to by the directory entry of described target data in described private data catalogue.
(2) described determining unit is used for when described detection module determines that the physical address of described target data is recorded in described publicly-owned data directory, determines that the data type of described target data is publicly-owned data;
Described record cell is used for modifying to the bit vector mark of described target data in the publicly-owned data directory in described CACHE DIRECTORY, increases the information of first processor in institute's bit vector mark.
The implementation method of the CACHE DIRECTORY that the embodiment of the present invention provides and device, set up CACHE DIRECTORY and CACHE DIRECTORY be divided into private data catalogue and publicly-owned data directory, by the data block information of the private data of each processor in private data catalogue recording processor system, by the data block information of multiple processors sharing data in publicly-owned data directory recording processor system.On the one hand, due to the cache finite capacity of processor system, so the storage space that described CACHE DIRECTORY takies can be saved; On the other hand, because private data is only by unique processor access, without the need to recording the visit information of other processors, the service efficiency of CACHE DIRECTORY can effectively be promoted.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The schematic flow sheet of the implementation method of the CACHE DIRECTORY that Fig. 1 provides for the embodiment of the present invention one;
The schematic flow sheet of the implementation method of the CACHE DIRECTORY that Fig. 2 provides for the embodiment of the present invention two;
The building-block of logic of the private data catalogue that Fig. 3 provides for the embodiment of the present invention two;
The structured flowchart of the implement device of the CACHE DIRECTORY that Fig. 4, Fig. 5, Fig. 6 provide for the embodiment of the present invention three.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Embodiment one
Embodiments provide a kind of implementation method of CACHE DIRECTORY, as shown in Figure 1, described method comprises:
101, Directory caching controller creates CACHE DIRECTORY, described CACHE DIRECTORY comprises publicly-owned data directory and private data catalogue, described publicly-owned data directory is for recording the data block information of publicly-owned data, and described private data catalogue is for recording the data block information of private data.
What deserves to be explained is, the present embodiment CACHE DIRECTORY is used for data block information data cached in the cache of recording processor module, and described processor module comprises multiple processor, and described cache is public for described multiple processor.The item number of the directory entry of CACHE DIRECTORY depends on data volume data cached in cache, due to the limited storage space of cache and the storage space of cache usually much smaller than the storage space of processor module internal memory, so in the present embodiment the item number of the directory entry of CACHE DIRECTORY much smaller than full mapping directory of the prior art.Because the capacity of CACHE DIRECTORY is less, so the access speed of CACHE DIRECTORY can be highly improved in the present embodiment.
102, when receiving the read-write requests that first processor sends, the data type of the target data that this read-write requests is corresponding determined by described Directory caching controller, and described data type comprises private data or publicly-owned data.
103, described Directory caching controller is according to described data type, records the data block information of described target data in described CACHE DIRECTORY.
What deserves to be explained is, because private data is only by unique processor access, so when recording private data, without the need to carrying out buffer consistency process to private data, only record the processor flag that described private data is corresponding, effectively can save the storage space shared by CACHE DIRECTORY, the data block information of more publicly-owned data can also be recorded simultaneously, improve the service efficiency of CACHE DIRECTORY.
The implementation method of the CACHE DIRECTORY that the embodiment of the present invention provides, CACHE DIRECTORY only records data block information (without the need to recording the data block information of data in EMS memory) data cached in cache, so the capacity of CACHE DIRECTORY in the present embodiment is less, access speed can be highly improved; On the other hand, by identifying private data and record the data block information of private data in private data catalogue, the storage space taken due to private data catalogue is less, so effectively can promote the service efficiency of CACHE DIRECTORY.
Embodiment two
Embodiments provide a kind of implementation method of CACHE DIRECTORY, as shown in Figure 2, described method comprises:
201, Directory caching controller creates CACHE DIRECTORY, described CACHE DIRECTORY comprises publicly-owned data directory and private data catalogue, described publicly-owned data directory is for recording the data block information of publicly-owned data, and described private data catalogue is for recording the data block information of private data.
What deserves to be explained is, different from full mapping directory of the prior art, the CACHE DIRECTORY in the present embodiment is used for data block information data cached in recording processor system.Wherein, the data block information of described publicly-owned data comprises the corresponding relation that data cached physical address and bit vector identify, and institute's bit vector mark comprises N number of pointer, and for characterizing processor corresponding to described publicly-owned data, described N is the number of processor; The data message of described private data comprises the processor flag of data cached physical address and this data cached correspondence.
202, described Directory caching controller receives the read-write requests that first processor sends, and described read-write requests comprises the physical address of target data.
The method that the present embodiment provides is applicable to the processor module in multi-core processor system, and this processor module comprises multiple processor, cache and internal memory, and wherein, described cache and internal memory share for described multiple processor.
203, described Directory caching controller is according to the physical address of described read-write requests determination target data, detects the physical address whether recording described target data in described CACHE DIRECTORY; If not, then perform 204, if so, then perform 205.
204, described Directory caching controller determines that the data type of described target data is private data, the data block information of described target data is recorded in described private data catalogue, comprise the physical address of described target data and described target data block carried out to the processor flag of read-write operation, be i.e. the mark of first processor.
That is, the implementation method of the CACHE DIRECTORY that the present embodiment provides, when carrying out original records to all data, all processes as private data.If other processors of follow-up existence carry out read-write operation to a certain data, then the data type of these data is revised as publicly-owned data.
205, described Directory caching controller detects the particular location of physical address in described CACHE DIRECTORY of described target data further; If the physical address of described target data is recorded in the publicly-owned data directory in described CACHE DIRECTORY, perform 206; If the physical address of described target data is recorded in the private data catalogue in described CACHE DIRECTORY, perform 207.
206, described Directory caching controller determines that the data type of described target data is publicly-owned data; In publicly-owned data directory in described CACHE DIRECTORY, the bit vector mark of described target data is modified, in institute's bit vector mark, increase the information of first processor.
Because publicly-owned data can be carried out read-write operation by multiple processor, so each directory entry in publicly-owned data directory comprises N number of pointer (N is the number of processor in current processor module), these pointers form bit vector mark, and the storage space shared by each bit vector mark is N bit.
Whether the processor flag that 207, the described Directory caching controller physical address that detects described target data is corresponding is identical with the mark of first processor; If so, then 208 are performed; If not, then 209 are performed.
208, described Directory caching controller determines that the data type of described target data is private data, in described private data catalogue, upgrade the data block information of described target data according to described read-write requests, described data block information comprises read-write number of times, the access time of described target data.
Concrete, for the ease of understanding, embodiments provide a kind of building-block of logic of privately owned number catalogue, as shown in Figure 3, described private data directory entry comprises physical address bits (Block_Address represents the physical address of private data), processor flag (n represents the processor flag that private data is corresponding), significance bit (1 represents that current directory item is effective, and 0 represents that current directory item is invalid).Wherein, the length of physical address bits depends on that the length of address wire in processor module, the length of processor flag depend on the number of processor, and the length of significance bit is fixed as 1 bit.Concrete, if current processor module is made up of N number of processor, then the length of processor flag is LogN bit.As can be seen here, compared with identifying with the bit vector in publicly-owned data directory, the data block information of a record physical address can save (N-LogN-1) bit, so identify private data effectively can save storage space from target data.To comprise the processor module of N=64 processor, record a private data and can save N-LogN-1=57 bit than record publicly-owned data.
What deserves to be explained is, at multicomputer system, the data volume of private data is very large, such as: the private data amount in TPC-H program is about 20%-25%, it is more than 80% that private data amount in OLTP (On-LineTransactionProcessing, online transaction processing system) oracle database is about 35% scientific program.So the method adopting the present embodiment to provide in a multi-processor system, effectively can promote the service efficiency of CACHE DIRECTORY.
209, described Directory caching controller determines that the data type of described target data is publicly-owned data, the data block information of described target data is recorded in described publicly-owned data directory, and the directory entry of described target data in described private data catalogue is set to invalid.
Preferably, when there is no idle directory entry in described publicly-owned data directory and private data catalogue, described method also comprises: described Directory caching controller determines that in described publicly-owned data directory and private data catalogue assigned catalogue item is as replaceable directory entry, this assigned catalogue item is replaced, to record the data block information of described target data.
Such as, described Directory caching controller can be described publicly-owned data directory and private data catalogue setting-up time threshold value respectively, does not also have accessed directory entry to be defined as replaceable directory entry by exceeding preset time threshold.
Optionally, if described in exceed preset time threshold and also do not have accessed directory entry to be zero, then described Directory caching controller can search the minimum target item of access times in described publicly-owned data directory and private data catalogue, determines that this directory entry is replaceable directory entry.
Need ben, the implementation method of the CACHE DIRECTORY that the embodiment of the present invention provides, only need revise Directory caching structure can identify private data, without the need to carrying out any amendment to the hardware in multicomputer system or software, is convenient to realize.
The implementation method of the CACHE DIRECTORY that the embodiment of the present invention provides, CACHE DIRECTORY only records data block information (without the need to recording the data block information of data in EMS memory) data cached in cache, so the capacity of CACHE DIRECTORY in the present embodiment is less, access speed can be highly improved; On the other hand by identifying private data and carry out record to described private data in described private data catalogue, the service efficiency of CACHE DIRECTORY effectively can be promoted.
Embodiment three
Embodiments provide a kind of implement device of CACHE DIRECTORY, can realize said method embodiment, as shown in Figure 4, described device comprises:
Set up unit 41, for creating CACHE DIRECTORY, described CACHE DIRECTORY comprises publicly-owned data directory and private data catalogue, and described publicly-owned data directory is for recording the data block information of publicly-owned data, and described private data catalogue is for recording the data block information of private data;
Determining unit 42, for when receiving the read-write requests that first processor sends, determine the data type of the target data that this read-write requests is corresponding, described data type comprises private data or publicly-owned data;
Record cell 43, for according to described determining unit 42 established data type, sets up described the data block information recording described target data in the CACHE DIRECTORY of unit 41 establishment.
Concrete, describedly set up CACHE DIRECTORY that unit 41 creates for data block information data cached in recording processor system; Wherein, the data block information of described publicly-owned data comprises the corresponding relation that data cached physical address and bit vector identify, and institute's bit vector mark comprises N number of pointer, and for characterizing processor corresponding to described publicly-owned data, described N is the number of processor; The data message of described private data comprises the processor flag of data cached physical address and this data cached correspondence.
Further, as shown in Figure 5, described device also comprises:
Receiving element 44, for receiving the read-write requests that first processor sends, described read-write requests comprises the physical address of target data.
Concrete, as shown in Figure 5, described determining unit 42 comprises detection module 421, for the physical address according to described read-write requests determination target data, detects the physical address whether recording described target data in described CACHE DIRECTORY;
On the one hand, described determining unit 42, for when described detection module 421 detects the physical address not recording described target data in CACHE DIRECTORY, determines that the data type of described target data is private data;
Described record cell 43 specifically for recording the data block information of described target data in described private data catalogue, comprise the physical address of described target data and described target data block carried out to the processor flag of read-write operation, be i.e. the mark of first processor.
On the other hand, when described detection module 421 determines the physical address recording described target data in described CACHE DIRECTORY, described detection module 421 is also for determining the particular location in described CACHE DIRECTORY of described target data further, and described particular location comprises private data catalogue and publicly-owned data directory;
Concrete, described detection module 421, also for when determining the private data catalogue that the physical address of described target data is recorded in described CACHE DIRECTORY, detects the processor flag that in described private data catalogue, this physical address is corresponding whether identical with the mark of first processor; If so, then described determining unit 42 determines that the data type of described target data is private data; If not, then described determining unit 42 determines that the data type of described target data is publicly-owned data;
Described record cell 43 is specifically for when the data type determining described target data is private data, in described private data catalogue, upgrade the data block information of described target data according to described read-write requests, described data block information comprises read-write number of times, the access time of described target data; And
Described record cell 43 is concrete also for when the data type determining described target data is publicly-owned data, the data block information of described target data be recorded in described publicly-owned data directory, it is invalid to be set to by the directory entry of described target data in described private data catalogue.
Again on the one hand, described determining unit 42, for when described detection module 421 determines that the physical address of described target data is recorded in described publicly-owned data directory, determines that the data type of described target data is publicly-owned data;
Described record cell 43, for modifying to the bit vector mark of described target data in the publicly-owned data directory in described CACHE DIRECTORY, increases the information of first processor in institute's bit vector mark.
Optionally, as shown in Figure 6, described device also comprises replacement unit 45, for when there is no idle directory entry in described publicly-owned data directory and private data catalogue, in described publicly-owned data directory and private data catalogue, determine that assigned catalogue item is as replaceable directory entry, this assigned catalogue item is replaced, to record the data block information of described target data.
Concrete, as shown in Figure 6, described replacement unit 45 comprises threshold value setting module 451, for being described publicly-owned data directory and private data catalogue setting-up time threshold value respectively, accessed directory entry is not also had to be defined as replaceable directory entry to make described replacement unit 45 by exceeding preset time threshold.
Optionally, as shown in Figure 6, described replacement unit 45 also comprises statistical module 452, for determine when described threshold value setting module 451 exceed preset time threshold also do not have accessed directory entry to be zero time, in described publicly-owned data directory and private data catalogue, search the minimum target item of access times, determine that this directory entry is replaceable directory entry.
The implement device of the CACHE DIRECTORY that the embodiment of the present invention provides, the CACHE DIRECTORY setting up unit 41 foundation only records data block information (without the need to recording the data block information of data in EMS memory) data cached in cache, so the capacity of CACHE DIRECTORY in the present embodiment is less, access speed can be highly improved; The implement device of the CACHE DIRECTORY on the other hand in the present embodiment by identifying private data and carry out record to described private data in described private data catalogue, thus can effectively promote the service efficiency of CACHE DIRECTORY.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add required common hardware by software and realize, and can certainly pass through hardware, but in a lot of situation, the former is better embodiment.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in the storage medium that can read, as the floppy disk of computing machine, hard disk or CD etc., comprise some instructions and perform method described in each embodiment of the present invention in order to make a computer equipment (can be personal computer, server, or the network equipment etc.).
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of described claim.

Claims (18)

1. an implementation method for CACHE DIRECTORY, is characterized in that, comprising:
Create CACHE DIRECTORY, described CACHE DIRECTORY comprises publicly-owned data directory and private data catalogue, and described publicly-owned data directory is for recording the data block information of publicly-owned data, and described private data catalogue is for recording the data block information of private data;
When receiving the read-write requests that first processor sends, determine the data type of the target data that this read-write requests is corresponding, described data type comprises private data or publicly-owned data;
According to described data type, in described CACHE DIRECTORY, record the data block information of described target data.
2. method according to claim 1, is characterized in that, described CACHE DIRECTORY is used for data block information data cached in recording processor system;
Wherein, the data block information of described publicly-owned data comprises the corresponding relation that data cached physical address and bit vector identify, and institute's bit vector mark comprises N number of pointer, and for characterizing processor corresponding to described publicly-owned data, described N is the number of processor; The data block information of described private data comprises the processor flag of data cached physical address and this data cached correspondence.
3. method according to claim 1 and 2, is characterized in that, described when receiving the read-write requests that first processor sends, and before determining the data type of the target data that this read-write requests is corresponding, comprising:
Receive the read-write requests that first processor sends, described read-write requests comprises the physical address of target data.
4. method according to claim 3, is characterized in that, described when receiving the read-write requests that first processor sends, and determines the data type of the target data that this read-write requests is corresponding, comprising:
According to the physical address of described read-write requests determination target data, detect the physical address whether recording described target data in described CACHE DIRECTORY;
If do not record the physical address of described target data in described CACHE DIRECTORY, then determine that the data type of described target data is private data;
Then described according to described data type, in described CACHE DIRECTORY, record the data block information of described target data, comprising:
In described private data catalogue, record the data block information of described target data, comprise the physical address of described target data and described target data block carried out to the processor flag of read-write operation, be i.e. the mark of first processor.
5. method according to claim 4, is characterized in that, if record the physical address of described target data in described CACHE DIRECTORY, the described data type determining the target data that this read-write requests is corresponding, comprising:
When the physical address of described target data is recorded in the private data catalogue in described CACHE DIRECTORY, detect the processor flag that in described private data catalogue, this physical address is corresponding whether identical with the mark of first processor; If so, then determine that the data type of described target data is private data; If not, then determine that the data type of described target data is publicly-owned data;
Then described according to described data type, in described CACHE DIRECTORY, record the data block information of described target data, comprising:
If determine that the data type of described target data is private data, in described private data catalogue, then upgrade the data block information of described target data according to described read-write requests, described data block information comprises read-write number of times, the access time of described target data;
If determine that the data type of described target data is publicly-owned data, then the data block information of described target data be recorded in described publicly-owned data directory, it is invalid to be set to by the directory entry of described target data in described private data catalogue.
6. method according to claim 5, is characterized in that, when the physical address of described target data is recorded in the publicly-owned data directory in described CACHE DIRECTORY, the described data type determining the target data that this read-write requests is corresponding, comprising:
Determine that the data type of described target data is publicly-owned data;
Then described according to described data type, in described CACHE DIRECTORY, record the data block information of described target data, comprising:
In publicly-owned data directory in described CACHE DIRECTORY, the bit vector mark of described target data is modified, in institute's bit vector mark, increase the information of first processor.
7. method according to claim 1, it is characterized in that, when there is no idle directory entry in described publicly-owned data directory and private data catalogue, described when receiving the read-write requests that first processor sends, after determining the data type of the target data that this read-write requests is corresponding, also comprise:
In described publicly-owned data directory and private data catalogue, determine that assigned catalogue item is as replaceable directory entry, replaces this assigned catalogue item, to record the data block information of described target data.
8. method according to claim 7, is characterized in that, describedly in described publicly-owned data directory and private data catalogue, determines that assigned catalogue item is as replaceable directory entry, comprising:
For described publicly-owned data directory and private data catalogue setting-up time threshold value respectively, accessed directory entry is not also had to be defined as replaceable directory entry by exceeding preset time threshold.
9. method according to claim 8, it is characterized in that, when described exceed preset time threshold also do not have accessed directory entry to be zero time, describedly in described publicly-owned data directory and private data catalogue, determine that assigned catalogue item is as replaceable directory entry, also comprises:
In described publicly-owned data directory and private data catalogue, search the minimum target item of access times, determine that this directory entry is replaceable directory entry.
10. an implement device for CACHE DIRECTORY, is characterized in that, comprising:
Set up unit, for creating CACHE DIRECTORY, described CACHE DIRECTORY comprises publicly-owned data directory and private data catalogue, and described publicly-owned data directory is for recording the data block information of publicly-owned data, and described private data catalogue is for recording the data block information of private data;
Determining unit, for when receiving the read-write requests that first processor sends, determine the data type of the target data that this read-write requests is corresponding, described data type comprises private data or publicly-owned data;
Record cell, for according to described determining unit established data type, sets up described the data block information recording described target data in the CACHE DIRECTORY of unit establishment.
11. devices according to claim 10, is characterized in that, described set up unit create CACHE DIRECTORY for data block information data cached in recording processor system;
Wherein, the data block information of described publicly-owned data comprises the corresponding relation that data cached physical address and bit vector identify, and institute's bit vector mark comprises N number of pointer, and for characterizing processor corresponding to described publicly-owned data, described N is the number of processor; The data block information of described private data comprises the processor flag of data cached physical address and this data cached correspondence.
12. devices according to claim 10 or 11, it is characterized in that, described device also comprises:
Receiving element, for receiving the read-write requests that first processor sends, described read-write requests comprises the physical address of target data.
13. devices according to claim 12, is characterized in that, described determining unit comprises:
Detection module, for the physical address according to described read-write requests determination target data, detects the physical address whether recording described target data in described CACHE DIRECTORY;
Described determining unit is used for, when not recording the physical address of described target data in described detection module detection CACHE DIRECTORY, determining that the data type of described target data is private data;
Described record cell specifically for recording the data block information of described target data in described private data catalogue, comprise the physical address of described target data and described target data block carried out to the processor flag of read-write operation, be i.e. the mark of first processor.
14. devices according to claim 13, it is characterized in that, when described detection module determines the physical address recording described target data in described CACHE DIRECTORY, described detection module is also for detecting the particular location in described CACHE DIRECTORY of described target data further, and described particular location comprises private data catalogue and publicly-owned data directory;
Described detection module, specifically for when determining the private data catalogue that the physical address of described target data is recorded in described CACHE DIRECTORY, detects the processor flag that in described private data catalogue, this physical address is corresponding whether identical with the mark of first processor; If so, then described determining unit determines that the data type of described target data is private data; If not, then described determining unit determines that the data type of described target data is publicly-owned data;
Described record cell is specifically for when the data type determining described target data is private data, in described private data catalogue, upgrade the data block information of described target data according to described read-write requests, described data block information comprises read-write number of times, the access time of described target data; And
Described record cell is specifically for when the data type determining described target data is publicly-owned data, the data block information of described target data be recorded in described publicly-owned data directory, it is invalid to be set to by the directory entry of described target data in described private data catalogue.
15. devices according to claim 14, it is characterized in that, when described determining unit is specifically for determining that the physical address of described target data is recorded in described publicly-owned data directory when described detection module, determine that the data type of described target data is publicly-owned data;
Described record cell is used for modifying to the bit vector mark of described target data in the publicly-owned data directory in described CACHE DIRECTORY, increases the information of first processor in institute's bit vector mark.
16. devices according to claim 10, is characterized in that, described device also comprises:
Replacement unit, for when there is no idle directory entry in described publicly-owned data directory and private data catalogue, in described publicly-owned data directory and private data catalogue, determine that assigned catalogue item is as replaceable directory entry, this assigned catalogue item is replaced, to record the data block information of described target data.
17. devices according to claim 16, it is characterized in that, described replacement unit comprises threshold value setting module, for being described publicly-owned data directory and private data catalogue setting-up time threshold value respectively, accessed directory entry is not also had to be defined as replaceable directory entry to make described replacement unit by exceeding preset time threshold.
18. devices according to claim 17, it is characterized in that, described replacement unit also comprises statistical module, for determine when described threshold value setting module exceed preset time threshold also do not have accessed directory entry to be zero time, in described publicly-owned data directory and private data catalogue, search the minimum target item of access times, determine that this directory entry is replaceable directory entry.
CN201210395299.6A 2012-10-17 2012-10-17 The implementation method of CACHE DIRECTORY and device Active CN103049392B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210395299.6A CN103049392B (en) 2012-10-17 2012-10-17 The implementation method of CACHE DIRECTORY and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210395299.6A CN103049392B (en) 2012-10-17 2012-10-17 The implementation method of CACHE DIRECTORY and device

Publications (2)

Publication Number Publication Date
CN103049392A CN103049392A (en) 2013-04-17
CN103049392B true CN103049392B (en) 2016-04-06

Family

ID=48062039

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210395299.6A Active CN103049392B (en) 2012-10-17 2012-10-17 The implementation method of CACHE DIRECTORY and device

Country Status (1)

Country Link
CN (1) CN103049392B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279575A (en) * 2013-06-20 2013-09-04 福建伊时代信息科技股份有限公司 Method and device for processing file information
WO2016049808A1 (en) * 2014-09-29 2016-04-07 华为技术有限公司 Cache directory processing method and directory controller of multi-core processor system
WO2016049807A1 (en) * 2014-09-29 2016-04-07 华为技术有限公司 Cache directory processing method and directory controller of multi-core processor system
CN104461932B (en) * 2014-11-04 2017-05-10 浪潮电子信息产业股份有限公司 Directory cache management method for big data application
WO2016202393A1 (en) * 2015-06-18 2016-12-22 Huawei Technologies Co., Ltd. Systems and methods for directory based cache coherence
CN106326143B (en) * 2015-06-18 2019-08-27 华为技术有限公司 A kind of caching distribution, data access, data transmission method for uplink, processor and system
CN108108402B (en) * 2017-12-07 2020-07-17 泰康保险集团股份有限公司 Data item paraphrasing updating method and device
CN108280355A (en) * 2017-12-26 2018-07-13 山东浪潮云服务信息科技有限公司 A kind of data desensitization method and device
CN114978665A (en) * 2022-05-17 2022-08-30 中原银行股份有限公司 Data verification method and data isolation system based on Redis distributed cache platform

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5265232A (en) * 1991-04-03 1993-11-23 International Business Machines Corporation Coherence control by data invalidation in selected processor caches without broadcasting to processor caches not having the data
CN102346714A (en) * 2011-10-09 2012-02-08 西安交通大学 Consistency maintenance device for multi-kernel processor and consistency interaction method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5265232A (en) * 1991-04-03 1993-11-23 International Business Machines Corporation Coherence control by data invalidation in selected processor caches without broadcasting to processor caches not having the data
CN102346714A (en) * 2011-10-09 2012-02-08 西安交通大学 Consistency maintenance device for multi-kernel processor and consistency interaction method

Also Published As

Publication number Publication date
CN103049392A (en) 2013-04-17

Similar Documents

Publication Publication Date Title
CN103049392B (en) The implementation method of CACHE DIRECTORY and device
US11960726B2 (en) Method and apparatus for SSD storage access
US10114749B2 (en) Cache memory system and method for accessing cache line
US9904473B2 (en) Memory and processor affinity in a deduplicated environment
TWI627536B (en) System and method for a shared cache with adaptive partitioning
CN102111448B (en) Data prefetching method of DHT memory system and node and system
JP2018055727A (en) Selectively persisting application program data transferred from system memory to non-volatile data storage
US20120102273A1 (en) Memory agent to access memory blade as part of the cache coherency domain
WO2017041570A1 (en) Method and apparatus for writing data to cache
KR20190052546A (en) Key-value storage device and method of operating the key-value storage device
KR20110134840A (en) Persistent memory for processor main memory
WO2017201984A1 (en) Data processing method, associated apparatus, and data storage system
WO2015043376A1 (en) Page access method and page access device, and server
TW201432446A (en) Wear leveling with marching strategy
US10705977B2 (en) Method of dirty cache line eviction
CN112346647A (en) Data storage method, device, equipment and medium
EP3249539B1 (en) Method and device for accessing data visitor directory in multi-core system
CN113138851B (en) Data management method, related device and system
US10268594B2 (en) Implementing paging device selection based on wear-level data
Liu et al. Efficient wear leveling for PCM/DRAM-based hybrid memory
CN111796757B (en) Solid state disk cache region management method and device
CN115793957A (en) Method and device for writing data and computer storage medium
CN107145305B (en) Use method of distributed physical disk and virtual machine
US11874767B2 (en) Memory partitions for processing entities
CN105095105A (en) Cache partitioning method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant