CN115827547A - A multi-core processor dynamic cache partition isolation system and control method thereof - Google Patents
A multi-core processor dynamic cache partition isolation system and control method thereof Download PDFInfo
- Publication number
- CN115827547A CN115827547A CN202211438477.9A CN202211438477A CN115827547A CN 115827547 A CN115827547 A CN 115827547A CN 202211438477 A CN202211438477 A CN 202211438477A CN 115827547 A CN115827547 A CN 115827547A
- Authority
- CN
- China
- Prior art keywords
- cache
- core
- path
- queue
- core processor
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/16—Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
- G06F15/163—Interprocessor communication
- G06F15/167—Interprocessor communication using a common memory, e.g. mailbox
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/16—Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
- G06F15/177—Initialisation or configuration control
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
本发明公开了一种多核处理器动态缓存分区隔离系统及其控制方法,系统包括多核处理器、共享定时器中断模块以及共享二级缓存,共享二级缓存包括缓存通路管理单元、缓存控制单元、缓存通路切换单元以及缓存通路池,通过缓存通路管理单元、缓存控制单元以及缓存通路切换单元对缓存通道进行动态分区管理,为多核处理器提供动态可配置的共享二级缓存,使得共享二级缓存可以高效地供各个核心使用,避免了核间缓存干扰,一定程度上保证了处理器任务的正确运行,提高了系统性能。本发明可广泛应用于多核处理器技术领域。
The invention discloses a multi-core processor dynamic cache partition isolation system and a control method thereof. The system includes a multi-core processor, a shared timer interrupt module, and a shared secondary cache. The shared secondary cache includes a cache path management unit, a cache control unit, The cache path switching unit and the cache path pool, through the cache path management unit, the cache control unit and the cache path switching unit, perform dynamic partition management on the cache path, and provide a dynamically configurable shared secondary cache for multi-core processors, so that the shared secondary cache It can be efficiently used by each core, avoiding inter-core cache interference, ensuring the correct operation of processor tasks to a certain extent, and improving system performance. The invention can be widely applied in the technical field of multi-core processors.
Description
技术领域technical field
本发明涉及多核处理器技术领域,尤其涉及一种多核处理器动态缓存分区隔离系统及其控制方法。The invention relates to the technical field of multi-core processors, in particular to a multi-core processor dynamic cache partition isolation system and a control method thereof.
背景技术Background technique
随着摩尔定律的终结,计算机处理器单核瓶颈的性能提升受到了限制,当前的处理器设计正在越来越多地转向多核平台。为了减轻片外内存的高延迟,多核处理器片上系统(MPSoC)架构通常配备了分层的高速缓存子系统。这种复杂缓存层次结构会导致共享缓存的行为难以被预测和分析。例如,在一个核心上运行的任务可能会驱逐有用的L2缓存空间,而该空间可能正在被另一个核心中的另一个任务使用。这些核间缓存干扰将导致错过率的增加,从而导致相应的性能下降。同时,核间缓存干扰很难准确地分析,因此导致难以估计应用程序的最坏情况执行时间。当前,在实时系统的多核缓存管理上的大多使用页面着色技术,即操作系统级的软件缓存分区方法,根据设置对缓存进行分区。然而,页面着色技术的问题在于着色时间开销很大,这种时间开销一方面禁止了页面颜色的频繁更改,另一方面则使执行时间小于页面更改开销的任务的颜色更改不划算,进而影响了多核处理器系统性能。With the end of Moore's Law, the performance improvement of the single-core bottleneck of computer processors is limited, and current processor designs are increasingly shifting to multi-core platforms. To mitigate the high latency of off-chip memory, multicore processor system-on-chip (MPSoC) architectures are often equipped with a hierarchical cache subsystem. This complex cache hierarchy makes the behavior of shared caches difficult to predict and analyze. For example, a task running on one core may evict useful L2 cache space that may be in use by another task in another core. These inter-core cache interferences will lead to an increase in the miss rate, resulting in a corresponding performance degradation. At the same time, inter-core cache interference is difficult to analyze accurately, thus making it difficult to estimate the worst-case execution time of an application. At present, most of the multi-core cache management in real-time systems use page coloring technology, that is, the software cache partition method at the operating system level, and the cache is partitioned according to the settings. However, the problem with the page coloring technique is that the coloring time is very expensive. On the one hand, this time overhead prohibits frequent page color changes; Multi-core processor system performance.
发明内容Contents of the invention
为了解决上述技术问题,本发明的目的在于:本发明提出一种多核处理器动态缓存分区隔离系统及其控制方法,避免了核间缓存干扰,提高了系统性能。In order to solve the above technical problems, the object of the present invention is: the present invention proposes a multi-core processor dynamic cache partition isolation system and its control method, which avoids inter-core cache interference and improves system performance.
本发明所采用的第一技术方案是:The first technical scheme adopted in the present invention is:
一种多核处理器动态缓存分区隔离系统,包括:A multi-core processor dynamic cache partition isolation system, comprising:
多核处理器,所述多核处理器包括多个核心,各所述核心相互独立且均享有相应的一级缓存;A multi-core processor, the multi-core processor includes a plurality of cores, each of which is independent of each other and has a corresponding level-1 cache;
共享定时器中断模块,所述共享定时器中断模块用于同步和触发各所述核心上的任务;A shared timer interrupt module, the shared timer interrupt module is used to synchronize and trigger tasks on each of the cores;
共享二级缓存,所述共享二级缓存包括缓存通路管理单元、缓存控制单元、缓存通路切换单元以及缓存通路池,所述缓存通路池包括多个缓存通路,所述缓存通路管理单元用于根据各所述核心发送的缓存指令重新配置其占用的缓存通路,并下发相应的缓存控制信号,所述缓存通路切换单元用于根据所述缓存控制信号对各所述核心和相应的缓存通路进行动态连接,所述缓存控制单元用于根据所述缓存控制信号控制各所述核心对相应的缓存通路的访问。A shared secondary cache, the shared secondary cache includes a cache path management unit, a cache control unit, a cache path switching unit, and a cache path pool, the cache path pool includes multiple cache paths, and the cache path management unit is used to The cache instructions sent by each of the cores reconfigure the cache paths they occupy, and issue corresponding cache control signals, and the cache path switching unit is used to control each of the cores and the corresponding cache paths according to the cache control signals Dynamic connection, the cache control unit is used to control the access of each core to the corresponding cache path according to the cache control signal.
进一步,所述共享定时器中断模块包括全局计时器以及与各所述核心一一对应的递减器,所述全局计时器用于以预设的时间间隔产生触发信号,所述触发信号使得各所述递减器依次递减一次。Further, the shared timer interrupt module includes a global timer and a decrementer corresponding to each of the cores, the global timer is used to generate a trigger signal at a preset time interval, and the trigger signal makes each of the cores The decrementer decrements one by one.
进一步,各所述核心均与所述缓存通路管理单元连接,各所述核心均设有相应的编码,所述缓存指令包括所述编码和指令类型,所述缓存通路管理单元根据所述编码识别对应的核心,并根据所述指令类型确定对应的缓存通路配置操作。Further, each of the cores is connected to the cache path management unit, and each of the cores is provided with a corresponding code, the cache instruction includes the code and the instruction type, and the cache path management unit identifies according to the code the corresponding core, and determine the corresponding cache path configuration operation according to the instruction type.
进一步,所述缓存控制单元包括多个缓存控制器,所述缓存控制器与所述核心一一对应。Further, the cache control unit includes a plurality of cache controllers corresponding to the cores one by one.
进一步,所述缓存通路由内存块组成,设有多个缓存分区,各所述缓存分区可分别被不同的核心占用。Further, the cache path is composed of memory blocks, and a plurality of cache partitions are provided, and each of the cache partitions can be occupied by different cores.
进一步,所述多核处理器动态缓存分区隔离系统还包括缓存通路替换模块,所述缓存通路替换模块用于当所述核心需要将数据存储在所述共享二级缓存且各所述缓存通路均被占用时,选择一个被占用的缓存通路进行缓存替换。Further, the multi-core processor dynamic cache partition isolation system also includes a cache path replacement module, the cache path replacement module is used when the core needs to store data in the shared L2 cache and each of the cache paths is When occupied, select an occupied cache path for cache replacement.
进一步,所述缓存通路替换模块包括存储器和选择器,所述存储器用于存储参考通路队列,所述参考通路队列为基于先进先出的替换策略形成的待替换的缓存通路的队列,所述选择器用于根据所述参考通路队列和使能信号队列选择相应的缓存通路进行缓存替换,所述使能信号队列由所述缓存通路管理单元生成,所述使能信号队列包括多个与待替换的缓存通路一一对应的使能信号。Further, the cache path replacement module includes a memory and a selector, the memory is used to store a reference path queue, the reference path queue is a queue of cache paths to be replaced based on a first-in-first-out replacement strategy, and the selection The device is used to select a corresponding cache path for cache replacement according to the reference path queue and the enable signal queue, the enable signal queue is generated by the cache path management unit, and the enable signal queue includes multiple One-to-one corresponding enable signal of cache path.
本发明所采用的第二技术方案是:The second technical solution adopted in the present invention is:
一种多核处理器动态缓存分区隔离系统的控制方法,用于通过上述多核处理器动态缓存分区隔离系统实现,包括以下步骤:A control method for a multi-core processor dynamic cache partition isolation system, which is implemented by the above-mentioned multi-core processor dynamic cache partition isolation system, includes the following steps:
通过缓存通路管理单元接收各核心发送的缓存指令,并根据所述缓存指令对所述核心占用的缓存通路进行重新配置,进而根据重新配置的结果生成相应的缓存控制信号;receiving the cache instruction sent by each core through the cache path management unit, and reconfiguring the cache path occupied by the core according to the cache instruction, and then generating a corresponding cache control signal according to the reconfiguration result;
通过缓存通路切换单元接收所述缓存控制信号,并根据所述缓存控制信号对各所述核心和相应的缓存通路进行动态连接,进而返回连接状态至缓存控制单元;receiving the cache control signal through the cache path switching unit, and dynamically connecting each of the cores with the corresponding cache path according to the cache control signal, and then returning the connection state to the cache control unit;
通过所述缓存控制单元接收所述缓存控制信号和所述连接状态,并根据所述缓存控制信号和所述连接状态开启或中断各所述核心对相应的缓存通路的访问。The cache control unit receives the cache control signal and the connection status, and enables or disables each core's access to the corresponding cache path according to the cache control signal and the connection status.
进一步,所述多核处理器动态缓存分区隔离系统还包括缓存通路替换模块,所述缓存通路替换模块包括存储器和选择器,所述控制方法还包括以下步骤:Further, the multi-core processor dynamic cache partition isolation system also includes a cache path replacement module, the cache path replacement module includes a memory and a selector, and the control method further includes the following steps:
当所述缓存通路均被占用,通过所述缓存通路管理单元选取占用时间靠前的多个缓存通路作为待替换的缓存通路,并根据待替换的缓存通路生成参考通路队列,进而将所述参考通路队列存储在所述存储器中;When the cache paths are all occupied, the cache path management unit selects a plurality of cache paths with a higher occupation time as the cache paths to be replaced, and generates a reference path queue according to the cache paths to be replaced, and then the reference a pass queue is stored in said memory;
当所述缓存通路管理单元接收到所述核心的缓存指令,根据所述缓存指令生成相应的使能信号队列,并将所述使能信号队列下发至所述选择器,所述使能信号队列包括多个与待替换的缓存通路一一对应的使能信号;When the cache path management unit receives the cache instruction of the core, it generates a corresponding enable signal queue according to the cache instruction, and sends the enable signal queue to the selector, and the enable signal The queue includes a plurality of enabling signals corresponding to the cache paths to be replaced;
通过所述选择器根据所述使能信号队列和所述参考通路队列选择相应的缓存通路进行缓存替换The selector selects the corresponding cache path according to the enable signal queue and the reference path queue for cache replacement
本发明的有益效果是:本发明提供了一种多核处理器动态缓存分区隔离系统及其控制方法,通过缓存通路管理单元、缓存控制单元以及缓存通路切换单元对缓存通道进行动态分区管理,为多核处理器提供动态可配置的共享二级缓存,使得共享二级缓存可以高效地供各个核心使用,避免了核间缓存干扰,一定程度上保证了处理器任务的正确运行,提高了系统性能。The beneficial effects of the present invention are: the present invention provides a multi-core processor dynamic cache partition isolation system and its control method, through the cache path management unit, the cache control unit and the cache path switch unit to dynamically partition the cache path management, for multi-core The processor provides a dynamically configurable shared L2 cache, so that the shared L2 cache can be efficiently used by each core, avoiding inter-core cache interference, ensuring the correct operation of processor tasks to a certain extent, and improving system performance.
附图说明Description of drawings
图1为本发明实施例提供的一种多核处理器动态缓存分区隔离系统的结构示意图;FIG. 1 is a schematic structural diagram of a multi-core processor dynamic cache partition isolation system provided by an embodiment of the present invention;
图2为本发明实施例提供的共享二级缓存的结构示意图;FIG. 2 is a schematic structural diagram of a shared L2 cache provided by an embodiment of the present invention;
图3为本发明实施例提供的缓存通道的分区示意图;FIG. 3 is a schematic partition diagram of a cache channel provided by an embodiment of the present invention;
图4为本发明实施例提供的一种多核处理器动态缓存分区隔离系统的控制方法的步骤流程图。FIG. 4 is a flowchart of steps of a control method of a multi-core processor dynamic cache partition isolation system provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面结合附图和具体实施例对本发明做进一步的详细说明。对于以下实施例中的步骤编号,其仅为了便于阐述说明而设置,对步骤之间的顺序不做任何限定,实施例中的各步骤的执行顺序均可根据本领域技术人员的理解来进行适应性调整。The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. For the step numbers in the following embodiments, it is only set for the convenience of illustration and description, and the order between the steps is not limited in any way. The execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art sexual adjustment.
在本发明的描述中,多个的含义是两个以上,如果有描述到第一、第二只是用于区分技术特征为目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量或者隐含指明所指示的技术特征的先后关系。此外,除非另有定义,本文所使用的所有的技术和科学术语与本技术领域的技术人员通常理解的含义相同。本文说明书中所使用的术语只是为了描述具体的实施例,而不是为了限制本发明。In the description of the present invention, multiple means more than two. If the first and second are described only for the purpose of distinguishing technical features, it cannot be understood as indicating or implying relative importance or implicitly indicating what is indicated The number of technical features or implicitly indicates the order of the indicated technical features. Also, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. The terms used in the specification herein are for describing specific embodiments only, and are not intended to limit the present invention.
参照图1和2,本发明实施例提供了一种多核处理器动态缓存分区隔离系统,包括:Referring to Figures 1 and 2, an embodiment of the present invention provides a multi-core processor dynamic cache partition isolation system, including:
多核处理器,多核处理器包括多个核心,各核心相互独立且均享有相应的一级缓存;Multi-core processors, multi-core processors include multiple cores, each core is independent of each other and has a corresponding level-1 cache;
共享定时器中断模块,共享定时器中断模块用于同步和触发各核心上的任务;Shared timer interrupt module, which is used to synchronize and trigger tasks on each core;
共享二级缓存,共享二级缓存包括缓存通路管理单元、缓存控制单元、缓存通路切换单元以及缓存通路池,缓存通路池包括多个缓存通路,缓存通路管理单元用于根据各核心发送的缓存指令重新配置其占用的缓存通路,并下发相应的缓存控制信号,缓存通路切换单元用于根据缓存控制信号对各核心和相应的缓存通路进行动态连接,缓存控制单元用于根据缓存控制信号控制各核心对相应的缓存通路的访问。The shared L2 cache includes a cache path management unit, a cache control unit, a cache path switching unit, and a cache path pool. The cache path pool includes multiple cache paths, and the cache path management unit is used to send cache instructions according to each core. Reconfigure the cache path occupied by it, and issue the corresponding cache control signal, the cache path switching unit is used to dynamically connect each core and the corresponding cache path according to the cache control signal, and the cache control unit is used to control each core according to the cache control signal Core access to the corresponding cache way.
具体地,本发明实施例中,多核处理器的不同核心独享一级缓存,并且相互独立;共享定时器中断模块用于同步和触发不同处理器上的任务;共享二级缓存被多个核心共享,并按照可配置动态缓存分区的方式被多个核心分配和使用。Specifically, in the embodiment of the present invention, the different cores of the multi-core processor exclusively share the first-level cache and are independent of each other; the shared timer interrupt module is used to synchronize and trigger tasks on different processors; the shared second-level cache is used by multiple cores Shared, allocated and used by multiple cores in a configurable dynamic cache partition.
进一步作为可选的实施方式,共享定时器中断模块包括全局计时器以及与各核心一一对应的递减器,全局计时器用于以预设的时间间隔产生触发信号,触发信号使得各递减器依次递减一次。Further as an optional implementation, the shared timer interrupt module includes a global timer and a decrementer corresponding to each core one by one, the global timer is used to generate a trigger signal at a preset time interval, and the trigger signal makes each decrementer decrement in turn once.
本发明实施例中,共享定时器中断模块为每个核心提供了一个专用的递减器,基于共享的全局计时器进行递减,共享的全局定时器在固定时间间隔内产生触发信号,使得每个递减器递减一次。In the embodiment of the present invention, the shared timer interrupt module provides a dedicated decrementer for each core, decrements based on the shared global timer, and the shared global timer generates a trigger signal within a fixed time interval, so that each decrement decrements once.
参照图2,进一步作为可选的实施方式,各核心均与缓存通路管理单元连接,各核心均设有相应的编码,缓存指令包括编码和指令类型,缓存通路管理单元根据编码识别对应的核心,并根据指令类型确定对应的缓存通路配置操作。Referring to Fig. 2, further as an optional embodiment, each core is connected to the cache path management unit, each core is provided with a corresponding code, the cache instruction includes code and instruction type, and the cache path management unit identifies the corresponding core according to the code, And determine the corresponding cache path configuration operation according to the instruction type.
具体地,缓存通路管理单元用于集中管理缓存通路。通过缓存通路管理单元,每个核心可以发送命令来重新配置其占用的缓存通路。缓存通路管理单元连接在N个核心上,能够识别不同核心的编码,并根据不同的指令类型在缓存通路池中操作相应的缓存通路。基于这种统一调度方案,在分配内存之前核心不用再查询缓存通路的状态,同时也避免了多核处理器各个核心之间的干扰。Specifically, the cache path management unit is used for centralized management of cache paths. Through the cache path management unit, each core can send commands to reconfigure the cache paths it occupies. The cache path management unit is connected to the N cores, and can identify codes of different cores, and operate corresponding cache paths in the cache path pool according to different instruction types. Based on this unified scheduling scheme, the core does not need to query the state of the cache path before allocating memory, and also avoids interference between cores of the multi-core processor.
进一步作为可选的实施方式,缓存控制单元包括多个缓存控制器,缓存控制器与核心一一对应。As a further optional implementation manner, the cache control unit includes multiple cache controllers, and the cache controllers correspond to the cores one by one.
具体地,缓存控制单元中包含多个缓存控制器,与多个核心一一对应设置,以确保各个核心对共享二级缓存的访问。Specifically, the cache control unit includes multiple cache controllers, which are set in one-to-one correspondence with multiple cores, so as to ensure that each core can access the shared L2 cache.
参照图3,进一步作为可选的实施方式,缓存通路由内存块组成,设有多个缓存分区,各缓存分区可分别被不同的核心占用。Referring to FIG. 3 , further as an optional implementation manner, the cache path is composed of memory blocks, and multiple cache partitions are provided, and each cache partition can be occupied by different cores.
具体地,如图3所示为本发明实施例提供的缓存通道的分区示意图,图中不同的填充表示对应缓存分区的内存正在被不同核心所占用。本发明实施例的动态分区缓存管理是基于此缓存分区的方式实现的。Specifically, FIG. 3 is a schematic partition diagram of a cache channel provided by an embodiment of the present invention, and different fillings in the figure indicate that the memory of the corresponding cache partition is being occupied by different cores. The dynamic partition cache management in the embodiment of the present invention is implemented based on the cache partition method.
参照图1,进一步作为可选的实施方式,多核处理器动态缓存分区隔离系统还包括缓存通路替换模块,缓存通路替换模块用于当核心需要将数据存储在共享二级缓存且各缓存通路均被占用时,选择一个被占用的缓存通路进行缓存替换。Referring to Fig. 1, further as an optional embodiment, the multi-core processor dynamic cache partition isolation system also includes a cache path replacement module, and the cache path replacement module is used to store data in the shared L2 cache when the core needs and each cache path is When occupied, select an occupied cache path for cache replacement.
具体地,当必须将新数据存储在共享二级缓存中而所有缓存通路都被占用时,需要选择一个已被占有的缓存通路进行替换,本发明实施例采用先进先出的替换策略,即优先替换最早开始占用的缓存通道。为了保持不连续的缓存通路分区占用模式,本发明实施例部署了缓存通路替换模块。Specifically, when new data must be stored in the shared L2 cache and all cache paths are occupied, it is necessary to select an occupied cache path for replacement. Replace the buffer channel that started occupying the earliest. In order to maintain a discontinuous cache way partition occupation mode, the embodiment of the present invention deploys a cache way replacement module.
参照图1,进一步作为可选的实施方式,缓存通路替换模块包括存储器和选择器,存储器用于存储参考通路队列,参考通路队列为基于先进先出的替换策略形成的待替换的缓存通路的队列,选择器用于根据参考通路队列和使能信号队列选择相应的缓存通路进行缓存替换,使能信号队列由缓存通路管理单元生成,使能信号队列包括多个与待替换的缓存通路一一对应的使能信号。Referring to Fig. 1, further as an optional embodiment, the cache path replacement module includes a memory and a selector, the memory is used to store a reference path queue, and the reference path queue is a queue of cache paths to be replaced based on a first-in-first-out replacement strategy , the selector is used to select the corresponding cache path for cache replacement according to the reference path queue and the enable signal queue, the enable signal queue is generated by the cache path management unit, and the enable signal queue includes multiple enable signal.
具体地,本发明实施例基于先进先出的替换策略,将待替换的缓存通路以队列的形式存储在双端口存储器中,形成参考通路队列。当有缓存通路被释放的时候,参考通路队列中的信息应该在一个时钟内清除为初始参考通路。为了达到这个目的,本发明实施例采用使能信号的控制方式,为参考通路队列中的每个参考通路构建一个1位的使能信号并以队列的形式存储,用以控制选择器的输出,从而达到在一个时钟周期复位参考通路队列的目的。Specifically, in the embodiment of the present invention, based on a first-in-first-out replacement policy, cache paths to be replaced are stored in a queue in a dual-port memory to form a reference path queue. When a buffered way is released, the information in the reference way queue should be cleared as the original reference way within one clock. In order to achieve this goal, the embodiment of the present invention adopts the control mode of the enable signal, and constructs a 1-bit enable signal for each reference path in the reference path queue and stores it in the form of a queue to control the output of the selector. In this way, the purpose of resetting the reference path queue in one clock cycle is achieved.
以上是对本发明实施例的系统结构和工作原理进行了说明。可以理解的是,通过缓存通路管理单元、缓存控制单元以及缓存通路切换单元对缓存通道进行动态分区管理,为多核处理器提供动态可配置的共享二级缓存,使得共享二级缓存可以高效地供各个核心使用,避免了核间缓存干扰,一定程度上保证了处理器任务的正确运行,提高了系统性能。The above is the description of the system structure and working principle of the embodiment of the present invention. It can be understood that, through the cache path management unit, the cache control unit and the cache path switching unit, the cache path is dynamically partitioned and managed, and a dynamically configurable shared L2 cache is provided for the multi-core processor, so that the shared L2 cache can be efficiently provided. The use of each core avoids inter-core cache interference, ensures the correct operation of processor tasks to a certain extent, and improves system performance.
下面结合控制方法对本发明实施例作进一步说明。The embodiments of the present invention will be further described below in conjunction with the control method.
参照图4,本发明实施例提供了一种多核处理器动态缓存分区隔离系统的控制方法,用于通过上述多核处理器动态缓存分区隔离系统实现,包括以下步骤:Referring to FIG. 4 , an embodiment of the present invention provides a control method for a multi-core processor dynamic cache partition isolation system, which is implemented by the above-mentioned multi-core processor dynamic cache partition isolation system, including the following steps:
S101、通过缓存通路管理单元接收各核心发送的缓存指令,并根据缓存指令对核心占用的缓存通路进行重新配置,进而根据重新配置的结果生成相应的缓存控制信号;S101. Receive the cache instruction sent by each core through the cache path management unit, reconfigure the cache path occupied by the core according to the cache instruction, and then generate a corresponding cache control signal according to the reconfiguration result;
S102、通过缓存通路切换单元接收缓存控制信号,并根据缓存控制信号对各核心和相应的缓存通路进行动态连接,进而返回连接状态至缓存控制单元;S102. Receive the cache control signal through the cache path switching unit, and dynamically connect each core with the corresponding cache path according to the cache control signal, and then return the connection state to the cache control unit;
S103、通过缓存控制单元接收缓存控制信号和连接状态,并根据缓存控制信号和连接状态开启或中断各核心对相应的缓存通路的访问。S103. Receive the cache control signal and the connection state through the cache control unit, and enable or stop each core's access to the corresponding cache path according to the cache control signal and the connection state.
进一步作为可选的实施方式,多核处理器动态缓存分区隔离系统还包括缓存通路替换模块,缓存通路替换模块包括存储器和选择器,控制方法还包括以下步骤:Further as an optional implementation, the multi-core processor dynamic cache partition isolation system also includes a cache path replacement module, the cache path replacement module includes a memory and a selector, and the control method further includes the following steps:
S104、当缓存通路均被占用,通过缓存通路管理单元选取占用时间靠前的多个缓存通路作为待替换的缓存通路,并根据待替换的缓存通路生成参考通路队列,进而将参考通路队列存储在存储器中;S104. When the cache paths are all occupied, the cache path management unit selects a plurality of cache paths with a higher occupying time as the cache paths to be replaced, and generates a reference path queue according to the cache paths to be replaced, and then stores the reference path queue in in memory;
S105、当缓存通路管理单元接收到核心的缓存指令,根据缓存指令生成相应的使能信号队列,并将使能信号队列下发至选择器,使能信号队列包括多个与待替换的缓存通路一一对应的使能信号;S105. When the cache path management unit receives the cache instruction of the core, it generates a corresponding enable signal queue according to the cache instruction, and sends the enable signal queue to the selector. The enable signal queue includes a plurality of cache paths to be replaced One-to-one corresponding enable signal;
S106、通过选择器根据使能信号队列和参考通路队列选择相应的缓存通路进行缓存替换。S106 , select a corresponding cache path to perform cache replacement according to the enable signal queue and the reference path queue through the selector.
可以理解的是,上述系统实施例中的内容均适用于本方法实施例中,本方法实施例所具体实现的功能与上述系统实施例相同,并且达到的有益效果与上述系统实施例所达到的有益效果也相同。It can be understood that the content in the above-mentioned system embodiment is applicable to this method embodiment, the functions realized by this method embodiment are the same as those of the above-mentioned system embodiment, and the beneficial effects achieved are the same as those achieved by the above-mentioned system embodiment The beneficial effects are also the same.
应当认识到,本发明的实施例可以由计算机硬件、硬件和软件的组合、或者通过存储在非暂时性计算机可读存储器中的计算机指令来实现或实施。上述方法可以使用标准编程技术—包括配置有计算机程序的非暂时性计算机可读存储介质在计算机程序中实现,其中如此配置的存储介质使得计算机以特定和预定义的方式操作——根据在具体实施例中描述的方法和附图。每个程序可以以高级过程或面向对象的编程语言来实现以与计算机系统通信。然而,若需要,该程序可以以汇编或机器语言实现。在任何情况下,该语言可以是编译或解释的语言。此外,为此目的该程序能够在编程的专用集成电路上运行。It should be appreciated that embodiments of the invention may be realized or implemented by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer readable memory. The above methods can be implemented in a computer program using standard programming techniques—including a non-transitory computer-readable storage medium configured with a computer program, wherein the storage medium so configured causes the computer to operate in a specific and predefined manner—according to the specific implementation Methods and figures described in the examples. Each program can be implemented in a high-level procedural or object-oriented programming language to communicate with the computer system. However, the programs can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language. Furthermore, the program can be run on an application specific integrated circuit programmed for this purpose.
此外,可按任何合适的顺序来执行本文描述的过程的操作,除非本文另外指示或以其他方式明显地与上下文矛盾。本文描述的过程(或变型和/或其组合)可在配置有可执行指令的一个或多个计算机系统的控制下执行,并且可作为共同地在一个或多个处理器上执行的代码(例如,可执行指令、一个或多个计算机程序或一个或多个应用)、由硬件或其组合来实现。上述计算机程序包括可由一个或多个处理器执行的多个指令。In addition, operations of processes described herein may be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described herein (or variations and/or combinations thereof) can be performed under the control of one or more computer systems configured with executable instructions, and as code that collectively executes on one or more processors (e.g. , executable instructions, one or more computer programs or one or more applications), hardware or a combination thereof. The computer program described above includes a plurality of instructions executable by one or more processors.
进一步,上述方法可以在可操作地连接至合适的任何类型的计算平台中实现,包括但不限于个人电脑、迷你计算机、主框架、工作站、网络或分布式计算环境、单独的或集成的计算机平台、或者与带电粒子工具或其它成像装置通信等等。本发明的各方面可以以存储在非暂时性存储介质或设备上的机器可读代码来实现,无论是可移动的还是集成至计算平台,如硬盘、光学读取和/或写入存储介质、RAM、ROM等,使得其可由可编程计算机读取,当存储介质或设备由计算机读取时可用于配置和操作计算机以执行在此所描述的过程。此外,机器可读代码,或其部分可以通过有线或无线网络传输。当此类媒体包括结合微处理器或其他数据处理器实现上文所描述步骤的指令或程序时,本文所描述的发明包括这些和其他不同类型的非暂时性计算机可读存储介质。当根据本发明所描述的方法和技术编程时,本发明还包括计算机本身。Further, the above method can be implemented in any type of computing platform operably connected to suitable, including but not limited to personal computer, minicomputer, main frame, workstation, network or distributed computing environment, separate or integrated computer platform , or communicate with charged particle tools or other imaging devices, etc. Aspects of the invention can be implemented as machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optically read and/or written storage medium, RAM, ROM, etc., such that they are readable by a programmable computer, when the storage medium or device is read by the computer, can be used to configure and operate the computer to perform the processes described herein. Additionally, the machine-readable code, or portions thereof, may be transmitted over a wired or wireless network. The invention described herein includes these and other various types of non-transitory computer-readable storage media when such media include instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. The invention also includes the computer itself when programmed according to the methods and techniques described herein.
计算机程序能够应用于输入数据以执行本文所描述的功能,从而转换输入数据以生成存储至非易失性存储器的输出数据。输出信息还可以应用于一个或多个输出设备如显示器。在本发明优选的实施例中,转换的数据表示物理和有形的对象,包括显示器上产生的物理和有形对象的特定视觉描绘。Computer programs can be applied to input data to perform the functions described herein, transforming the input data to generate output data stored to non-volatile memory. Output information may also be applied to one or more output devices such as a display. In a preferred embodiment of the invention, the transformed data represents physical and tangible objects, including specific visual depictions of physical and tangible objects produced on a display.
以上所述,只是本发明的较佳实施例而已,本发明并不局限于上述实施方式,只要其以相同的手段达到本发明的技术效果,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。在本发明的保护范围内其技术方案和/或实施方式可以有各种不同的修改和变化。The above is only a preferred embodiment of the present invention, and the present invention is not limited to the above-mentioned implementation, as long as it achieves the technical effect of the present invention by the same means, within the spirit and principles of the present invention, any Any modification, equivalent replacement, improvement, etc., shall be included within the protection scope of the present invention. Various modifications and changes may be made to the technical solutions and/or implementations within the protection scope of the present invention.
Claims (9)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211438477.9A CN115827547A (en) | 2022-11-16 | 2022-11-16 | A multi-core processor dynamic cache partition isolation system and control method thereof |
PCT/CN2023/095559 WO2024103666A1 (en) | 2022-11-16 | 2023-05-22 | Dynamic cache-partition isolation system for multi-core processor, and control method therefor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211438477.9A CN115827547A (en) | 2022-11-16 | 2022-11-16 | A multi-core processor dynamic cache partition isolation system and control method thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115827547A true CN115827547A (en) | 2023-03-21 |
Family
ID=85528672
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211438477.9A Pending CN115827547A (en) | 2022-11-16 | 2022-11-16 | A multi-core processor dynamic cache partition isolation system and control method thereof |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115827547A (en) |
WO (1) | WO2024103666A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024103666A1 (en) * | 2022-11-16 | 2024-05-23 | 中山大学 | Dynamic cache-partition isolation system for multi-core processor, and control method therefor |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7076609B2 (en) * | 2002-09-20 | 2006-07-11 | Intel Corporation | Cache sharing for a chip multiprocessor or multiprocessing system |
CN101571843A (en) * | 2008-04-29 | 2009-11-04 | 国际商业机器公司 | Method, apparatuses and system for dynamic share high-speed cache in multi-core processor |
US9529719B2 (en) * | 2012-08-05 | 2016-12-27 | Advanced Micro Devices, Inc. | Dynamic multithreaded cache allocation |
CN105426319B (en) * | 2014-08-19 | 2019-01-11 | 超威半导体产品(中国)有限公司 | Dynamic buffering zone devices and method |
US12066945B2 (en) * | 2020-12-22 | 2024-08-20 | Intel Corporation | Dynamic shared cache partition for workload with large code footprint |
CN115098431A (en) * | 2022-05-27 | 2022-09-23 | 北京奕斯伟计算技术股份有限公司 | Processor, shared cache allocation method and device |
CN115827547A (en) * | 2022-11-16 | 2023-03-21 | 中山大学 | A multi-core processor dynamic cache partition isolation system and control method thereof |
-
2022
- 2022-11-16 CN CN202211438477.9A patent/CN115827547A/en active Pending
-
2023
- 2023-05-22 WO PCT/CN2023/095559 patent/WO2024103666A1/en unknown
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024103666A1 (en) * | 2022-11-16 | 2024-05-23 | 中山大学 | Dynamic cache-partition isolation system for multi-core processor, and control method therefor |
Also Published As
Publication number | Publication date |
---|---|
WO2024103666A1 (en) | 2024-05-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112088357B (en) | System call management in a user-mode multithreaded self-scheduling processor | |
CN112088356B (en) | Starting from a thread using a work descriptor packet in a dispatch processor | |
CN112106027B (en) | Memory request size management in a multithreaded self-scheduling processor | |
CN112088363B (en) | Event messaging in systems with self-scheduling processors and hybrid threading architecture | |
CN112119376B (en) | System with self-dispatch processor and hybrid thread organization | |
CN112106026B (en) | Multithreaded self-scheduling processor for managing network congestion | |
CN112088358B (en) | Multithreaded self-scheduling processor with thread priority management | |
CN112106030B (en) | Thread state monitoring in systems with multithreaded self-scheduling processors | |
US20240403115A1 (en) | Thread Creation on Local or Remote Compute Elements by a Multi-Threaded, Self-Scheduling Processor | |
CN112088359B (en) | Multithread self-scheduling processor | |
CN109997112B (en) | Data processing | |
US7865647B2 (en) | Efficient resource arbitration | |
US10210117B2 (en) | Computing architecture with peripherals | |
CN107949837B (en) | Register file for I/O packet compression | |
TW201428464A (en) | Distributed chip level power system | |
JP2016521936A (en) | Service rate redistribution for credit-based mediation | |
CN112136107B (en) | Non-cached loads and stores in a system with a multithreaded self-scheduling processor | |
US10042773B2 (en) | Advance cache allocator | |
CN106250348A (en) | A kind of heterogeneous polynuclear framework buffer memory management method based on GPU memory access characteristic | |
CN115827547A (en) | A multi-core processor dynamic cache partition isolation system and control method thereof | |
KR20140137573A (en) | Memory management apparatus and method for thread of data distribution service middleware | |
CN104572483B (en) | Dynamic memory management device and method | |
CN107038021A (en) | Methods, devices and systems for accessing random access memory ram | |
WO2012117445A1 (en) | Information processing system | |
KR20250046137A (en) | Memory management system for memory virtualization and real-time scheduling and method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |