CN103729309A - Method for cataloging Cache consistency - Google Patents

Method for cataloging Cache consistency Download PDF

Info

Publication number
CN103729309A
CN103729309A CN201410017448.4A CN201410017448A CN103729309A CN 103729309 A CN103729309 A CN 103729309A CN 201410017448 A CN201410017448 A CN 201410017448A CN 103729309 A CN103729309 A CN 103729309A
Authority
CN
China
Prior art keywords
cache
carry out
catalogue
storer
directory entry
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
CN201410017448.4A
Other languages
Chinese (zh)
Other versions
CN103729309B (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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201410017448.4A priority Critical patent/CN103729309B/en
Publication of CN103729309A publication Critical patent/CN103729309A/en
Application granted granted Critical
Publication of CN103729309B publication Critical patent/CN103729309B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a method for cataloging Cache consistency. The process of achieving the method comprises the steps that a two-stage catalog storage structure of two protocols is arranged with the combination of a limited catalog and a full mapping catalog on the basis that a storage Cache is used; a replacement algorithm between a storage layer and a storage Cache layer is guaranteed through a fake-least-recently-used algorithm sharing numerical weighing. Compared with the prior art, the method for cataloging Cache consistency solves the problems that that the full mapping catalog takes too many storage expenses, the limited catalog can be limited by overflowing of a catalog entry, and the effectiveness of time for a chained catalog is low, the practicability is high, and popularization is easy.

Description

A kind of catalogue Cache coherence method
Technical field
The present invention relates to field of computer technology, more specifically say catalogue Cache coherence method.
Background technology
In multistage network, cache directory has been deposited relevant cache line copy and has been resided in information where, to support cache coherence.The main difference of various directory schemes is how maintenance informations and deposit what information of catalogue.First directory schema is to record with a centrales copy of putting all cache directories, and center catalogue can be provided as and guarantee the needed full detail of consistance.Therefore, its capacity is very large and must adopt association method to retrieve, and the catalogue of this and single high-speed cache is similar.Large-scale multiple processor system adopt center catalogue have conflict and retrieval time long two shortcomings.Distributed directory scheme is put forward by Censier and Feautrier.In distributed directory, each memory module is safeguarded catalogue separately, is recording the state of each memory block and current information in catalogue, and wherein status information is local, and current information indicates the copy that has this memory block in which high-speed cache.Dissimilar directory scheme can be divided into full mapping catalogue, limited catalogue and chain type catalogue three classes.Wherein entirely shine upon catalogue and take excessive storage overhead, the restriction that limited catalogue can be overflowed by directory entry, the problem such as the available time of chain type catalogue is lower.Based on this, the invention provides a kind of improved catalogue Cache coherence method, limited catalogue is combined and solves the problems referred to above with full mapping catalogue.
Summary of the invention
Technical assignment of the present invention is to solve the deficiencies in the prior art, provide a kind of simple to operate, be easy to realize, improved catalogue Cache coherence method.
Technical scheme of the present invention realizes in the following manner, this one catalogue Cache coherence method, and its specific implementation process is:
One, two-stage directory stores structure is set, i.e. full mapping catalogue and limited catalogue, wherein entirely shining upon catalogue deposits and each relevant data in global storage, make the each high-speed cache in system can store the copy of any data block simultaneously, each directory entry comprises N pointer, and N is the number of processor in system; Limited catalogue is the pointer that its each directory entry all contains fixed number with full mapping catalogue difference;
The pseudo-least recently used algorithm of shared several weightings of two, using between memory layer and storer Cache layer: each directory entry of supposition memory layer is used Q pointer, and the cache line that is only less than Q while replacing to sharing number is used this algorithm to replace; When the shared number of all cache lines in storer Cache is all greater than Q, by sharing the minimum cache line of number, replaces out storer Cache and carry out corresponding calcellation processing.
In described two-stage directory stores structure, in the directory entry of realizing with full mapping method, there are a processor position and a dirty position: the cacheline of the former respective processor exists or non-existent state; The latter is " 1 " if, and has one also to only have a processor position for " 1 ", and this processor just can carry out write operation to this piece, and each of high-speed cache all has two mode bits: whether a bit representation piece is effective; Another one represents whether active block allows to write.
The detailed content of the pseudo-least recently used algorithm of described shared several weightings is:
1) if cache line, at storer Cache, carries out 2, otherwise carry out 5;
2) reading out data from storer Cache;
3) if new shared node carries out 4, otherwise carry out 14;
4) revise Cache directory entry, carry out 14;
5) reading out data from storer;
6) if new shared node carries out 7, otherwise carry out 9;
7) if storer directory entry overflows, carry out 8, otherwise carry out 9;
8) record overflow entry;
9) if available free directory entry in Cache carries out 10, otherwise carry out 11;
10) data added to Cache and revise Cache directory entry according to storer directory entry, skipping to 14;
11) if having in Cache, share the directory entry that number is less than Q, carry out 12, otherwise carry out 13;
12) in shared several cache lines that are less than Q, use lru algorithm to select a blocks of data to replace out Cache, carry out 10;
13) select a shared minimum cache line to share the respective handling of cancelling, carry out 10;
14) complete.
The beneficial effect that the present invention compared with prior art produced is:
A kind of catalogue Cache coherence method of the present invention combines limited catalogue and full mapping catalogue, and then the Cache coherence method of use two-stage catalogue, solve full mapping catalogue and taken excessive storage overhead, the restriction that limited catalogue can be overflowed by directory entry, the problem such as the available time of chain type catalogue is lower.At memory layer, use limited catalogue, because the single directory entry of limited catalogue takes up room littlely, therefore can make to need the memory layer of a large amount of directory entries to save many storage spaces.Meanwhile, at storer Cache layer, use full mapping catalogue, Cache finite capacity, so even if single directory entry takes up room greatly, the space altogether taking is not understood many yet.Not only solved the directory entry overflow problem of limited catalogue, and the highest data of frequency of utilization and directory entry thereof are always in being used the storer Cache layer of full mapping catalogue, thereby the access speed of this two-stage type storage organization can be that storer Cache speed is suitable with its first order storer, practical, be easy to promote.
Accompanying drawing explanation
Accompanying drawing 1 is two-stage directory stores structural representation.
Accompanying drawing 2 is for sharing the pseudo-least recently used algorithm process flow diagram of number weighting in the present invention.
Embodiment
Below in conjunction with accompanying drawing, a kind of catalogue Cache coherence method of the present invention is described in detail below.
As shown in Figure 1, the present invention proposes a kind of catalogue Cache coherence method, its specific implementation process is:
Two-stage directory stores structure is set, limited catalogue and full mapping catalogue are combined, and then the Cache coherence method of use two-stage catalogue, solve full mapping catalogue and taken excessive storage overhead, full mapping catalogue is deposited and each relevant data in global storage, make the each high-speed cache in system can store the copy of any data block, each directory entry comprises N pointer simultaneously, and N is the number of processor in system.Quan limited catalogue is much no matter system scale has with mapping catalogue difference, its each directory entry all contains the pointer of fixed number.
Between memory layer and storer Cache layer, use replace Algorithm, share the least-recently-used lru algorithm of puppet of number weighting, so share count exceedes the cache line of the limited directory pointer number of memory layer, can guarantee in storer Cache, realize and utilize relatively less storage space to ensure cached data consistance.
In above-mentioned two-stage directory stores structure, in the directory entry of realizing with full mapping method, there are a processor position and a dirty position: the cacheline of the former respective processor exists or non-existent state; The latter is " 1 " if, and has one also to only have a processor position for " 1 ", and this processor just can carry out write operation to this piece.Every of high-speed cache has two mode bits: whether a bit representation piece is effective; Another one represents whether active block allows to write.High speed caching coherence method must guarantee the mode bit of storer catalogue and the mode bit of high-speed cache consistent.Limited directory scheme can be alleviated the excessive problem of catalogue, if the copy number of arbitrary data block while in high-speed cache has certain limitation, the size of catalogue can not exceed certain constant so.
The least recently used lru algorithm of puppet of described shared several weightings, the cache line that share count exceedes the limited directory pointer number of memory layer can guarantee in storage Cache.Each directory entry of supposing memory layer is used Q pointer, and the cache line that is only less than Q while replacing to sharing number is used LRU replace Algorithm to replace.Only have when the shared number of all cache lines in storer Cache is all greater than Q, just by one, share the minimum cache line of number and replace out storer Cache and carry out corresponding calcellation processing.And the situation that this directory entry overflows can be avoided by the size that storer Cache is suitably set.
As shown in Figure 2, the detailed content of the pseudo-least recently used algorithm of described shared several weightings is:
1) if cache line, at storer Cache, carries out 2, otherwise carry out 5.
2) reading out data from storer Cache.
3) if new shared node carries out 4, otherwise carry out 14.
4) revise Cache directory entry, carry out 14.
5) reading out data from storer.
6) if new shared node carries out 7, otherwise carry out 9.
7) if storer directory entry overflows, carry out 8, otherwise carry out 9.
8) record overflow entry.
9) if available free directory entry in Cache carries out 10, otherwise carry out 11.
10) data added to Cache and revise Cache directory entry according to storer directory entry, skipping to 14.
11) if having in Cache, share the directory entry that number is less than Q, carry out 12, otherwise carry out 13.
12) in shared several cache lines that are less than Q, use lru algorithm to select a blocks of data to replace out Cache, carry out 10.
13) select a shared minimum cache line to share the respective handling of cancelling, carry out 10.
14) complete.
So far, completely realized a kind of improved catalogue Cache coherence method.Aspect system performance, according to the time limitation of the thickness granularity of task and application and read-write operation proportion, the size of storer Cache and cache line is rationally set and guarantees that with applicable replace Algorithm storer Cache obtains higher hit rate.When a certain directory entry of memory layer overflows, directory entry information will copy in storer Cache layer.And according to the replace Algorithm of sharing number weightings, this directory information will remain in storer Cache always, until its shared nodes is less than the limited directory entry pointer of memory layer while counting Q, just can be replaced out storer Cache.Therefore, not only solved the directory entry overflow problem of limited catalogue, and the highest data of frequency of utilization and directory entry thereof be always in being used the storer Cache layer of full mapping catalogue, thereby the access speed of this two-stage type storage organization can be that storer Cache speed is suitable with its first order storer.
Certainly; the present invention also can have other various embodiments; in the situation that not deviating from spirit of the present invention and essence thereof; those of ordinary skill in the art are when making according to the present invention various corresponding changes and distortion, but these corresponding changes and distortion all should belong to the protection domain of claim of the present invention.

Claims (3)

1. a catalogue Cache coherence method, is characterized in that its specific implementation process is:
One, two-stage directory stores structure is set, i.e. full mapping catalogue and limited catalogue, wherein entirely shining upon catalogue deposits and each relevant data in global storage, make the each high-speed cache in system can store the copy of any data block simultaneously, each directory entry comprises N pointer, and N is the number of processor in system; Limited catalogue is the pointer that its each directory entry all contains fixed number with full mapping catalogue difference;
The pseudo-least recently used algorithm of shared several weightings of two, using between memory layer and storer Cache layer: each directory entry of supposition memory layer is used Q pointer, and the cache line that is only less than Q while replacing to sharing number is used this algorithm to replace; When the shared number of all cache lines in storer Cache is all greater than Q, by sharing the minimum cache line of number, replaces out storer Cache and carry out corresponding calcellation processing.
2. a kind of catalogue Cache coherence method according to claim 1, it is characterized in that: in described two-stage directory stores structure, in the directory entry of realizing with full mapping method, have a processor position and a dirty position: the cacheline of the former respective processor exists or non-existent state; The latter is " 1 " if, and has one also to only have a processor position for " 1 ", and this processor just can carry out write operation to this piece, and each of high-speed cache all has two mode bits: whether a bit representation piece is effective; Another one represents whether active block allows to write.
3. a kind of catalogue Cache coherence method according to claim 2, is characterized in that: the detailed content of the pseudo-least recently used algorithm of described shared several weightings is:
1) if cache line, at storer Cache, carries out 2, otherwise carry out 5;
2) reading out data from storer Cache;
3) if new shared node carries out 4, otherwise carry out 14;
4) revise Cache directory entry, carry out 14;
5) reading out data from storer;
6) if new shared node carries out 7, otherwise carry out 9;
7) if storer directory entry overflows, carry out 8, otherwise carry out 9;
8) record overflow entry;
9) if available free directory entry in Cache carries out 10, otherwise carry out 11;
10) data added to Cache and revise Cache directory entry according to storer directory entry, skipping to 14;
11) if having in Cache, share the directory entry that number is less than Q, carry out 12, otherwise carry out 13;
12) in shared several cache lines that are less than Q, use lru algorithm to select a blocks of data to replace out Cache, carry out 10;
13) select a shared minimum cache line to share the respective handling of cancelling, carry out 10;
14) complete.
CN201410017448.4A 2014-01-15 2014-01-15 A kind of catalogue Cache coherence methods Active CN103729309B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410017448.4A CN103729309B (en) 2014-01-15 2014-01-15 A kind of catalogue Cache coherence methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410017448.4A CN103729309B (en) 2014-01-15 2014-01-15 A kind of catalogue Cache coherence methods

Publications (2)

Publication Number Publication Date
CN103729309A true CN103729309A (en) 2014-04-16
CN103729309B CN103729309B (en) 2017-06-30

Family

ID=50453390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410017448.4A Active CN103729309B (en) 2014-01-15 2014-01-15 A kind of catalogue Cache coherence methods

Country Status (1)

Country Link
CN (1) CN103729309B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104133785A (en) * 2014-07-30 2014-11-05 浪潮集团有限公司 Method for achieving cache coherency of double-control storage server with mixed catalogs
CN104360982A (en) * 2014-11-21 2015-02-18 浪潮(北京)电子信息产业有限公司 Implementation method and system for host system directory structure based on reconfigurable chip technology
WO2016049807A1 (en) * 2014-09-29 2016-04-07 华为技术有限公司 Cache directory processing method and directory controller of multi-core processor system
CN106095725A (en) * 2016-05-31 2016-11-09 浪潮(北京)电子信息产业有限公司 A kind of concordance catalogue construction method, system and multiprocessor computer system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6016529A (en) * 1997-11-26 2000-01-18 Digital Equipment Corporation Memory allocation technique for maintaining an even distribution of cache page addresses within a data structure
CN102063407A (en) * 2010-12-24 2011-05-18 清华大学 Network sacrifice Cache for multi-core processor and data request method based on Cache
CN102708190A (en) * 2012-05-15 2012-10-03 浪潮电子信息产业股份有限公司 Directory cache method for node control chip in cache coherent non-uniform memory access (CC-NUMA) system
CN103049422A (en) * 2012-12-17 2013-04-17 浪潮电子信息产业股份有限公司 Method for building multi-processor node system with multiple cache consistency domains
US20130097385A1 (en) * 2011-10-18 2013-04-18 Advanced Micro Devices, Inc. Dual-granularity state tracking for directory-based cache coherence

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6016529A (en) * 1997-11-26 2000-01-18 Digital Equipment Corporation Memory allocation technique for maintaining an even distribution of cache page addresses within a data structure
CN102063407A (en) * 2010-12-24 2011-05-18 清华大学 Network sacrifice Cache for multi-core processor and data request method based on Cache
US20130097385A1 (en) * 2011-10-18 2013-04-18 Advanced Micro Devices, Inc. Dual-granularity state tracking for directory-based cache coherence
CN102708190A (en) * 2012-05-15 2012-10-03 浪潮电子信息产业股份有限公司 Directory cache method for node control chip in cache coherent non-uniform memory access (CC-NUMA) system
CN103049422A (en) * 2012-12-17 2013-04-17 浪潮电子信息产业股份有限公司 Method for building multi-processor node system with multiple cache consistency domains

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104133785A (en) * 2014-07-30 2014-11-05 浪潮集团有限公司 Method for achieving cache coherency of double-control storage server with mixed catalogs
CN104133785B (en) * 2014-07-30 2017-03-08 浪潮集团有限公司 Buffer consistency implementation method using the dual control storage server of mixing catalogue
WO2016049807A1 (en) * 2014-09-29 2016-04-07 华为技术有限公司 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
CN104360982A (en) * 2014-11-21 2015-02-18 浪潮(北京)电子信息产业有限公司 Implementation method and system for host system directory structure based on reconfigurable chip technology
WO2016078205A1 (en) * 2014-11-21 2016-05-26 浪潮(北京)电子信息产业有限公司 Directory structure implementation method and system for host system
CN104360982B (en) * 2014-11-21 2017-11-10 浪潮(北京)电子信息产业有限公司 A kind of host computer system bibliographic structure method and system based on restructural chip technology
US9892042B2 (en) 2014-11-21 2018-02-13 Inspur (Beijing) Electronic Information Industry Co., Ltd. Method and system for implementing directory structure of host system
CN106095725A (en) * 2016-05-31 2016-11-09 浪潮(北京)电子信息产业有限公司 A kind of concordance catalogue construction method, system and multiprocessor computer system

Also Published As

Publication number Publication date
CN103729309B (en) 2017-06-30

Similar Documents

Publication Publication Date Title
TWI627536B (en) System and method for a shared cache with adaptive partitioning
CN103246616B (en) A kind of globally shared buffer replacing method of access frequency within long and short cycle
CN104115134B (en) For managing the method and system to be conducted interviews to complex data storage device
CN107391391B (en) Method, system and the solid state hard disk of data copy are realized in the FTL of solid state hard disk
US8443149B2 (en) Evicting data from a cache via a batch file
KR100978156B1 (en) Method, apparatus, system and computer readable recording medium for line swapping scheme to reduce back invalidations in a snoop filter
CN104317736B (en) A kind of distributed file system multi-level buffer implementation method
CN105550155B (en) Snoop filter for multicomputer system and related snoop filtering method
CN103150136B (en) Implementation method of least recently used (LRU) policy in solid state drive (SSD)-based high-capacity cache
US10078649B2 (en) Pre-caching of relational database management system based on data retrieval patterns
US20110320720A1 (en) Cache Line Replacement In A Symmetric Multiprocessing Computer
KR20080021623A (en) Managing memory pages
JP2018520420A (en) Cache architecture and algorithm for hybrid object storage devices
CN105095113B (en) A kind of buffer memory management method and system
CN107341114B (en) Directory management method, node controller and system
CN103729309A (en) Method for cataloging Cache consistency
CN104461932B (en) Directory cache management method for big data application
US7401185B2 (en) Buffered indexing to manage hierarchical tables
CN104778132A (en) Multi-core processor directory cache replacement method
US20170364442A1 (en) Method for accessing data visitor directory in multi-core system and device
CN107003932B (en) Cache directory processing method and directory controller of multi-core processor system
CN104182281A (en) Method for implementing register caches of GPGPU (general purpose graphics processing units)
US10331560B2 (en) Cache coherence in multi-compute-engine systems
US11182307B2 (en) Demoting data elements from cache using ghost cache statistics
CN111209227B (en) Data processing system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant