CN103049392A - Method and device for achieving cache catalogue - Google Patents

Method and device for achieving cache catalogue Download PDF

Info

Publication number
CN103049392A
CN103049392A CN2012103952996A CN201210395299A CN103049392A CN 103049392 A CN103049392 A CN 103049392A CN 2012103952996 A CN2012103952996 A CN 2012103952996A CN 201210395299 A CN201210395299 A CN 201210395299A CN 103049392 A CN103049392 A CN 103049392A
Authority
CN
China
Prior art keywords
data
directory
publicly
catalogue
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.)
Granted
Application number
CN2012103952996A
Other languages
Chinese (zh)
Other versions
CN103049392B (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

Images

Abstract

The invention discloses a method and a device for achieving a cache catalogue and relates to the field of communication. The method and the device are used for resolving the problems in the prior art of low access speed of the cache catalogue and low storage use efficiency. The method includes building the cache catalogue which comprises a public data catalogue and a private data catalogue. The public data catalogue is used for recording data block information of public data, and the private data catalogue is used for recording data block information of private data. The method further includes determining data type of target data that a read-write request corresponds to when receiving the read-write request that a first processor transmits. The data type comprises private data or public data. The method further includes recording the data block information of the target data in the cache catalogue. The method and the device are suitable for the communication field and are used for recording the data block information of data in a multi-processor system.

Description

The implementation method of CACHE DIRECTORY and device
Technical field
The present invention relates to the communications field, relate in particular to a kind of implementation method and device of CACHE DIRECTORY.
Background technology
Processor (CPU) is requisite vitals in terminal device and the server apparatus.Along with improving constantly of terminal device and server equipment performance, multi-core processor system becomes main flow gradually, common UMA (Uniform Memory Access for example, uniform memory access) system and NUMA (Non-Uniform Memory Access, nonuniform memory access) system etc. includes a plurality of processor modules.In multi-core processor system, because target data be searched and be obtained to the difference of read or write speed when CPU carries out memory access, can preferentially from local cache; If do not store target data in the local cache memory of this CPU (cache), then from the cache of other CPU, search and obtain target data; If do not store target data among the local cache of other CPU, then from internal memory, search and obtain target data.
Search and obtain targeted customer's method according to above-mentioned CPU, need to carry out buffer consistency to the data in cache and the internal memory and process, so that the data of storing in the processor system are added up.A kind of implementation method is by setting up CACHE DIRECTORY, recording position and the state of the data cached and shared data in the multi-CPU system in the mode of catalogue.A kind of comparatively common CACHE DIRECTORY is entirely to shine upon catalogue, the storage that this catalogue is complete the data message of all address spaces (comprising internal memory and cache) in the processor system, comprise that all shared data manage the cache information among the device cache throughout.
In realizing process of the present invention, the inventor finds that there are the following problems at least in the prior art: because the address space in the processor system is large, processor quantity is more, so it is larger entirely to shine upon the shared storage space of catalogue, the access speed of catalogue is slow and the storage utilization rate is lower so that entirely shine upon.
Summary of the invention
Embodiments of the invention provide a kind of implementation method and device of CACHE DIRECTORY, can solve the slow and lower problem of storage utilization rate of the access speed of CACHE DIRECTORY in the prior art.
For achieving the above object, embodiments of the invention adopt following technical scheme:
First aspect, the embodiment of the invention provide 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 used for recording the data block information of publicly-owned data, and described private data catalogue is used for the data block information of record private data;
When receiving the read-write requests of first processor transmission, 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, the data block information of the described target data of record in described CACHE DIRECTORY.
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 of first processor transmission, determine the data type of the target data that this read-write requests is corresponding, comprise: determine the physical address of target data according to described read-write requests, detect the physical address that whether records described target data in the described CACHE DIRECTORY.
In the situation that a kind of possible:
If do not record the physical address of described target data in the described CACHE DIRECTORY, determine that then the data type of described target data is private data;
Then described according to described data type, the data block information of the described target data of record in described CACHE DIRECTORY, comprise: the data block information of the described target data of record in described private data catalogue, comprise the physical address of described target data and the processor flag of described target data block being carried out read-write operation, the i.e. sign of first processor.
In the situation that another kind is possible:
If record the physical address of described target data in the described CACHE DIRECTORY, the described data type of determining the target data that this read-write requests is corresponding comprises:
(1) when the physical address of described target data is recorded in the private data catalogue in the described CACHE DIRECTORY, detects the processor flag that this physical address is corresponding in the described private data catalogue whether identical with the sign of first processor; If determine that then the data type of described target data is private data; If not, then the data type of definite described target data is publicly-owned data; Then described according to described data type, the data block information of the described target data of record in described CACHE DIRECTORY, comprise: if determine that the data type of described target data is private data, then upgrade the data block information of described target data in described private data catalogue 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 with described target data is recorded in the described publicly-owned data directory, and it is invalid that the directory entry of described target data in described private data catalogue is set to.
(2) when the physical address of described target data is recorded in the publicly-owned data directory in the described CACHE DIRECTORY, the described data type of determining the target data that this read-write requests is corresponding, comprising: the data type of determining described target data is publicly-owned data; Then described according to described data type, the data block information of the described target data of record in described CACHE DIRECTORY, comprise: the bit vector sign to described target data in the publicly-owned data directory in described CACHE DIRECTORY is made amendment, and increases the information of first processor in described bit vector sign.
Second aspect, the embodiment of the invention also provide a kind of implement device of CACHE DIRECTORY, and described device comprises:
Set up the unit, be used for creating CACHE DIRECTORY, described CACHE DIRECTORY comprises publicly-owned data directory and private data catalogue, and described publicly-owned data directory is used for recording the data block information of publicly-owned data, and described private data catalogue is used for the data block information of record private data;
Determining unit is used for determining the data type of the target data that this read-write requests is corresponding that when receiving the read-write requests of first processor transmission described data type comprises private data or publicly-owned data;
Record cell is used for according to described determining unit established data type, in the described data block information of setting up the described target data of record in the CACHE DIRECTORY that the unit creates.
In a kind of possible implementation, described device also comprises:
Receiving element is used for receiving the read-write requests that first processor sends, and described read-write requests comprises the physical address of target data.
Described determining unit comprises: detection module, and the physical address for determine target data according to described read-write requests detects the physical address that whether records described target data in the described CACHE DIRECTORY;
In the situation that a kind of possible:
Described determining unit is used for when described detection module detection CACHE DIRECTORY does not record the physical address of described target data, and the data type of determining described target data is private data;
Described record cell specifically is used for the data block information in the described target data of described private data catalogue record, comprise the physical address of described target data and the processor flag of described target data block being carried out read-write operation, the i.e. sign of first processor.
In the situation that another kind is possible:
When described detection module is determined to record the physical address of described target data in the described CACHE DIRECTORY, described detection module also is used for further determining the particular location in described CACHE DIRECTORY of described target data, and described particular location comprises private data catalogue and publicly-owned data directory;
(1) described detection module also is used for detecting the processor flag that this physical address is corresponding in the described private data catalogue whether identical with the sign of first processor when the physical address of determining described target data is recorded in the private data catalogue of described CACHE DIRECTORY; If 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 specifically is used for when the data type of determining described target data is private data, upgrade the data block information of described target data in described private data catalogue 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 specifically is used for when the data type of determining described target data is publicly-owned data, the data block information of described target data is recorded in the described publicly-owned data directory, and it is invalid that the directory entry of described target data in described private data catalogue is set to.
(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, and the data type of determining described target data is publicly-owned data;
Described record cell is made amendment for the bit vector sign to described target data in the publicly-owned data directory of described CACHE DIRECTORY, increases the information of first processor in described bit vector sign.
The implementation method of the CACHE DIRECTORY that the embodiment of the invention provides and device, set up CACHE DIRECTORY and CACHE DIRECTORY is divided into private data catalogue and publicly-owned data directory, by the data block information of the private data of each processor in the private data catalogue recording processor system, by the data block information of a plurality of processors sharing data in the publicly-owned data directory recording processor system.On the one hand, because the cache finite capacity of processor system, so can save the storage space that described CACHE DIRECTORY takies; On the other hand, because private data only by unique processor access, need not to record the visit information of other processors, can effectively promote the service efficiency of CACHE DIRECTORY.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, the below will do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art, apparently, accompanying drawing in the following describes only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The schematic flow sheet of the implementation method of the CACHE DIRECTORY that Fig. 1 provides for the embodiment of the invention one;
The schematic flow sheet of the implementation method of the CACHE DIRECTORY that Fig. 2 provides for the embodiment of the invention two;
The building-block of logic of the private data catalogue that Fig. 3 provides for the embodiment of the 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 invention three.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
Embodiment one
The embodiment of the invention provides a kind of implementation method of CACHE DIRECTORY, and as shown in Figure 1, described method comprises:
101, the catalogue cache controller creates CACHE DIRECTORY, described CACHE DIRECTORY comprises publicly-owned data directory and private data catalogue, described publicly-owned data directory is used for recording the data block information of publicly-owned data, and described private data catalogue is used for the data block information of record private data.
What deserves to be explained is, the present embodiment CACHE DIRECTORY is used for the data cached data block information of cache of recording processor module, and described processor module comprises a plurality of processors, and described cache is public for described a plurality of processors.The item number of the directory entry of CACHE DIRECTORY depends on data volume data cached among the cache, because the storage space of the limited storage space of cache and cache is usually much smaller than the storage space of processor module internal memory, thus in the present embodiment the item number of the directory entry of CACHE DIRECTORY much smaller than full mapping catalogue 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 of first processor transmission, described catalogue cache controller is determined the data type of the target data that this read-write requests is corresponding, and described data type comprises private data or publicly-owned data.
103, described catalogue cache controller records the data block information of described target data according to described data type in described CACHE DIRECTORY.
What deserves to be explained is, because private data is only by unique processor access, so when the record private data, need not that private data is carried out buffer consistency processes, only record processor flag corresponding to described private data, can effectively save the shared storage space of CACHE DIRECTORY, can also record the data block information of more publicly-owned data simultaneously, improve the service efficiency of CACHE DIRECTORY.
The implementation method of the CACHE DIRECTORY that the embodiment of the invention provides, CACHE DIRECTORY only records data block information data cached among the cache (need not to record the data block information of data in EMS memory), so the capacity of the CACHE DIRECTORY in the present embodiment is less, access speed can be highly improved; On the other hand, by the identification private data and in the private data catalogue data block information of record private data because the storage space that takies of private data catalogue is less, so can effectively promote the service efficiency of CACHE DIRECTORY.
Embodiment two
The embodiment of the invention provides a kind of implementation method of CACHE DIRECTORY, and as shown in Figure 2, described method comprises:
201, the catalogue cache controller creates CACHE DIRECTORY, described CACHE DIRECTORY comprises publicly-owned data directory and private data catalogue, described publicly-owned data directory is used for recording the data block information of publicly-owned data, and described private data catalogue is used for the data block information of record private data.
What deserves to be explained is, different from full mapping catalogue of the prior art, the CACHE DIRECTORY in the present embodiment is used for the data cached data block information of recording processor system.Wherein, the data block information of described publicly-owned data comprises the corresponding relation of data cached physical address and bit vector sign, and described bit vector sign comprises N pointer, is used for characterizing processor corresponding to described publicly-owned data, and described N is the number of processor; The data message of described private data comprises data cached physical address and the processor flag of this data cached correspondence.
202, described catalogue cache 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 the multi-core processor system, and this processor module comprises a plurality of processors, cache and internal memory, and wherein, described cache and internal memory share for described a plurality of processors.
203, described catalogue cache controller is determined the physical address of target data according to described read-write requests, detects the physical address that whether records described target data in the described CACHE DIRECTORY; If not, then carry out 204, if then carry out 205.
204, described catalogue cache controller determines that the data type of described target data is private data, the data block information of the described target data of record in described private data catalogue, comprise the physical address of described target data and the processor flag of described target data block being carried out read-write operation, the i.e. sign of first processor.
That is to say that the implementation method of the CACHE DIRECTORY that the present embodiment provides when all data are carried out original records, is all processed as private data.If other processors of follow-up existence carry out read-write operation to a certain data, then the data type with these data is revised as publicly-owned data.
205, described catalogue cache controller further detects the particular location of physical address in described CACHE DIRECTORY of described target data; If the physical address of described target data is recorded in the publicly-owned data directory in the described CACHE DIRECTORY, carry out 206; If the physical address of described target data is recorded in the private data catalogue in the described CACHE DIRECTORY, carry out 207.
206, described catalogue cache controller determines that the data type of described target data is publicly-owned data; Bit vector sign to described target data in the publicly-owned data directory in described CACHE DIRECTORY is made amendment, and increases the information of first processor in described bit vector sign.
Because publicly-owned data can be carried out read-write operation by a plurality of processors, so each directory entry in the publicly-owned data directory comprises N pointer (N is the number of processor in the current processor module), these pointers consist of the bit vector sign, and the shared storage space of each bit vector sign is the N bit.
Whether the processor flag that 207, the described catalogue cache controller physical address that detects described target data is corresponding is identical with the sign of first processor; If then carry out 208; If not, then carry out 209.
208, described catalogue cache controller determines that the data type of described target data is private data, upgrade the data block information of described target data in described private data catalogue 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, the embodiment of the invention provides 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 expression current directory item is effective, and 0 expression current directory item is invalid).Wherein, the length of physical address bits depends on the length of address wire in the processor module, and the length of processor flag depends on the number of processor, and the length of significance bit is fixed as 1 bit.Concrete, if the current processor module is made of N processor, then the length of processor flag is Log N bit.This shows, compare with the bit vector sign in the publicly-owned data directory, the data block information of a physical address of record can be saved (N-Log N-1) bit, can effectively save storage space so identify private data from target data.Take the processor module that comprises N=64 processor as example, record a private data and can save N-Log N-1=57 bit than publicly-owned data of record.
What deserves to be explained is, at multicomputer system, the data volume of private data is very large, for example: the private data amount in the TPC-H program is about 20%-25%, it is more than 80% that private data amount in OLTP (On-Line Transaction Processing, the online transaction processing system) oracle database is about 35% scientific program.So the method that adopts the present embodiment to provide in multicomputer system can effectively promote the service efficiency of CACHE DIRECTORY.
209, described catalogue cache 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 the described publicly-owned data directory, and the directory entry of described target data in described private data catalogue is set to invalid.
Preferably, when not having idle directory entry in described publicly-owned data directory and the private data catalogue, described method also comprises: described catalogue cache controller determines that in described publicly-owned data directory and private data catalogue the assigned catalogue item is as replaceable directory entry, this assigned catalogue item is replaced, to record the data block information of described target data.
For example, described catalogue cache controller can for described publicly-owned data directory and private data catalogue difference setting-up time threshold value, will also not have accessed directory entry to be defined as replaceable directory entry above the Preset Time threshold value.
Optionally, if describedly surpass the Preset Time threshold value also not have accessed directory entry be zero, then described catalogue cache controller can be searched 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.
Needing ben is that the implementation method of the CACHE DIRECTORY that the embodiment of the invention provides only needs to revise the catalogue buffer structure and can identify private data, need not the hardware in the multicomputer system or software are carried out any modification, is convenient to realize.
The implementation method of the CACHE DIRECTORY that the embodiment of the invention provides, CACHE DIRECTORY only records data block information data cached among the cache (need not to record the data block information of data in EMS memory), so the capacity of the CACHE DIRECTORY in the present embodiment is less, access speed can be highly improved; By identifying private data and in described private data catalogue, described private data being carried out record, can effectively promote the service efficiency of CACHE DIRECTORY on the other hand.
Embodiment three
The embodiment of the invention provides a kind of implement device of CACHE DIRECTORY, can realize said method embodiment, and as shown in Figure 4, described device comprises:
Set up unit 41, be used for creating CACHE DIRECTORY, described CACHE DIRECTORY comprises publicly-owned data directory and private data catalogue, and described publicly-owned data directory is used for recording the data block information of publicly-owned data, and described private data catalogue is used for the data block information of record private data;
Determining unit 42 is used for determining the data type of the target data that this read-write requests is corresponding that when receiving the read-write requests of first processor transmission described data type comprises private data or publicly-owned data;
Record cell 43 is used for according to described determining unit 42 established data types, in the described data block information of setting up the described target data of record in the CACHE DIRECTORY that unit 41 creates.
Concrete, the described CACHE DIRECTORY of setting up unit 41 establishments is used for the data cached data block information of recording processor system; Wherein, the data block information of described publicly-owned data comprises the corresponding relation of data cached physical address and bit vector sign, and described bit vector sign comprises N pointer, is used for characterizing processor corresponding to described publicly-owned data, and described N is the number of processor; The data message of described private data comprises data cached physical address and the processor flag of this data cached correspondence.
Further, as shown in Figure 5, described device also comprises:
Receiving element 44 is used for receiving the read-write requests that first processor sends, and 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, is used for determining according to described read-write requests the physical address of target data, detects the physical address that whether records described target data in the described CACHE DIRECTORY;
On the one hand, described determining unit 42 is used for when described detection module 421 detection CACHE DIRECTORYs do not record the physical address of described target data, and the data type of determining described target data is private data;
The described record cell 43 concrete data block information that are used in the described target data of described private data catalogue record, comprise the physical address of described target data and the processor flag of described target data block being carried out read-write operation, the i.e. sign of first processor.
On the other hand, when described detection module 421 is determined to record the physical address of described target data in the described CACHE DIRECTORY, described detection module 421 also is used for further determining the particular location in described CACHE DIRECTORY of described target data, and described particular location comprises private data catalogue and publicly-owned data directory;
Concrete, described detection module 421 also is used for detecting the processor flag that this physical address is corresponding in the described private data catalogue whether identical with the sign of first processor when the physical address of determining described target data is recorded in the private data catalogue of described CACHE DIRECTORY; If 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 specifically is used for when the data type of determining described target data is private data, upgrade the data block information of described target data in described private data catalogue 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 specifically also is used for when the data type of determining described target data is publicly-owned data, the data block information of described target data is recorded in the described publicly-owned data directory, and it is invalid that the directory entry of described target data in described private data catalogue is set to.
Again on the one hand, described determining unit 42 is used for when described detection module 421 determines that the physical address of described target data is recorded in described publicly-owned data directory, and the data type of determining described target data is publicly-owned data;
Described record cell 43 is made amendment for the bit vector sign to described target data in the publicly-owned data directory of described CACHE DIRECTORY, increases the information of first processor in described bit vector sign.
Optionally, as shown in Figure 6, described device also comprises replacement unit 45, be used for when described publicly-owned data directory and private data catalogue do not have idle directory entry, determine that in described publicly-owned data directory and private data catalogue the 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 module 451, described replacement unit 45 is used to respectively setting-up time threshold value of described publicly-owned data directory and private data catalogue, so that will also not have accessed directory entry to be defined as replaceable directory entry above the Preset Time threshold value.
Optionally, as shown in Figure 6, described replacement unit 45 also comprises statistical module 452, be used for when described Threshold module 451 determine surpass the Preset Time threshold value also not have accessed directory entry be zero the 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 invention provides, set up the CACHE DIRECTORY of setting up unit 41 and only record data block information data cached among the cache (need not to record the data block information of data in EMS memory), so the capacity of the CACHE DIRECTORY in the present embodiment is less, access speed can be highly improved; The implement device of the CACHE DIRECTORY in the present embodiment can be by identifying private data and in described private data catalogue described private data carried out record on the other hand, thereby effectively promote the service efficiency of CACHE DIRECTORY.
Through the above description of the embodiments, the those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential common hardware, can certainly pass through hardware, but the former is better embodiment in a lot of situation.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product is stored in the storage medium that can read, floppy disk such as computing machine, hard disk or CD etc., comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
The above; be the specific embodiment of the present invention only, but protection scope of the present invention is not limited to this, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, 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. the implementation method of a 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 used for recording the data block information of publicly-owned data, and described private data catalogue is used for the data block information of record private data;
When receiving the read-write requests of first processor transmission, 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, the data block information of the described target data of record in described CACHE DIRECTORY.
2. method according to claim 1 is characterized in that, described CACHE DIRECTORY is used for the data cached data block information of recording processor system;
Wherein, the data block information of described publicly-owned data comprises the corresponding relation of data cached physical address and bit vector sign, and described bit vector sign comprises N pointer, is used for characterizing processor corresponding to described publicly-owned data, and described N is the number of processor; The data message of described private data comprises data cached physical address and the processor flag of this data cached correspondence.
3. method according to claim 1 and 2 is characterized in that, and is described when receiving the read-write requests of first processor transmission, determines to comprise before the data type of the target data that this read-write requests is corresponding:
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, and is described when receiving the read-write requests of first processor transmission, determines the data type of the target data that this read-write requests is corresponding, comprising:
Determine the physical address of target data according to described read-write requests, detect the physical address that whether records described target data in the described CACHE DIRECTORY;
If do not record the physical address of described target data in the described CACHE DIRECTORY, determine that then the data type of described target data is private data;
Then described according to described data type, the data block information of the described target data of record in described CACHE DIRECTORY comprises:
The data block information of the described target data of record comprises the physical address of described target data and the processor flag of described target data block being carried out read-write operation, the i.e. sign of first processor in described private data catalogue.
5. method according to claim 4 is characterized in that, if record the physical address of described target data in the described CACHE DIRECTORY, the described data type of determining the target data that this read-write requests is corresponding comprises:
When the physical address of described target data is recorded in the private data catalogue in the described CACHE DIRECTORY, detect the processor flag that this physical address is corresponding in the described private data catalogue whether identical with the sign of first processor; If determine that then the data type of described target data is private data; If not, then the data type of definite described target data is publicly-owned data;
Then described according to described data type, the data block information of the described target data of record in described CACHE DIRECTORY comprises:
If determine that the data type of described target data is private data, then upgrade the data block information of described target data in described private data catalogue 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 with described target data is recorded in the described publicly-owned data directory, and it is invalid that the directory entry of described target data in described private data catalogue is set to.
6. method according to claim 5 is characterized in that, when the physical address of described target data was recorded in the publicly-owned data directory in the described CACHE DIRECTORY, the described data type of determining the target data that this read-write requests is corresponding comprised:
The data type of determining described target data is publicly-owned data;
Then described according to described data type, the data block information of the described target data of record in described CACHE DIRECTORY comprises:
Bit vector sign to described target data in the publicly-owned data directory in described CACHE DIRECTORY is made amendment, and increases the information of first processor in described bit vector sign.
7. each described method according to claim 1-6, it is characterized in that, when not having idle directory entry in described publicly-owned data directory and the private data catalogue, described when receiving the read-write requests of first processor transmission, determine also to comprise after the data type of the target data that this read-write requests is corresponding:
Definite assigned catalogue item is replaced this assigned catalogue item, to record the data block information of described target data as replaceable directory entry in described publicly-owned data directory and private data catalogue.
8. method according to claim 7 is characterized in that, describedly determines that in described publicly-owned data directory and private data catalogue the assigned catalogue item as replaceable directory entry, comprising:
For described publicly-owned data directory and private data catalogue difference setting-up time threshold value, will also there be accessed directory entry to be defined as replaceable directory entry above the Preset Time threshold value.
9. method according to claim 8, it is characterized in that, when described when surpassing the Preset Time threshold value and also not having accessed directory entry to be zero, describedly determine that in described publicly-owned data directory and private data catalogue the assigned catalogue item 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. the implement device of a CACHE DIRECTORY is characterized in that, comprising:
Set up the unit, be used for creating CACHE DIRECTORY, described CACHE DIRECTORY comprises publicly-owned data directory and private data catalogue, and described publicly-owned data directory is used for recording the data block information of publicly-owned data, and described private data catalogue is used for the data block information of record private data;
Determining unit is used for determining the data type of the target data that this read-write requests is corresponding that when receiving the read-write requests of first processor transmission described data type comprises private data or publicly-owned data;
Record cell is used for according to described determining unit established data type, in the described data block information of setting up the described target data of record in the CACHE DIRECTORY that the unit creates.
11. device according to claim 10 is characterized in that, the described CACHE DIRECTORY of setting up the unit establishment is used for the data cached data block information of recording processor system;
Wherein, the data block information of described publicly-owned data comprises the corresponding relation of data cached physical address and bit vector sign, and described bit vector sign comprises N pointer, is used for characterizing processor corresponding to described publicly-owned data, and described N is the number of processor; The data message of described private data comprises data cached physical address and the processor flag of this data cached correspondence.
12. according to claim 10 or 11 described devices, it is characterized in that, described device also comprises:
Receiving element is used for receiving the read-write requests that first processor sends, and described read-write requests comprises the physical address of target data.
13. device according to claim 12 is characterized in that, described determining unit comprises:
Detection module, the physical address for determine target data according to described read-write requests detects the physical address that whether records described target data in the described CACHE DIRECTORY;
Described determining unit is used for when described detection module detection CACHE DIRECTORY does not record the physical address of described target data, and the data type of determining described target data is private data;
Described record cell specifically is used for the data block information in the described target data of described private data catalogue record, comprise the physical address of described target data and the processor flag of described target data block being carried out read-write operation, the i.e. sign of first processor.
14. device according to claim 13, it is characterized in that, when described detection module is determined to record the physical address of described target data in the described CACHE DIRECTORY, described detection module also is used for further detecting the particular location in described CACHE DIRECTORY of described target data, and described particular location comprises private data catalogue and publicly-owned data directory;
Described detection module specifically is used for detecting the processor flag that this physical address is corresponding in the described private data catalogue whether identical with the sign of first processor when the physical address of determining described target data is recorded in the private data catalogue of described CACHE DIRECTORY; If 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 specifically is used for when the data type of determining described target data is private data, upgrade the data block information of described target data in described private data catalogue 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 specifically is used for when the data type of determining described target data is publicly-owned data, the data block information of described target data is recorded in the described publicly-owned data directory, and it is invalid that the directory entry of described target data in described private data catalogue is set to.
15. device according to claim 14, it is characterized in that, described determining unit specifically is used for when described detection module determines that the physical address of described target data is recorded in described publicly-owned data directory, and the data type of determining described target data is publicly-owned data;
Described record cell is made amendment for the bit vector sign to described target data in the publicly-owned data directory of described CACHE DIRECTORY, increases the information of first processor in described bit vector sign.
16. each described device is characterized in that according to claim 10-15, described device also comprises:
Replacement unit, be used for when described publicly-owned data directory and private data catalogue do not have idle directory entry, determine that in described publicly-owned data directory and private data catalogue the 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. device according to claim 16, it is characterized in that, described replacement unit comprises the Threshold module, described replacement unit is used to respectively setting-up time threshold value of described publicly-owned data directory and private data catalogue, so that will also not have accessed directory entry to be defined as replaceable directory entry above the Preset Time threshold value.
18. device according to claim 17, it is characterized in that, described replacement unit also comprises statistical module, be used for when described Threshold module determine surpass the Preset Time threshold value also not have accessed directory entry be zero the 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 true CN103049392A (en) 2013-04-17
CN103049392B 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)

Cited By (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
CN104461932A (en) * 2014-11-04 2015-03-25 浪潮电子信息产业股份有限公司 Directory cache management method for big data application
WO2016049807A1 (en) * 2014-09-29 2016-04-07 华为技术有限公司 Cache directory processing method and directory controller of multi-core processor system
WO2016049808A1 (en) * 2014-09-29 2016-04-07 华为技术有限公司 Cache directory processing method and directory controller of multi-core processor system
WO2016201998A1 (en) * 2015-06-18 2016-12-22 华为技术有限公司 Cache distribution, data access and data sending methods, processors, and system
CN107810490A (en) * 2015-06-18 2018-03-16 华为技术有限公司 System and method for the buffer consistency based on catalogue
CN108108402A (en) * 2017-12-07 2018-06-01 泰康保险集团股份有限公司 Data item paraphrase update 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

Cited By (16)

* 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
CN105659216B (en) * 2014-09-29 2019-03-19 华为技术有限公司 The CACHE DIRECTORY processing method and contents controller of multi-core processor system
WO2016049808A1 (en) * 2014-09-29 2016-04-07 华为技术有限公司 Cache directory processing method and directory controller of multi-core processor system
CN105659216A (en) * 2014-09-29 2016-06-08 华为技术有限公司 Cache directory processing method and directory controller of multi-core processor system
US10216634B2 (en) 2014-09-29 2019-02-26 Huawei Technologies Co., Ltd. Cache directory processing method for multi-core processor system, and directory controller
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
CN104461932A (en) * 2014-11-04 2015-03-25 浪潮电子信息产业股份有限公司 Directory cache management method for big data application
WO2016201998A1 (en) * 2015-06-18 2016-12-22 华为技术有限公司 Cache distribution, data access and data sending methods, processors, and system
CN106326143A (en) * 2015-06-18 2017-01-11 华为技术有限公司 Cache distribution, data access and data sending method, processor and system
CN107810490A (en) * 2015-06-18 2018-03-16 华为技术有限公司 System and method for the buffer consistency based on catalogue
CN106326143B (en) * 2015-06-18 2019-08-27 华为技术有限公司 A kind of caching distribution, data access, data transmission method for uplink, processor and system
CN108108402A (en) * 2017-12-07 2018-06-01 泰康保险集团股份有限公司 Data item paraphrase update method and device
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

Also Published As

Publication number Publication date
CN103049392B (en) 2016-04-06

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
CN102111448B (en) Data prefetching method of DHT memory system and node and system
TWI549060B (en) Access methods and devices for virtual machine data
CN105677580A (en) Method and device for accessing cache
CN104346294A (en) Data reading/writing method and device and computer system on basis of multi-level Cache
CN112632069B (en) Hash table data storage management method, device, medium and electronic equipment
CN104133780A (en) Cross-page prefetching method, device and system
KR20190052546A (en) Key-value storage device and method of operating the key-value storage device
CN111124270B (en) Method, apparatus and computer program product for cache management
US9817754B2 (en) Flash memory management
US20190057032A1 (en) Cache Coherence Management Method and Node Controller
CN102971698A (en) Snapshot data-processing method and system, storage system and snapshot agency
CN112346647A (en) Data storage method, device, equipment and medium
CN103488523A (en) Page access method, page access device and server
US9304946B2 (en) Hardware-base accelerator for managing copy-on-write of multi-level caches utilizing block copy-on-write differential update table
CN111309805A (en) Data reading and writing method and device for database
Chang et al. FastRead: Improving read performance for multilevel-cell flash memory
CN111159296A (en) Storage capacity expansion method, device, equipment and readable storage medium
EP3249539B1 (en) Method and device for accessing data visitor directory in multi-core system
CN107003932B (en) Cache directory processing method and directory controller of multi-core processor system
CA2415018C (en) Adaptive parallel data clustering when loading a data structure containing data clustered along one or more dimensions
CN115981555A (en) Data processing method and device, electronic equipment and medium

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