Access request processing method, chip, computing device, and storage medium
Patent Information
- Application Number
- CN202611165338.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-30
AI Technical Summary
然而,随着多裸片加速器中计算裸片数量的增加,以及CPU对调度节点访问频率的增加,动态建立映射关系存在高频访问时延抖动与资源冲突的问题,长期保留映射关系的方式则会占用大量的映射资源,导致资源严重浪费
[0011]在本申请实施例中,目标芯片中包括多个调度节点和至少一个槽位,槽位可基于调度节点的目标动态属性进行动态分配与回收。当目标调度节点的目标动态属性满足设定条件时,槽位可以被分配给目标调度节点,槽位被配置为在目标调度节点的目标动态属性满足设定条件期间,存储目标调度节点的映射资源描述信息,从而映射资源描述信息对应的映射资源得以在这期间持续保持有效。当主机CPU访问目标调度节点的局部地址空间时,该访问请求可以通过映射资源描述信息对应的映射资源被路由至目标调度节点,这样避免每次访问时动态建立映射关系所带来的高频访问时延抖动和资源冲突问题。
Smart Images

Figure CN123011822A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to an access request processing method, a chip, a computing device, and a storage medium. Background Technology
[0002] A multi-die accelerator is a heterogeneous computing device that integrates multiple dies into a single package and enables collaborative operation through internal interconnects. Because multi-die accelerators integrate more computing resources to provide higher computing density and stronger scalability, they are widely used in scenarios such as cloud computing, artificial intelligence training and inference, and high-performance computing. A multi-die accelerator integrates multiple compute dies, each containing one or more scheduler nodes. The scheduler node is responsible for receiving computing tasks from the Central Processing Unit (CPU) and scheduling and distributing them to the computing units within the die for execution.
[0003] Multi-die accelerators interconnect with the host via a communication bus. When the CPU on the host needs to access the local address space of a scheduling node within a computing die, a mapping relationship from the CPU-side address to the target address on the device side needs to be established. Traditional methods either dynamically establish the mapping relationship on each access, or pre-establish a mapping relationship between each scheduling node in each computing die and the CPU, and keep it active for a long time.
[0004] Establishing a mapping relationship involves the allocation and binding of mapping resources at both ends. However, with the increase in the number of computing dies in multi-die accelerators and the increase in the frequency of CPU access to scheduling nodes, dynamically establishing mapping relationships has problems such as high-frequency access latency jitter and resource conflicts. On the other hand, maintaining mapping relationships for a long time will consume a large amount of mapping resources, resulting in serious resource waste. Summary of the Invention
[0005] This application provides an access request processing method, chip, computing device, and storage medium, which can avoid dynamically establishing mapping relationships for each access and improve the utilization rate of mapping resources.
[0006] This application provides an access request processing method, including: receiving an access request for accessing the local address space of a target scheduling node, the target scheduling node being a target computing die located in a target chip, and the target chip having at least one slot; if there is a target slot allocated to the target scheduling node in the at least one slot, reading the mapping resource description information stored in the target slot, and routing the access request to the target scheduling node through the mapping resource corresponding to the mapping resource description information; wherein, the at least one slot is configured to store the mapping resource description information of the corresponding target scheduling node while the target dynamic attributes of the target scheduling node meet a set condition.
[0007] This application provides a target chip, including: one or more computing dies, each computing die including one or more scheduling nodes, the scheduling nodes being used to process access requests; and at least one slot for storing mapping resource description information of the corresponding target scheduling node while the target dynamic attributes of the target scheduling node in the scheduling node meet set conditions. The local processing unit is configured to: receive an access request for accessing the local address space of a target scheduling node; and, in response to the existence of a target slot allocated to the target scheduling node in at least one slot, read the mapping resource description information stored in the target slot, and route the access request to the target scheduling node through the mapping resource corresponding to the mapping resource description information.
[0008] This application also provides a computing device, including: a memory and a processor; wherein, the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the above-described access request processing method.
[0009] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor of a computing device, causes the processor to perform the above-described access request processing method.
[0010] This application also provides a computer program product, including: a computer program / instruction, which, when executed by a processor, enables the processor to implement the above-described access request processing method.
[0011] In this embodiment, the target chip includes multiple scheduling nodes and at least one slot. The slot can be dynamically allocated and reclaimed based on the target dynamic attributes of the scheduling nodes. When the target dynamic attributes of the target scheduling node meet the set conditions, the slot can be allocated to the target scheduling node. The slot is configured to store the mapping resource description information of the target scheduling node during the period when the target dynamic attributes of the target scheduling node meet the set conditions, so that the mapping resource corresponding to the mapping resource description information remains valid during this period. When the host CPU accesses the local address space of the target scheduling node, the access request can be routed to the target scheduling node through the mapping resource corresponding to the mapping resource description information. This avoids the high-frequency access latency jitter and resource conflict problems caused by dynamically establishing mapping relationships every time an access occurs.
[0012] Correspondingly, during the period when the target scheduling node's dynamic attributes do not meet the set conditions, the slot does not store the target scheduling node's mapping resource description information, thus promptly reclaiming the slot and releasing the corresponding mapping resources. The released slot and mapping resources can then be allocated to other scheduling nodes that meet the conditions. In this way, slot allocation can be automatically adjusted according to the dynamic changes in the target scheduling node's attributes, enabling dynamic sharing of slots among different scheduling nodes. This avoids retaining mapping resources for each scheduling node for a long time, improving the utilization rate of mapping resources and the overall scalability of the system. Attached Figure Description
[0013] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A schematic diagram of the structure of an access request processing system provided in an exemplary embodiment of this application; Figure 2 A schematic diagram of slot lifecycle management provided as an exemplary embodiment of this application; Figure 3 A flowchart illustrating an access request processing method provided for an exemplary embodiment of this application; Figure 4 A flowchart illustrating another access request processing method provided for an exemplary embodiment of this application; Figure 5 A schematic diagram of the structure of an access request processing apparatus provided in an exemplary embodiment of this application; Figure 6 This is a schematic diagram of the structure of a computing device provided for an exemplary embodiment of this application. Detailed Implementation
[0014] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0015] It should be noted that, in the cases involving user information in the embodiments of this application, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of related data must comply with relevant laws, regulations, and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse. In addition, the various models involved in this application (including but not limited to language models or large models) comply with relevant laws and standards.
[0016] A multi-die accelerator is a heterogeneous computing device that integrates multiple dies into a single package and enables them to work collaboratively through internal interconnects. Because multi-die accelerators integrate more computing resources to provide higher computing power density and stronger scalability, they are widely used in scenarios such as cloud computing, artificial intelligence training and inference, and high-performance computing.
[0017] A multi-die accelerator integrates multiple compute dies, each containing one or more scheduling nodes. The scheduling nodes receive computational tasks from the CPU and schedule and distribute them to the computational units within the compute die for execution. The multi-die accelerator interconnects with the host computer via a communication bus. When the CPU on the host computer needs to access the local address space of a scheduling node within a compute die, a mapping relationship from the CPU-side address to the device-side address needs to be established.
[0018] There are two traditional methods for establishing mapping relationships. One method is to dynamically establish the mapping relationship during each CPU access. This process involves: temporarily allocating host-side mapping resources, such as IOMMU page table entries and address translation cache entries; temporarily allocating device-side mapping resources, such as base address registers (BARs), device internal address translation table entries, or address decoding windows; binding the allocated host-side and device-side mapping resources to establish a complete address translation path from the CPU address to the local address space of the target chip's internal scheduling node, and writing configuration parameters (including address mapping rules, window base address, and offset) into the corresponding hardware registers or entries to make the mapping relationship effective; and immediately releasing the temporarily allocated mapping resources after the access is complete, returning the resources to the corresponding resource pool. This process requires each CPU access to undergo resource allocation, address resolution, table configuration, resource release, and re-contention. In high-frequency access scenarios, the overhead of dynamically establishing mappings will be continuously amplified, exacerbating latency jitter and resource conflicts.
[0019] Another approach is to pre-establish a mapping relationship between each scheduling node in each compute die and the CPU, and keep this mapping relationship active for an extended period. This mapping relationship requires specific mapping resources, which are exclusively used by the scheduling node. While this avoids the overhead of dynamically establishing mapping relationships for each access, the required resources increase dramatically as the number of compute dies and scheduling nodes increases. This consumes a large amount of limited mapping resources, squeezing out the available space for other persistent data channels and dynamic mapping paths, leading to wasted hardware resources.
[0020] In summary, traditional methods suffer from problems such as latency jitter, resource conflicts, and waste of hardware resources. How to efficiently support high-frequency access of the CPU to multiple computing dies scheduling nodes in a multi-die accelerator with limited persistent mapping resources is a problem that needs to be solved.
[0021] In view of this, embodiments of this application provide an access request processing method for multi-die accelerators. A limited-capacity slot is established in the multi-die accelerator, and multiple scheduling nodes can dynamically share multiple slots. After a slot is allocated to a target scheduling node, the slot stores mapping resource description information corresponding to the target scheduling node. This mapping resource description information points to the corresponding mapping resources, which are used to establish a mapping relationship between the CPU and the local address space of the target scheduling node. During the storage of the mapping resource description information in the slot, the mapping resource it points to remains valid, and the mapping relationship is also persistently valid. Multiple accesses by the CPU to the target scheduling node can directly use the mapping resources for routing, without needing to re-execute the complete process of mapping resource allocation, binding, and configuration for each access.
[0022] The scheduling nodes possess attribute information, which is dynamically changing. A slot is allocated and the corresponding mapping resource description information is stored only when the target dynamic attribute of the scheduling node meets the set conditions. When the target dynamic attribute of the scheduling node no longer meets the set conditions, the slot already occupied by the scheduling node is not allocated or is reclaimed, releasing the mapping resources occupied by the scheduling node. This attribute-driven dynamic allocation and reclamation mechanism enables dynamic sharing of limited slot resources among different scheduling nodes, avoiding the resource waste caused by long-term storage of mapping resource description information for each scheduling node, leading to long-term exclusive use of mapping resources.
[0023] The access request processing method provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0024] First, through Figure 1 The hardware structure and mapping relationships involved in the embodiments of this application will be described. Figure 1 This is a schematic diagram of the structure of an access request processing system provided for an exemplary embodiment of this application. For example... Figure 1 As shown, the access request processing system includes a host 101 and a target chip 102.
[0025] Host 101 includes a CPU and host memory. The CPU is used to execute various computing tasks and issue memory access requests to the device side. Host 101 connects to target chip 102 through a first interconnect protocol interface and communicates with target chip 102 through the first interconnect protocol to initiate access to internal resources of target chip 102, including read and write access to the local address space of the scheduling node. Exemplarily, the first interconnect protocol may be the Peripheral Component Interconnect (PCI) protocol, the Peripheral Component Interconnect Express (PCIe) protocol, the Compute Express Link (CXL) protocol, the Universal Chip Interconnect Express (UCIE) standard, or any other physical layer / link layer inter-chip or on-chip high-speed interconnect protocol.
[0026] The target chip 102 is an accelerator chip based on a multi-die architecture, used for hardware acceleration processing in various service and computing scenarios, such as high-performance computing, artificial intelligence (AI) training and inference scenarios. At the physical implementation level, the target chip 102 can be a standalone physical board (such as a PCI / PCIe / CXL device); alternatively, the target chip 102 can be integrated as an independent computing unit (such as an IP core, subsystem, etc.) with the host 101 in the same system-on-a-chip (SoC), or co-packaged with the host 101 on the same chip substrate or package. For example, the target chip 102 can be a graphics processing unit (GPU), an AI acceleration chip, a field-programmable gate array (FPGA) accelerator card, or other types of heterogeneous computing accelerators.
[0027] The target chip 102 integrates multiple dies (also called chips or bare dies), which may include computing dies and dies for other functions. Each computing die contains one or more scheduling nodes. For example, as... Figure 1 As shown, target chip 102 includes die 0, die 1, ..., die M-1. Die 0 internally contains scheduling node 0, scheduling node 1, ..., scheduling node K-1, where M and K are both integers greater than 1. The internal structures of the other dies are similar and will not be labeled individually.
[0028] A scheduling node is a functional unit or hardware module within a computing die. It is responsible for receiving computing tasks from the CPU and scheduling and distributing these tasks to computing units within the computing die for execution. As an independently addressable scheduling endpoint in the target chip 102, the CPU can select addresses to distribute tasks to different scheduling nodes on different computing dies, thereby achieving distributed expansion of scheduling capabilities and load balancing.
[0029] Each computing die integrates a local processing unit and memory space. Each scheduling node within the computing die occupies an independent address range in memory, called the scheduling node's local address space. The local address spaces of scheduling nodes corresponding to different computing dies are distributed across the global address space of the target chip 102. The CPU interacts with the scheduling nodes by accessing their local address spaces, including but not limited to: submitting tasks or writing control data to the scheduling node through write operations, or querying the scheduling node's status information through read operations, such as querying the task queue status, obtaining a scheduling token, checking the ready flag, or reading exception recovery information—any business or control-level read access.
[0030] The target address in the access request issued by the CPU is located in the host's physical address space, while the local address space of the scheduling node is located in the device's address space; the two belong to different address domains. When the CPU needs to access the local address space of a scheduling node within a computing die, a mapping relationship between the host-side address and the scheduling node's local address space needs to be established and configured in the address decoding hardware. After configuration, the mapping relationship is published by the hardware and made valid, forming a CPU-accessible view. The CPU-accessible view is a CPU-addressable hardware access path formed after the mapping relationship is published by the hardware, used to enable the CPU to read and write to the mapped local address space of the scheduling node through the access path.
[0031] In this embodiment, the mapping relationship between the host-side address and the local address space of the scheduling node includes two layers: the first layer is the mapping relationship between the host 101 and the base address register (BAR) of the target chip 102. The first layer of mapping relationship can be established when the host 101 enumerates the target chip 102. Specifically, when the host 101 enumerates the target chip 102, it allocates the host physical address space for the BAR of the target chip 102 and establishes the mapping relationship between the host-side address and the target chip-side BAR address.
[0032] The second layer is the mapping from BAR addresses to the local address space of the scheduling node. That is, the BAR window is currently pointing to the local address space of a specific scheduling node on a given die. The target chip 102 can be configured with one or more BARs. Each BAR can logically be divided into multiple windows, with each BAR window pointing to the local address space of a scheduling node at any given time. By switching the local address spaces mapped to by the BAR windows, the local address spaces of the scheduling nodes mapped to each BAR window can dynamically change. Therefore, the second-layer mapping relationship is dynamically established and updated by the window control logic within the target chip 102 during its operation. When it is necessary to point a BAR window to a specific scheduling node, the window control logic within the target chip 102 points the BAR window to the local address space of that scheduling node, establishing the mapping relationship between the BAR address and the local address space of that scheduling node. It should be noted that the global address space of the target chip 102 may be much larger than the size of the BAR. For example, the global address space of the target chip 102 is 1T, while the size of the BAR is 1G. Therefore, the BAR window resources are limited and insufficient to maintain a persistent mapping for each scheduling node.
[0033] Creating mapping relationships involves the allocation and binding of mapping resources at both ends, consuming or occupying relevant resources on the CPU side and the device side (i.e., the chip side). The first-level mapping relationship requires host-side mapping resources. Host-side mapping resources refer to the hardware resources located on the host side used to implement the first-level address translation, establishing the mapping relationship between the host-side address and the target chip-side BAR address. For example, host-side mapping resources may include, but are not limited to: address window configuration and related register resources for address routing in the host PCIe Root Complex (RC) or root port. The second-level mapping relationship requires device-side mapping resources. Device-side mapping resources refer to the hardware resources located inside the target chip 102 used to implement the second-level address translation, establishing the mapping relationship between the target chip-side BAR address and the scheduling node's local address space. For example, device-side mapping resources may include, but are not limited to: device-side BAR window resources, internal device address translation table entries, or routing table entries and decoding logic for address decoding in the device's memory management unit.
[0034] The first-level mapping relationship remains relatively fixed after being established during the host enumeration phase, and the host-side resources it occupies remain valid throughout system operation. The second-level mapping relationship, however, dynamically switches during chip operation, and the device-side resources it occupies are dynamically allocated and released as the BAR window changes direction. Together, these two mapping relationships constitute a complete access path from the CPU address to the local address space of the scheduling node.
[0035] In AI training / inference and high-performance computing scenarios, CPUs frequently read the local address space of scheduling nodes. For example, in a task queue status polling scenario, the CPU needs to continuously read the queue empty / full status register of the scheduling node to determine whether a new inference request can be submitted. In high-throughput scenarios for inference services, this polling operation can reach tens of thousands or even hundreds of thousands of times per second. In a distributed synchronization barrier scenario, the CPU needs to continuously read the barrier arrival flag register of each computing die to determine whether all computing dies participating in training have reached the synchronization point; this read occurs in each training iteration.
[0036] To provide efficient access capabilities with limited persistent mapping resources, in this embodiment, the target chip 102 is provided with one or more sets of mapping slots. These mapping slots can be implemented as hardware storage structures, such as hardware register sets or content-addressable memory. Figure 1 As shown, a set of mapping slots contains one or more slots, denoted as slot 0, slot 1, ..., slot N-1. N is an integer greater than 1, such as N=8, 16, or 32, etc., and the specific value is determined according to the hardware resources and the actual application scenario. It should be understood that the slots are an exemplary implementation of persistent mapping resource management in this application embodiment and do not constitute a limitation on the scope of protection of this application. In practical applications, other equivalent storage structures or management methods can also be used to implement the caching and management of persistent mapping resources.
[0037] Slots can be allocated to scheduling nodes whose target dynamic attributes meet defined conditions. These slots store the mapping resource description information of the corresponding scheduling node while the target dynamic attributes of the scheduling node meet these conditions. The mapping resource description information indicates the mapping resource associated with the target scheduling node, which establishes a mapping relationship between the CPU and the local address space of the target scheduling node. During the lifetime of the slot, or in other words, while the target dynamic attributes of the scheduling node meet the defined conditions, the slot persistently stores the mapping resource description information of the corresponding scheduling node, thereby establishing a persistent mapping resource for the scheduling node. Subsequent accesses to the scheduling node by the host can read the mapping resource description information stored in the slot to directly access the persistent mapping resource corresponding to the mapping resource description information, without repeating the entire mapping creation process.
[0038] The total physical capacity of the slots exceeds the total physical capacity of the BAR windows. When a slot is allocated to a target scheduling node, an available BAR window is associated with it, and the mapping resource description information points to that BAR window. When a slot is reclaimed, this association is severed, and the BAR window is returned to the available resource pool for subsequent allocation by other slots. Through this dynamic association mechanism, BAR window resources can be transferred on demand among multiple slots, eliminating the need to allocate a separate BAR window to each compute die or scheduling node in a long-term fixed manner. This allows for the support of dynamic mapping requirements in multi-compute die scenarios with limited physical window resources.
[0039] In some alternative implementations, the target chip 102 may manage the die at a management granularity based on logical management function units such as Physical Functions (PF) and / or Virtual Functions (VF). The target chip 102 may include one or more logical management function units (PF is used as an example below, but it should be understood that the same applies to VF or custom function modules). Each logical management function unit includes one or more compute dies and at least one slot, wherein one or more compute dies in each logical management function unit share at least one slot of each logical management function unit.
[0040] Specifically, taking a PF as an example, each PF has an independent configuration space and can be allocated independent resources by the host 101 to achieve independent control over the corresponding die group on the target chip 102. For example, each PF can be configured to manage a group of dies, such as PF0 managing die 0 and die 1, and PF1 managing die 2 and die 3.
[0041] Each Functional Primitive Module (PF) independently maintains multiple sets of mapping slots, and these mapping slots are isolated from each other across different PFs. Within the same PF, one or more compute dies managed by that PF share the multiple sets of mapping slots corresponding to that PF. This functional unit-level management approach ensures resource isolation between different functional units, avoiding resource contention and mutual interference between them.
[0042] It should be noted that using functional units as the management granularity is only one exemplary implementation of this application. Other management granularities can also be used, such as unified management of the entire target chip 102, or management granularity according to custom logical groups. This application does not limit this.
[0043] The total physical capacity of the mapped slots is finite, i.e., a bounded resource. Multiple compute dies share multiple sets of mapped slots. Since the total physical capacity of the slots is less than the total physical capacity of the scheduling nodes on the multiple compute dies, multiple scheduling nodes on the multiple compute dies need to compete for the limited slot resources. For example, target chip 102 includes 10 compute dies, each containing 4 scheduling nodes, for a total of 40 scheduling nodes; target chip 102 also provides 8 sets of mapped slots, each containing 2 slots, for a total of 16 slots; these 16 slots serve 40 scheduling nodes.
[0044] To efficiently utilize limited slot resources, this embodiment maintains the dynamic attributes of each scheduling node. Based on whether the dynamic attributes of the scheduling nodes meet set conditions, the scheduling nodes are divided into priority allocation objects and non-priority objects. Priority allocation objects refer to scheduling nodes whose target dynamic attributes meet the set conditions; they can be allocated slots and obtain persistent mapping resources. Non-priority objects refer to scheduling nodes whose target dynamic attributes do not meet the set conditions; they are not allocated slots, and if they have already been allocated slots, they are reclaimed.
[0045] Dynamic attributes describe the demand of scheduling nodes for slot resources. Scheduling nodes with high demand can establish persistent resource mappings. Scheduling nodes with low demand do not need to establish persistent resource mappings. Dynamic attributes include, but are not limited to: access popularity, address space size, dynamic priority, and application scenario. Access popularity refers to the activity level of a scheduling node during the current runtime. Address space size refers to the capacity of a scheduling node's local address space, reflecting the amount of address window resources consumed by the scheduling node to complete one access mapping. Dynamic priority refers to the service level dynamically determined based on the scheduling node's real-time running status, task importance, or service quality requirements, reflecting the relative urgency of resource allocation for the scheduling node during the current runtime phase. Application scenario refers to the application type or service function carried by the scheduling node, reflecting the functional positioning of the scheduling node in the computing or service scenario.
[0046] The setting conditions are used to define the target dynamic attribute requirements that a scheduling node must meet to be considered a priority allocation object. The target dynamic attribute is one or more dynamic attributes. For example, the setting conditions could be: access popularity greater than or equal to a preset popularity threshold, meaning scheduling nodes with higher access popularity can occupy slots preferentially; or address space size less than or equal to a preset size threshold, meaning scheduling nodes with smaller address spaces can occupy slots preferentially; or dynamic priority higher than or equal to a preset priority threshold, meaning scheduling nodes with higher priority can occupy slots preferentially; or application scenario attributes matching a preset type, meaning scheduling nodes serving a specific scenario can occupy slots preferentially. The setting conditions can also be composed of combinations of the above dimensions, such as access popularity reaching a threshold and dynamic priority higher than a preset level, etc., and can be flexibly configured according to actual conditions.
[0047] It is understandable that priority allocation objects and non-priority objects are not static. The dynamic attributes of scheduling nodes fluctuate in real time with changes in their operating status, access patterns, or system load. Therefore, the allocation of scheduling nodes between priority and non-priority objects also dynamically switches. Thus, in this embodiment, the determination of priority allocation objects is based on the real-time dynamic attribute changes of scheduling nodes, rather than a one-time static allocation. Slots in the mapping slots are allocated to priority allocation objects to accelerate the address translation process in scenarios such as high-frequency access or low-latency sensitivity. Access requests for non-priority objects are processed according to the dynamic mapping path and do not occupy slot resources. Through a priority allocation mechanism based on dynamic attributes, it is possible to prevent certain computing dies or scheduling nodes with low mapping resource requirements from occupying persistent resources for extended periods, thereby improving the overall utilization efficiency of mapping resources.
[0048] Taking access popularity as an example, scheduling nodes with high access popularity have a higher demand for slot resources and can be classified as priority allocation objects, i.e., hot objects. Hot objects refer to scheduling nodes whose access popularity meets the popularity criteria; their local address space is frequently accessed by hosts within a certain period, exhibiting continuous access demand, and therefore need to be allocated slots and have persistent mapping resources established. Requests to access hot objects are called hot requests, and hot objects can also be called hot scheduling nodes. Scheduling nodes with low access popularity have a lower demand for slot resources and can be classified as non-priority allocation objects, i.e., cold objects. Cold objects refer to scheduling nodes whose access popularity does not meet the popularity criteria; their local address space is accessed by hosts less frequently or has not been accessed for a long time, exhibiting no continuous access demand, and therefore do not need to be allocated slots. If slots have already been allocated, they will be reclaimed. Popularity criteria are a type of setting condition used to define the requirements that a scheduling node must meet to be judged as a priority allocation object based on its access popularity attribute. For example, the popularity conditions include, but are not limited to: the number of visits is greater than or equal to a preset number of visits threshold, or the popularity value is greater than or equal to a preset popularity threshold, or the difference between the most recent visit time and the current time is less than a preset time threshold, etc.
[0049] In this process, hot objects may become cold objects due to a decrease in access popularity, and cold objects may become hot objects due to an increase in access popularity. By allocating slots in the local address space of scheduling nodes that meet the popularity criteria to establish persistent mapping resources, multiple CPU access requests can share the same set of persistent mapping resources during the period of popularity maintenance, without the need for repeated establishment.
[0050] Furthermore, the local processing unit of the target chip 102 maintains the status information of each slot and the dynamic attribute information of each scheduling node, so as to dynamically allocate slots according to the attributes of the scheduling nodes, enabling limited persistent mapping resources to dynamically serve priority allocation objects. For ease of understanding, the following explanation uses the popularity dimension as an example; correspondingly, priority allocation objects are represented by hot objects. The status information of the slot includes, but is not limited to: state machine, service object information, mapping resource description information, and reference count. The dynamic attribute information of each scheduling node includes, but is not limited to: recent access time, access count, and popularity value.
[0051] The state machine represents the different stages a slot is in during its lifecycle, and transitions between states can be triggered based on the current access status. The following section will combine... Figure 2 The tank lifecycle management mechanism is explained in detail. Figure 2 A schematic diagram of a slot state machine provided in an exemplary embodiment of this application is shown. Figure 2 As shown, a slot has at least the following states: idle, configured, ready, and being phased out.
[0052] The idle state indicates that the slot is not currently occupied by any scheduling node, does not yet carry any mapping relationships, and does not occupy host-side or device-side mapping resources. In the idle state, the slot can be allocated to hot objects to establish persistent mapping resources for them.
[0053] The "Configuration in Progress" status indicates that a slot has been assigned to a hotspot object. In this status, the local processing unit first allocates and binds host-side and device-side mapped resources, and completes hardware configuration to make the mapping relationship between CPU addresses and the local address space of the hotspot object effective; then, it writes the corresponding mapped resource description information to the slot. At this point, a fully usable CPU-accessible view has not yet been established, and access requests to the scheduling node's local address space cannot be responded to.
[0054] The ready state indicates that the host-side and device-side mapping resources required by the scheduling node have been configured, the mapping relationships have been written to the hardware and are effective, and a complete access path from the host side to the scheduling node's local address space has been established, forming a valid CPU-accessible view. In the ready state, when an access request hits the corresponding hot object, address translation can be completed through the mapping resource associated with that slot, without needing to repeat the mapping creation process. The mapping resource associated with the slot is the mapping resource pointed to by the mapping resource description information stored in the slot.
[0055] The "being phased out" status indicates that the slot is marked as pending reclamation. New access requests cannot use the resources associated with the slot, and the slot and its associated mapped resources are in a state of waiting to be reclaimed.
[0056] The following explains the state transition relationship of the slots. For example... Figure 2 As shown, the slot is initially in an idle state. When persistent mapping resources need to be allocated to a hot object, the local processing unit can select an idle slot and allocate it to the hot object. The slot state changes from idle to configured. In the configured state, the local processing unit configures host-side and device-side mapping resources for the hot object and writes the mapping resource description information to the slot. When the resource configuration is complete and the mapping relationship takes effect, the slot state changes from configured to ready. When the reclamation conditions are met, the slot state changes from ready to obsolescence, and the mapping resources associated with the slot are released. If there are still ongoing access requests (i.e., in-transit access requests) using the mapping resources associated with the slot, the mapping resources associated with the slot are released after all ongoing access requests have been processed and the corresponding reference count has reached zero. After the resources are released, the slot state changes from obsolescence to idle. The reclamation conditions include, but are not limited to: the target dynamic attributes of the selected slot or the target scheduling node no longer meet the set conditions. When any of the following situations occur: the target scheduling node associated with the slot is not visited within a preset time; or the access popularity of the target scheduling node is lower than the preset popularity threshold; or the dynamic priority of the target scheduling node is downgraded to below the preset priority threshold; or the application scenario attribute of the target scheduling node changes and no longer matches the preset type, it can be considered that the target dynamic attribute of the target scheduling node no longer meets the set conditions, thereby triggering slot recycling.
[0057] It should be noted that the above lifecycle phase divisions and triggering conditions for each phase are merely illustrative examples. In practical applications, adjustments can be made according to specific needs. For instance, more intermediate states can be added to support more granular management.
[0058] The service object information includes the compute die identifier, scheduling node identifier, process identifier, and access permission type. The compute die identifier uniquely identifies the compute die associated with the slot. The scheduling node identifier uniquely identifies the scheduling node occupying the slot within the compute die. The compute die identifier and scheduling node identifier determine the object occupying the slot, i.e., which compute die and which scheduling node's local address space the slot is bound to. The process identifier uniquely identifies the host-side process currently using the mapped resources associated with the slot, i.e., which host-side process is currently accessing the scheduling node's local address space. The access permission type indicates the permitted access operation categories for the mapping relationship carried by the slot, such as read-only access or read-write access.
[0059] The mapping resource description information includes a first index pointing to the host-side mapping resource and a second index pointing to the device-side mapping resource. The first index is used to index the corresponding host-side mapping resource, and the second index is used to index the corresponding device-side mapping resource. Writing the first and second indexes into a slot indicates that the host-side and device-side mapping resources are associated with the slot. The specific forms of the first and second indexes include, but are not limited to, the identifier, address, or pointer (pointing to a data structure storing mapping resource configuration information, from which the specific configuration parameters of the host-side and device-side mapping resources are obtained) of the corresponding mapping resources; this application does not limit these forms. The host-side and device-side mapping resources associated with the slot are persistent resources, valid as long as the target dynamic attributes of the target scheduling node meet the set conditions.
[0060] Reference counting is used to record how many access paths or borrowing relationships are currently using the mapped resource associated with a slot. Specifically, whether a host-side mapped resource is being borrowed by a write operation, and whether a device-side mapped resource is being used by a read view, can be tracked using reference counting. Through reference counting, the local processing unit can determine whether the mapped resource associated with the slot is still in use when the slot is being reclaimed, thereby avoiding premature release of resources while they are still referenced and ensuring the safety of resource reclamation.
[0061] The aforementioned information items are continuously updated and maintained by the local processing unit throughout the slot's lifecycle to achieve fine-grained management and dynamic scheduling of slot resources. It should be noted that the above information items are merely illustrative and not intended to limit this application. In practical applications, certain fields can be added, deleted, or merged according to specific needs. For example, in some implementations, an bias reservation field can be added, which indicates whether the computing die currently occupying the slot has persistent occupancy eligibility. When the bias reservation field is set to valid, the scheduling node within the computing die can persistently occupy the slot and does not participate in dynamic replacement.
[0062] The most recent access time (IRT) represents the last time a scheduling node's local address space was accessed. When a host accesses the local address space of a scheduling node, the local processing unit updates the IRT corresponding to that scheduling node to the current time. By maintaining the IRT, a time-dimensional reference can be provided for hotspot identification, slot allocation, and slot reclamation.
[0063] The access count includes cumulative access counts and access counts within a time window. The cumulative access count is the total number of times the local address space of a scheduling node has been accessed since the start of the node's popularity statistics. The access count within a time window is the number of times the local address space of that scheduling node has been accessed within a preset time window. The preset time window can be flexibly configured according to the actual application scenario, for example, it could be the most recent 2 minutes. Specifically, a counter is maintained for each scheduling node, and the counter increments by 1 each time the local address space of a scheduling node is accessed. By maintaining the access count, the popularity of accessing the local address space of a scheduling node can be quantified.
[0064] The heat value is the real-time heat of the local address space of a scheduling node, representing how frequently the local address space of the scheduling node is accessed by the CPU. The heat value can be determined based on multi-dimensional data such as access count and / or recent access time. Whenever the CPU accesses the local address space of the scheduling node, the heat value corresponding to that address increases; over time, if the local address space of the scheduling node remains unaccessed, the heat value gradually decreases. By maintaining the heat value, frequently accessed hotspot objects can be identified, providing a reference for hotspot identification, slot allocation, and slot reclamation.
[0065] It should be understood that the aforementioned popularity value, recent access time, and access count are examples of information items in the popularity dimension of dynamic attributes used to characterize scheduling nodes. More or fewer information items can be set to characterize popularity. In practical applications, scheduling nodes can also maintain other dynamic attributes, each with corresponding information items to determine whether the scheduling node meets set conditions. This application does not limit the specific information items. Slot allocation, retention, replacement, and recycling management operations can all be decided based on any one of the dynamic attributes.
[0066] The following is combined Figure 3 and Figure 4 The access request processing method provided in the embodiments of this application will be described in detail.
[0067] Figure 3 A flowchart illustrating an access request processing method provided in an embodiment of this application is shown. Figure 3 As shown, the method includes the following steps S301 to S302.
[0068] S301, Receive an access request. The access request is used to access the local address space of the target scheduling node, which is located on the target computing die within the target chip. The target chip has at least one slot.
[0069] S302, if at least one slot contains a target slot allocated to the target scheduling node, read the mapping resource description information stored in the target slot, and route the access request to the target scheduling node through the mapping resource corresponding to the mapping resource description information; wherein, the target slot is configured to store the mapping resource description information of the target scheduling node during the period when the target dynamic attribute of the target scheduling node meets the set conditions.
[0070] Regarding step S301, when the host CPU needs to read the local address space of a certain scheduling node, the host CPU issues an access request to the target chip. The access request includes at least the target address, access length, and access direction. The target address is the starting position in the calculated die address space for this access operation, indicating the starting address of the local address space of the target scheduling node. The access length refers to the size of the address space range continuously accessed starting from the target address, indicating the amount of data involved in this access. The access direction indicates whether this access request is a read request or a write request. A read request is used to read data from the target scheduling node, and a write request is used to write data to the target scheduling node.
[0071] In some optional implementations, the access request may further include an object identifier, which includes a target die identifier and a target scheduling node identifier. The target die identifier indicates the target computing die being accessed, and can be represented by a die number or the die's coordinates within the target chip layout. The target scheduling node identifier indicates the target scheduling node within the target computing die being accessed, and can be represented by a scheduling node number. In other optional implementations, the address encoding of the target address may include the identifiers of the target die and the target scheduling node. The local processing unit of the target chip can parse the target die identifier and the target scheduling node identifier from the target address, without needing to carry the identifier fields separately in the access request.
[0072] The access request is sent to the target chip. Upon receiving the access request, the target chip determines the target die identifier and the target scheduling node identifier based on the information carried in the request, thereby determining the local address space of the target scheduling node to be accessed. Further, it determines whether a persistent mapping resource has been established for the target scheduling node. If a persistent mapping resource has been established for the target scheduling node, the access request can be forwarded to the target scheduling node using the established persistent mapping resource.
[0073] Regarding step S302, in some optional implementations, it can be determined whether the target scheduling node has already occupied a slot (denoted as the target slot), or in other words, whether at least one slot exists that is allocated to the target scheduling node, to determine whether a persistent mapping resource has been established for the target scheduling node. If at least one slot exists that is allocated to the target scheduling node, the mapping resource description information stored in the target slot can be read. The established mapping resource can be directly reused through the mapping resource description information, and the current access request can be forwarded to the corresponding target scheduling node. The target scheduling node can then receive the access request and perform the corresponding access operation in its local address space. Furthermore, after the access is completed, the information items related to the slot and the scheduling node are updated. In this way, the mapping creation process or hotspot confirmation process does not need to be re-executed during access, which can reduce access latency.
[0074] Specifically, the target slot is configured to store the mapping resource description information of the corresponding target scheduling node while the target dynamic attributes of the target scheduling node meet the set conditions. Conversely, when the target dynamic attributes of the target scheduling node no longer meet the set conditions, the slot does not store the mapping resource description information of the target scheduling node, thereby promptly reclaiming the slot and releasing the corresponding mapping resources. The released slot and mapping resources can then be allocated to other scheduling nodes that meet the conditions.
[0075] To facilitate understanding, the following will be combined with... Figure 4 Please provide a detailed explanation. Figure 4 A flowchart illustrating another access request processing method provided in an embodiment of this application is shown. Figure 4 As shown, the method includes the following steps S401 to S415.
[0076] S401, Receive an access request for accessing the local address space of the target scheduling node.
[0077] For a detailed description of step S401, please refer to the specific implementation of the same or corresponding description in the aforementioned step S301, which will not be repeated here.
[0078] S402, determine whether at least one slot exists that is a target slot allocated to the target scheduling node. If yes, proceed to steps S403-S405. If no, proceed to step S406.
[0079] S403, if at least one slot contains a target slot allocated to the target scheduling node, then read the mapping resource description information stored in the target slot and determine the type of access request.
[0080] S404 If the access request is a read request, obtain the host-side mapped resource and the device-side mapped resource through the mapped resource description information, and forward the read request to the target scheduling node through the host-side mapped resource and the device-side mapped resource.
[0081] S405 If the access request is a write request, dynamically establish a temporary forwarding resource on the device side and obtain the mapping resource on the host side through the mapping resource description information; then forward the write request to the target scheduling node through the host-side mapping resource and the temporary forwarding resource on the device side, and release the temporary forwarding resource on the device side after the write request access is completed.
[0082] S406, Update the information items related to the target slot and target scheduling node. Then execute steps S412-S414.
[0083] S407: If at least one slot does not have a target slot allocated to the target scheduling node, determine whether the target dynamic attribute of the target scheduling node meets the set conditions. If yes, proceed to steps S408-S414 to allocate a target slot to the target scheduling node. If no, proceed to step S415.
[0084] S408, Determine if there are any idle slots in the mapped slots. If yes, proceed to step S409. If no, proceed to step S410.
[0085] S409: Obtain an idle slot as the target slot and assign it to the target scheduling node.
[0086] S410 selects a replacement slot that meets the elimination criteria from the slots in the ready state and reclaims the replacement slot; and assigns the replacement slot in the idle state as the target slot to the target scheduling node.
[0087] S411, Write the mapping resource description information of the target scheduling node into the target slot and save it, so as to associate the mapping resource description information with the target slot and the corresponding mapping resource.
[0088] Then, steps S403-S406 are executed to route the access request to the target scheduling node through the mapped resource corresponding to the mapped resource description information. Then, steps S412-S414 are executed.
[0089] S412, continuously check whether the target dynamic attributes of the target scheduling node still meet the set conditions. If yes, proceed to step S413; otherwise, proceed to step S414.
[0090] S413, the target slot remains ready for reuse in subsequent requests.
[0091] S414: If the target dynamic attributes of the target scheduling node do not meet the set conditions, the target slot is reclaimed.
[0092] S415: Allocate temporary forwarding resources to the target scheduling node; based on the temporary forwarding resources, forward the access request to the target scheduling node, and release the temporary forwarding resources after the access request is processed.
[0093] Regarding step S402, in some optional implementations, the access object identifier can be matched with the service object information of each slot in the ready state; if the access object identifier matches the service object information of any slot in the ready state, it is determined that at least one slot has a target slot allocated to the target scheduling node, so as to reuse the target slot.
[0094] The access object identifier includes the target die identifier and the target scheduling node identifier. These identifiers are matched against the service object information of slots in a ready state. If a slot in a ready state exists whose service object information matches the target die identifier and target scheduling node identifier in this access request, it indicates that a target slot exists allocated to the target scheduling node, and a mapping resource has been established for the target scheduling node's local address space. For example, if the target scheduling node's local address space was previously a hotspot object, and the local processing unit has already allocated a slot in the mapping slots, this slot is associated with available persistent mapping resources for handling access to the target scheduling node's local address space. In this case, the established mapping resource can be directly reused, and the access request can be forwarded to the corresponding target scheduling node, which will receive the access request and perform the corresponding access operation within its local address space. Furthermore, after the access is completed, the information items related to the target slot and the target scheduling node are updated.
[0095] Specifically, in step S403, the persistent mapping resources include the aforementioned host-side mapping resources and device-side mapping resources. The access requests are categorized as read requests and write requests. During access, the type of access request can be determined so that after reading the mapping resource description information stored in the target slot, the access request can be routed using the mapping resources pointed to by the mapping resource description information in different ways according to the type of access request. For example, if the access request is a read request, routing the access request to the target scheduling node through the mapping resource corresponding to the mapping resource description information includes: obtaining the host-side mapping resource and the device-side mapping resource through the mapping resource description information, and forwarding the read request to the target scheduling node through the host-side mapping resource and the device-side mapping resource. For example, if the access request is a write request, routing the access request to the target scheduling node through the mapping resource corresponding to the mapping resource description information includes: dynamically establishing a device-side temporary forwarding resource, obtaining the host-side mapping resource through the mapping resource description information, and forwarding the write request to the target scheduling node through the host-side mapping resource and the device-side temporary forwarding resource.
[0096] A read request reads data from the target chip and returns it, without changing the device state. A write request needs to write data to the target chip and wait for confirmation of completion, involving modification of the device's internal state and consistency maintenance. In other words, read and write requests have different requirements for data consistency and operation completion status, and their transaction lifecycles differ. In this embodiment, different persistent mapping resource usage methods are set for read and write requests.
[0097] Regarding step S404, for a read request, the mapping resource description information stored in the target slot can be read. The complete host-side and device-side mapping resources can be obtained through this description information. Then, the host-side and device-side mapping resources are used to complete the access. Specifically, the method for obtaining resources through the mapping resource description information is as follows: the mapping resource description information contains a first index pointing to the host-side mapping resource and a second index pointing to the device-side mapping resource. The corresponding host-side mapping resource can be located from the host-side resource pool based on the first index information, and the corresponding device-side mapping resource can be located from the device-side resource pool based on the second index information. After successful location, the access request is routed based on the access path from the CPU to the local address space of the target scheduling node determined by the host-side and device-side mapping resources to complete the access. In other words, the aforementioned persistent mapping resource is a persistent read mapping resource. When a read request hits a persistent mapping slot, the complete persistent mapping resource of the persistent mapping slot can be directly reused.
[0098] Regarding step S405, for write requests, since the write operation requires writing data to the target chip and waiting for confirmation of completion, and involves modification of the device's internal state, if persistent read mapping resources are fully reused, the completion confirmation process of the write operation and the concurrent access of the read operation share the same device-side mapping resource, which may block each other and affect overall throughput. Therefore, the aforementioned persistent mapping resource is non-persistent for write requests. In this embodiment, write requests are allowed to be reused as host-side mapping resources already established in the local address space of the target scheduling node, but temporary device-side forwarding resources need to be temporarily established for the write request. That is, for a write request, on the one hand, the mapping resource description information stored in the target slot can be read, and the corresponding host-side mapping resource can be located from the host-side resource pool through the first index information in the mapping resource description information; on the other hand, a temporary device-side forwarding resource is dynamically established; then, access is performed based on the temporary device-side forwarding resource and the host-side mapping resource, and the temporary device-side forwarding resource is released after the write request access is completed.
[0099] This approach preserves the independence of write access control on the device side while avoiding contention for new host-side mapping resources within the same local address space, thus reducing resource contention. Device-side temporary forwarding resources, also known as address translation resources, are temporarily allocated when a write request arrives. They are used to forward write data from the BAR address space corresponding to the host-side mapping resource to the target scheduling node's local address space. Device-side temporary forwarding resources are transient, valid only within the processing cycle of the current write request. Their lifecycle is tied to a single write request; they are released and returned to the device-side resource pool after the write request is completed. Device-side temporary forwarding resources are not associated with slots and are not recorded in the slot's mapping resource description information.
[0100] Furthermore, write requests only utilize host-side mapping resources if persistent mapping resources already exist in the local address space of the target scheduling node. The write request itself does not drive the establishment of persistent mapping resources in the local address space of the target scheduling node, i.e., it does not drive slot allocation for hotspot objects. This restriction avoids repeated triggering of slot creation and reclamation by large amounts of short-term write traffic, thereby preventing write traffic from interfering with the processing strategy based on read frequency to identify hotspot objects. This ensures that slot resources serve truly high-frequency read hotspots, achieving coordinated optimization of read path persistence and on-demand write path allocation.
[0101] In step S406, for the cases described in steps S403-S405 regarding the existence of a target slot, or the cases described in subsequent steps S408-S411, after a read request or write request completes its access, the information items related to the target slot and the target scheduling node are updated. For example, the recent access time of the target scheduling node's local address space can be updated to the initiation or completion time of this access; the access count of the target scheduling node's local address space can be updated, incrementing both the cumulative access count and the access count within the time window by 1; the heat value can be recalculated based on the updated access count and the recent access time, and the heat value of the target scheduling node's local address space can be updated; and the reference count of the mapping resources associated with the target slot can be updated. Specifically, when a write request borrows a host-side mapping resource, the reference count of the host-side mapping resource is incremented by 1; after the write request completes its access, the reference count of the host-side mapping resource is decremented by 1. When a read request uses a persistent mapping resource, the reference counts of both the host-side and device-side mapping resources are incremented by 1; after the read request completes its access, the reference counts of both the host-side and device-side mapping resources are decremented by 1.
[0102] Optionally, regarding step S407, if the access object identifier does not match the service object information of any slot in a ready state, it is determined that at least one slot does not have a target slot allocated to the target scheduling node. In other words, if at least one slot does not have any slot in a ready state whose service object information matches the target die identifier and target scheduling node identifier in this access request, it indicates that no target slot is allocated to the target scheduling node, and no mapping resource has been established for the target scheduling node's local address space. That is, the target scheduling node currently does not occupy any slot in the mapping slots and does not have persistent mapping resources available for direct use. In this case, it is necessary to establish mapping resources for the target scheduling node's local address space in real time so that this access request can be forwarded to the corresponding target scheduling node for normal access.
[0103] The target scheduling node may not be a priority allocation target, or it may be a priority allocation target but has not yet been allocated a slot. In this case, it is necessary to obtain the target dynamic attributes of the target scheduling node, determine whether the target dynamic attributes of the target scheduling node meet the set conditions, and determine whether the local address space of the target scheduling node is a priority allocation target, so as to decide whether to allocate persistent mapping resources to the target scheduling node.
[0104] In some optional implementations, taking access popularity as an example, determining whether a target scheduling node is a hot object (a priority allocation object) includes: obtaining popularity statistics information, determining whether the target scheduling node meets popularity conditions, and if it meets the popularity conditions, then the target scheduling node is a hot object. If it does not meet the popularity conditions, then the target scheduling node is a cold object, not a hot object. Popularity conditions include, but are not limited to: access count greater than or equal to a preset access count threshold, or popularity value greater than or equal to a preset popularity threshold, or the difference between the most recent access time and the current time less than a preset time threshold. When at least one of the popularity conditions is met, the target scheduling node is determined to meet the popularity conditions, that is, the target dynamic attribute of the target scheduling node is determined to meet the set conditions.
[0105] The local processing unit maintains popularity statistics for each scheduling node, including but not limited to access count, recent access time, and popularity value. Popularity statistics characterize the access popularity of the target scheduling node and can determine the dynamic attributes of the access popularity dimension. Whether a target scheduling node meets the popularity criteria can be determined based on the number of accesses, the recent access time, or a combination of both.
[0106] For example, when determining whether a hotness condition is met based on the number of accesses, the number of accesses to the local address space of the target scheduling node can be counted within a preset time window. For instance, the number of accesses within the previous 5 minutes can be counted. If the number of accesses is greater than or equal to a preset threshold, the target scheduling node is determined to meet the hotness condition and is a hot object. If the number of accesses is less than the preset threshold, the target scheduling node is determined not to meet the hotness condition and is a non-hot object, i.e., a cold object.
[0107] For example, when determining whether a hotness condition is met based on the most recent access time, the time when the local address space of the target scheduling node was last accessed can be obtained, and the time difference between the last access time and the current time can be calculated. If the time difference is less than or equal to a preset time difference threshold, the target scheduling node is determined to meet the hotness condition and is a hot object. If the time difference is greater than the preset time difference threshold, the target scheduling node is determined not to meet the hotness condition and is a non-hot object.
[0108] For example, when determining whether a hotness condition is met by combining the number of visits and the most recent access time, corresponding weight values are assigned to the number of visits and the most recent access time. Based on the number of visits, the most recent access time, and their respective weight values, the hotness value of the target scheduling node's local address space is calculated. Specifically, the higher the number of visits, the higher the hotness value; the smaller the time difference between the most recent access time and the current time, the higher the hotness value. The calculated hotness value is compared with a preset hotness threshold. If the hotness value is greater than or equal to the preset hotness threshold, the target scheduling node is confirmed as a hot object; if the hotness value is less than the preset hotness threshold, the target scheduling node is confirmed as a non-hot object.
[0109] If at least one slot does not have a target slot allocated to the target scheduling node, and the target scheduling node's target dynamic attributes meet the set conditions (i.e., the target scheduling node is the priority allocation target), then a target slot is allocated to the target scheduling node. The target scheduling node's mapping resource description information is written into and saved to the target slot, thus associating the target slot with the mapping resource corresponding to the mapping resource description information. Then, access requests are routed to the target scheduling node through the mapping resource corresponding to the mapping resource description information. In this way, associating the target scheduling node with a mapping resource in the target slot ensures the mapping resource is persistently retained, and subsequent accesses to the target scheduling node's local address space can directly reuse the mapping resource associated with the slot. The target slot is reclaimed when the target scheduling node's target dynamic attributes no longer meet the set conditions.
[0110] For steps S408-S411, in some optional implementations, the target scheduling node is the priority allocation object. Allocating a target slot to the target scheduling node and writing the mapping resource description information of the target scheduling node into the target slot includes: selecting an idle slot from at least one slot as the target slot, and changing the status of the target slot from idle to configured; in the configured state, writing the mapping resource description information of the target scheduling node into the target slot and saving it, and updating the status of the target slot from the configured state to the ready state.
[0111] When establishing mapping resources in real time, it is determined whether there are any idle slots in the mapping slots. If there are idle slots, the local processing unit acquires one of them as the target slot and assigns it to the target scheduling node. Then, the state of the target slot is changed from idle to configured. In the configured state, host-side mapping resources and device-side mapping resources are allocated to the target scheduling node. After generating a CPU-accessible view through hardware publishing, the corresponding mapping resource description information is recorded in the target slot. When the mapping resource is associated with the target slot, the state of the target slot is changed from configured to ready. Thus, the allocated mapping resource is persistently retained in the target slot, which establishes a persistent mapping resource for the target scheduling node. Notably, changing the state of the target slot to ready only after the mapping resource is associated with it avoids the concurrent execution flow from prematurely reusing intermediate resources that have not yet been fully established.
[0112] If no slots are available, the local processing unit selects a slot from the ready slots that meets the eviction criteria, reclaims the slot, and releases the mapped resources corresponding to the resource description information in the slot. After reclamation, the status of the slot is updated to idle. The idle slot is then designated as the target slot and reassigned to the target scheduling node. The mapped resources are then associated with the target slot for access.
[0113] In some alternative implementations, one or more of the following factors may be considered when selecting a slot to be replaced: popularity value, recent access time, number of accesses, retention weight of the computed wafer associated with the slot, whether there is currently a read access view, whether there is currently a write request borrowing the host-side mapped resource, and whether the current slot has entered the obsolescence state.
[0114] For example, the heat value corresponding to each slot in the ready state can be obtained, and the slot with the lowest heat value can be selected as the slot to be replaced. A low heat value means that the scheduling node served by the slot has a low access activity level, and there may be no access requests to access the local address space of the scheduling node at the current moment. Replacing the slot has a relatively small impact on the overall performance.
[0115] For example, the access count for each slot in the ready state can be obtained, and the slot with the fewest access counts can be selected as the slot to be replaced. The fewest access counts mean that the scheduling node served by this slot has been accessed the least frequently in the past period of time, the continuous demand for slot resources is weak, and the probability of access interruption caused by replacing this slot is low.
[0116] For example, the most recent access time of each slot in the ready state can be obtained, and the slot with the longest most recent access time from the current time can be selected as the slot to be replaced. The slot with the longest most recent access time from the current time means that the mapping relationship stored in the slot has not been used for a long time, and the possibility of it being accessed again in the near future is low, so the resource reclamation efficiency of replacing the slot is the highest.
[0117] For example, the retention weights of the compute dies associated with each slot in the ready state can be obtained, and the slot with the lowest retention weight can be selected as the slot to be replaced. The retention weight is used to indicate the retention priority of the compute die during the slot replacement process. The higher the retention weight, the less likely its associated slot is to be selected and recycled during replacement.
[0118] Because certain compute dies (such as those carrying PCIe controller logic within the target chip) handle more frequent foreground scheduling, state sampling, or anomaly recovery access, while access to other compute dies is more characterized by intermittent bursts, replacing all compute die slots indiscriminately could lead to high-frequency access dies incurring additional mapping and reconstruction latency due to frequent slot reclamation. Therefore, this application introduces retention weights associated with compute dies to provide differentiated retention protection for specific compute dies during slot replacement.
[0119] In one implementation, a retention weight is assigned to each compute die. A higher retention weight is set for a specific compute die, giving its occupied slot a higher retention priority during replacement. The remaining compute dies can be assigned lower retention weights, allowing their occupied slots to be reclaimed preferentially when needed. In another implementation, at least one slot can be permanently reserved to specifically serve a particular compute die, while the remaining slots are dynamically shared by other compute dies. This approach balances local low-latency guarantees with global resource utilization in scenarios where specific compute dies are accessed more frequently and latency is more critical.
[0120] For example, it can be checked whether each slot in the ready state currently has a read access view, and slots with no read access views or fewer read access views are preferentially selected as slots to be replaced. A read access view means that the mapping relationship corresponding to the slot is currently being used by an execution flow. The read access view is in an established, valid, and serviceable state, meaning that the execution flow may initiate a read operation through the read access view at any time, but it is not required that there is actually read traffic at that moment. The existence of a read access view means that the slot is currently occupied by an execution flow. If the slot is replaced, it may cause errors or delays in the ongoing read operation. Therefore, preferentially selecting slots without read access views for replacement can avoid affecting the established read access execution flow and ensure the correctness of read operation execution and the stability of access latency.
[0121] For example, it can be checked whether any write path is currently borrowing host-side mapped resources in each slot that is in the ready state. Slots with no or minimal write path resource borrowing are prioritized for replacement. The existence of write path resource borrowing means that a write operation is currently using the mapped resource associated with that slot. If this resource is released before the write operation is completed, it may lead to data inconsistency or access anomalies. Therefore, prioritizing the replacement of slots without write path resource borrowing avoids impacting ongoing write operations.
[0122] For example, it can be checked whether any slots in the ready state are currently in the process of being phased out. If a slot is in the process of being phased out, the process waits for the slot to complete its recycling process and then checks whether the slot has been ultimately assigned to the target scheduling node to be accessed. If the slot has been assigned to the target scheduling node, the slot and its associated mapped resources can be reused directly. If the slot has not been assigned to the target scheduling node, the process of selecting a replacement slot continues. In this way, repeated allocation operations on the same scheduling node can be avoided, reducing the risk of resource conflicts and allocation failures.
[0123] In practical applications, the slot to be replaced can be selected based on any one of the above factors; multiple factors can be comprehensively judged according to a preset priority order; or one or more factors can be selected, weighted separately, and a comprehensive score can be calculated, and the slot to be replaced can be selected based on the comprehensive score. This application does not limit this.
[0124] The following describes the recycling process. Recycling a slot to be replaced includes: changing the status of the slot to be replaced to "in the process of being phased out"; in the "in the process of being phased out" state, waiting for the in-transit access requests that reference the mapping resource description information corresponding to the slot to be replaced to finish; when all in-transit access requests corresponding to the slot to be replaced have been processed and the corresponding reference count has reached zero, deleting the mapping resource description information stored in the slot to be replaced, and releasing the mapping resource associated with the slot to be replaced.
[0125] Specifically, the status of the slot to be replaced is changed to "retirement," preventing new reuse from entering. This means no new read access hits or write borrowing requests are accepted, ensuring that no execution flow uses the slot to be replaced for new access. In the "retirement" state, the system waits for in-transit read access views associated with the slot to exit and for all borrowing of host-side mapped resources associated with the slot by the write path to complete.
[0126] Specifically, when all read requests that have been initiated through the slot to be replaced but have not yet returned data have completed and returned data, the in-transit read access view is considered to have exited. For example, the local processing unit can determine this by maintaining a read access reference count; when the read access reference count reaches zero, it indicates that there is no in-transit read access view. When all write operations borrowing host-side mapped resources associated with the slot to be replaced have completed data writing and received completion confirmation from the target scheduling node, the write borrowing is considered to have ended. For example, the local processing unit can determine this by maintaining a write borrowing count; when the write borrowing count reaches zero, it indicates that there is no write path borrowing. Based on this, the device-side and host-side mapped resources associated with the slot to be replaced are reclaimed in a preset order. In the resource management bitmap, the mapped resources originally occupied by the slot to be replaced are marked as free. After resource reclamation is completed, all information items of the slot to be replaced are cleared, and the state machine field of the slot to be replaced is updated to free, thereby changing the state of the slot to be replaced to free, making it available for reallocation. Then, the slot to be replaced is assigned to the target scheduling node, and the slot to be replaced can be used to establish a persistent mapping resource for the local address space of the target scheduling node.
[0127] If a slot to be replaced is marked as idle before the read view has exited, the write path borrowing has ended, or the underlying resources have been truly reclaimed, there will still be incomplete access requests referencing the old mapped resources. New access requests may prematurely reuse the slot, and the new creation flow will overwrite resources that have not been fully released, leading to invalid old access paths, mismatched old and new mapped resources, and even inconsistent hardware states. In this embodiment, the slot state is published as idle only after all references have been released and the underlying resources have been reclaimed. This ensures that all access paths associated with the slot have naturally disappeared, guaranteeing the security and consistency of the slot reuse process.
[0128] In some optional implementations, when a slot encounters resource allocation failure, configuration failure, waiting failure, timeout, or other abnormal situations during slot creation, the current access request is not directly terminated in a failed state. Instead, a degradation and rollback mechanism is triggered, and the original dynamic mapping path is used to process the current access request. Optionally, after creation failure, the slot is marked as invalid and a reset process is triggered. After the internal state is cleaned up, it is restored to an idle state. If new hot requests are generated subsequently, the slot can still participate in allocation as a candidate resource.
[0129] Through this exception handling mechanism, even if slot creation fails, the normal response of access requests can still be guaranteed through the original dynamic mapping path. The original access capability will not be destroyed due to a slot creation failure. The slot will not be permanently locked or abandoned due to a single creation failure, thereby improving the system's robustness and resource utilization under limited resource conditions.
[0130] It should be noted that for a given slot, only one execution flow is allowed to acquire the right to create that slot. In other words, at any given time, the local processing unit only responds to the access request of one execution flow, switching the slot from an idle state to a configured state. This avoids concurrent processing of the same slot by multiple execution flows, which could lead to resource contention and state inconsistencies. The local processing unit responds to the access request of the execution flow that has acquired the creation right and executes the resource mapping creation process for that execution flow.
[0131] In the configured state, if access requests from other execution flows hit the same hot object or the same slot, the local processing unit returns a "creating mapping resource" response or status code to these execution flows, without repeating the status change or resource binding operation for that slot. Upon receiving the response, other execution flows decide at the software level whether to wait, retry, or follow another processing path. For example, execution flows choosing to wait can continuously monitor slot status changes using a polling method; if the slot completes its creation process and transitions to a ready state, other execution flows can directly use the established mapping resource in that slot to access the corresponding target scheduling node's local address space. If slot creation fails, other execution flows no longer wait for that slot and can attempt to acquire other available slots. Here, "execution flow" refers to an execution unit capable of independently initiating access requests, including but not limited to processes or threads running on the host CPU or other hardware or software execution contexts with independent access capabilities.
[0132] For steps S412-S414, for the target slot allocated to the target scheduling node, the target dynamic attributes of the target scheduling node can be continuously monitored to see if they meet the set conditions. If the target dynamic attributes of the target scheduling node continuously meet the set conditions, the target slot remains in a ready state for reuse by subsequent requests. When it is detected that the target dynamic attributes of the target scheduling node no longer meet the set conditions, the target slot can be reclaimed. Specifically, reclaiming a target slot can be implemented as follows: monitor the in-transit access requests for the target slot; when all in-transit access requests corresponding to the target slot have been processed and the corresponding reference count has reached zero, delete the mapping resource description information stored in the target slot and release the mapping resource associated with the target slot. The reclamation process for this target slot is the same as the reclamation process for the slot to be replaced described above, and will not be repeated here.
[0133] Regarding step S415, if at least one slot does not have a target slot allocated to the target scheduling node, and the target dynamic attribute of the target scheduling node does not meet the set conditions (i.e., the target scheduling node is not a priority allocation target), then the original dynamic mapping path is used to process the current access request. This involves allocating and configuring temporary forwarding resources for the target scheduling node, forwarding the access request to the target scheduling node based on these temporary forwarding resources, and releasing the temporary forwarding resources after the access request is processed, without occupying the slot resources of the mapping slot. The temporary forwarding resources include temporarily allocated host-side mapping resources and temporarily allocated device-side mapping resources, used to establish a complete address translation path from the CPU address required for this access to the local address range of the target scheduling node. For the situation described in step S415, after the access ends, information related to the target scheduling node's dynamic attributes is updated, such as the most recent access time, access count, or popularity value.
[0134] In summary, in an architecture where the target chip contains multiple computing dies and each computing die contains multiple scheduling nodes, the underlying device-side mapping resources are limited, making it difficult to bind a set of persistent mapping resources to each computing die in a long-term fixed manner. The access request processing method provided in this application embodiment can effectively improve the utilization rate of mapping resources in various access scenarios.
[0135] For example, one access scenario is as follows: the host-side scheduling service needs to periodically read the task queue status, scheduling tokens, ready flags, or anomaly recovery information from multiple computing dies. Furthermore, the job batches corresponding to different computing dies are not synchronized. Consequently, only a few computing dies experience sustained high-frequency access during a certain period, while other computing dies only exhibit occasional access. In this case, the dynamic shared slot mechanism provided in this application embodiment allows scheduling nodes with high-frequency access to prioritize occupying slots and obtaining persistent mapping resources, while nodes with occasional access release or are not allocated slots. This satisfies high-frequency access requirements while avoiding long-term resource idleness and waste.
[0136] For example, another access scenario is as follows: In the target chip, certain specific computing dies responsible for foreground scheduling or exception recovery will continuously generate high-frequency access requests, while other computing dies will mostly have intermittent burst access. In this case, the bias retention mechanism provided in this application can give higher retention priority to the slots of specific computing dies during the replacement process, avoiding additional mapping and reconstruction latency due to frequent slot reclamation. At the same time, the remaining slots are still dynamically shared by multiple computing dies, balancing local low latency protection and global resource utilization.
[0137] For example, another access scenario is as follows: During mixed read / write access, a read request for a computing chip has already hit the local address space of a scheduling node, and a write request needs to perform a short-term update on the same local address range. In this case, the write request can reuse the host-side mapping resources already established by the read request, and only needs to temporarily establish device-side forwarding resources to complete the access, avoiding the write request from competing for host-side mapping resources again in the mixed read / write scenario.
[0138] In summary, the access request processing method provided in this application allows limited slots to dynamically flow between multiple computing dies as the dynamic attributes of the scheduling node change. This eliminates the need to dynamically establish a mapping for each access and effectively avoids each computing die monopolizing persistent mapping resources. This reduces the risk of limited mapping resources (such as the BAR window on the device side) being exhausted and also avoids the imbalance problem where some computing dies occupy resources but are idle, while others need resources but lack sufficient resources.
[0139] Furthermore, the target scheduling node may simultaneously receive access requests from different execution flows, write operations may occur intermittently at any time, and slot creation and eviction operations may alternate, resulting in a complex concurrent scenario for access and resource management. In such a complex scenario, the embodiments of this application ensure that the same scheduling node is not repeatedly established with a persistent mapping through unique creation control, delay the release of resources during the eviction process through silent reclamation to ensure that unfinished access requests can be executed normally, and revert to the dynamic mapping path through dynamic rollback in the event of creation failure or timeout to ensure uninterrupted access. Thus, the continuity of the access path and the consistency of the mapping state can still be maintained under the condition of multiple concurrent events.
[0140] Furthermore, the embodiments of this application do not require the address space to be contiguous across computing dies, nor do they require cross-die unified arrangement of the address spaces of multiple computing dies. Each computing die can manage the local address space of the scheduling node according to its own independent addressing method, which can support multiple computing dies to share the same set of finite persistent slots, and has good architectural adaptability and scalability.
[0141] The above method is executed by a local processing unit. For example, the processing unit may include the following functional units: request identification unit, dynamic attribute maintenance unit, slot management unit, creation control unit, reuse unit, borrowing unit, eviction control unit, silent recycling unit, and dynamic rollback unit.
[0142] The request identification unit is used to receive access requests for the local address space of the target scheduling node and to identify the target die and the target scheduling node associated with the access request.
[0143] The dynamic attribute maintenance unit is used to maintain the dynamic attribute information of the target scheduling node; and to obtain the dynamic attribute information of the target scheduling node, and to determine whether the target scheduling node is a priority allocation object based on the set conditions, and output the judgment result of whether to allocate a slot.
[0144] The slot management unit is used to maintain a mapping slot resource pool with a limited total physical capacity, manage the lifecycle status of each slot, and record multiple information items for each slot.
[0145] A control unit is created to acquire slot creation permissions when the target dynamic attributes of the target scheduling node meet the set conditions and there are currently available free slots. It then performs the allocation, binding, and hardware configuration of the mapping resources between the host side and the device side, establishes persistent mapping resources, and writes the corresponding mapping resource description information into the slot.
[0146] The reuse unit is used to enable subsequent access requests to the local address space of the target scheduling node to directly reuse the slot and its associated persistent mapping resources when the slot is in a ready state, without having to repeat the mapping creation process.
[0147] The borrowing unit is used to reuse the host-side mapped resources that have been established by the target scheduling node when a write request hits the local address space of the target scheduling node.
[0148] The elimination control unit is used to select a replacement slot from the currently ready slots when there are no free slots and a slot needs to be allocated for a new priority allocation object, according to a preset elimination strategy, taking into account one or more factors such as access popularity, recent access time, number of read access views, or retention weight.
[0149] The silent recycling unit is used to reclaim the host-side mapping resources and device-side mapping resources occupied by the slot in sequence when the target dynamic attributes of the target scheduling node occupying the slot no longer meet the set conditions, or when the slot is selected as a slot to be replaced, release the slot and update its status to idle.
[0150] The dynamic rollback unit is used to roll back the access request to the dynamic mapping path in various situations, such as when the target dynamic attribute of the target scheduling node does not meet the set conditions, when the persistent mapping resource fails to be established, or when the waiting for available slots times out. That is, after temporarily establishing the mapping relationship to complete the access, the resource is released immediately, ensuring that the access request can be processed normally under any circumstances.
[0151] It is understood that the above unit division is only an exemplary functional division method, and more or fewer functional units may be divided in the specific implementation. In addition, the above functional units can be independent physical modules, or they can be implemented by a combination of state fields, heat management logic, window configuration logic, waiting logic, and exit logic in the driver, etc., and this application does not limit them in this way.
[0152] For detailed functional descriptions of the above-mentioned units, please refer to the specific implementations of the same or corresponding descriptions in the foregoing embodiments, which will not be repeated here.
[0153] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can be executed by different devices. For example, the execution subject of steps S301 to S302 can be device A; or the execution subject of step S301 can be device A, and the execution subject of step S302 can be device B; and so on.
[0154] Furthermore, in some of the processes described in the above embodiments and accompanying drawings, multiple operations appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 11, 12, etc., are merely used to distinguish different operations and do not represent any execution order. Additionally, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first" and "second" in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0155] Furthermore, this application embodiment also provides a chip, including: one or more computing dies, each computing die including one or more scheduling nodes, the scheduling nodes being used to process access requests; at least one slot; and a processing unit configured to: receive an access request for accessing the local address space of a target scheduling node; if a target slot allocated to the target scheduling node exists in the at least one slot, read the mapping resource description information stored in the target slot, and route the access request to the target scheduling node through the mapping resource corresponding to the mapping resource description information. The target slot is configured to store the mapping resource description information corresponding to the target scheduling node while the target dynamic attribute of the target scheduling node meets a set condition.
[0156] Among them, the total physical capacity of at least one slot is less than the total physical capacity of the scheduling node in the chip.
[0157] Optionally, the chip supports multiple physical function configurations; each physical function is associated with and manages a dedicated slot group; wherein one or more computing dies corresponding to the same physical function share the slot group managed by the physical function, and the slot groups of different physical functions are isolated from each other to prevent slot competition between scheduling nodes that do not belong to the same physical function.
[0158] Optionally, the processing unit is further configured to: if it is detected that the target dynamic attribute of the target scheduling node does not meet the set conditions, then when all in-transit access requests corresponding to the target slot have been processed and the corresponding reference count has been zeroed, delete the mapping resource description information stored in the target slot and release the mapping resource associated with the target slot.
[0159] Optionally, the processing unit is further configured to: if there is no target slot allocated to the target scheduling node in at least one slot, and the target dynamic attribute of the target scheduling node meets the set conditions, then allocate the target slot to the target scheduling node; write the mapping resource description information of the target scheduling node into the target slot and save it, so as to associate the target slot with the mapping resource description information corresponding to the mapping resource; and route the access request to the target scheduling node through the mapping resource corresponding to the mapping resource description information.
[0160] Optionally, the processing unit is further configured to: allocate temporary forwarding resources to the target scheduling node if the target dynamic attributes of the target scheduling node do not meet the set conditions; forward the access request to the target scheduling node based on the temporary forwarding resources; and release the temporary forwarding resources after the access request is processed.
[0161] Optionally, when allocating a target slot to a target scheduling node and writing and saving the mapping resource description information of the target scheduling node into the target slot, the processing unit is specifically configured to: if there is an idle slot, select an idle slot from at least one slot as the target slot, and change the status of the target slot from idle to configured; in the configured state, write and save the mapping resource description information of the target scheduling node into the target slot, and update the status of the target slot from configured to ready.
[0162] Optionally, the processing unit is further configured to: if there are no idle slots, select a slot that meets the elimination criteria from the slots in the ready state, and change the status of the slot to be replaced to the elimination state; in the elimination state, when all in-transit access requests corresponding to the slot to be replaced have been processed and the corresponding reference count has reached zero, delete the mapping resource description information in the slot to be replaced, and release the mapping resource associated with the slot to be replaced; update the status of the slot to be replaced to the idle state, and allocate the idle slot to be replaced as the target slot to the target scheduling node.
[0163] Optionally, the mapping resources include host-side mapping resources and device-side mapping resources.
[0164] Optionally, if the access request is a read request, and the access request is routed to the target scheduling node through the mapping resource corresponding to the mapping resource description information, the processing unit is specifically configured to: obtain the host-side mapping resource and the device-side mapping resource through the mapping resource description information; and forward the read request to the target scheduling node through the host-side mapping resource and the device-side mapping resource.
[0165] Optionally, if the access request is a write request, when the access request is routed to the target scheduling node through the mapping resource corresponding to the mapping resource description information, the processing unit is specifically configured to: dynamically establish a device-side temporary forwarding resource and obtain the host-side mapping resource through the mapping resource description information; and forward the write request to the target scheduling node through the host-side mapping resource and the device-side temporary forwarding resource.
[0166] Figure 5 This is a schematic diagram of the structure of an access request processing apparatus provided as another exemplary embodiment of this application. For example... Figure 5 As shown, the access request processing device includes a receiving module 510 and an access processing module 520.
[0167] The receiving module 510 is used to receive an access request for accessing the local address space of the target scheduling node, which is located on the target computing die in the target chip.
[0168] The access processing module 520 is used to read the mapping resource description information stored in the target slot if there is a target slot allocated to the target scheduling node in at least one slot, and to route the access request to the target scheduling node through the mapping resource corresponding to the mapping resource description information.
[0169] For detailed functional descriptions of the above modules, please refer to the specific implementations described in the foregoing embodiments, which will not be repeated here. Optionally, the access request processing device provided in this embodiment can be applied to the target chip provided in the above embodiments.
[0170] Figure 6 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Figure 6 As shown, the computing device includes a memory 61 and a processor 62.
[0171] Memory 61 is used to store computer programs and can be configured to store various other data to support operation on the computing device. Examples of this data include instructions, data structures, messages, images, videos, etc., for any application or method used to operate on the computing device.
[0172] Processor 62, coupled to memory 61, is used to execute the computer program in memory 61 to implement the steps in the access request processing method described above. Detailed descriptions of each step in the access request processing method can be found in the foregoing embodiments and will not be repeated here.
[0173] Furthermore, such as Figure 6 As shown, the computing device also includes other components such as a communication component 63 and a power supply component 64. Figure 6 The diagram only shows some components and does not mean that the computing device includes only these components. Figure 6 The components shown.
[0174] The aforementioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0175] The aforementioned communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel.
[0176] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.
[0177] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to implement the steps in the above-described method embodiments. The computer-readable storage medium includes volatile or non-volatile components, or a combination thereof, and can be removable or non-removable. Examples of computer-readable storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random-access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), flash memory or other memory technologies, CD-ROM, digital video disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium.
[0178] Accordingly, this application also provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the processor is enabled to implement the steps in the above method embodiments. It should be understood that each step or combination of steps in the above method flow can be implemented by the computer program or instructions. Furthermore, these computer programs or instructions can be applied to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device, enabling the processor of the general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to function as an apparatus for implementing the corresponding functions in the above method embodiments.
[0179] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0180] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. An access request processing method, characterized in that, include: Receive an access request, the access request being used to access the local address space of a target scheduling node, the target scheduling node being located on a target computing die in a target chip, the target chip having at least one slot; If there is a target slot allocated to the target scheduling node in the at least one slot, read the mapping resource description information stored in the target slot, and route the access request to the target scheduling node through the mapping resource corresponding to the mapping resource description information; The target slot is configured to store the mapping resource description information corresponding to the target scheduling node during the period when the target dynamic attribute of the target scheduling node meets the set conditions.
2. The method according to claim 1, characterized in that, The method further includes: If the target dynamic attribute of the target scheduling node does not meet the set conditions, then when all in-transit access requests corresponding to the target slot have been processed and the corresponding reference count has been reduced to zero, the mapping resource description information stored in the target slot is deleted and the mapping resource associated with the target slot is released.
3. The method according to claim 1, characterized in that, The method further includes: If there is no target slot allocated to the target scheduling node among the at least one slots, and the target dynamic attribute of the target scheduling node meets the set conditions, then the target slot is allocated to the target scheduling node; Write the mapping resource description information of the target scheduling node into the target slot and save it, so as to associate the target slot with the mapping resource corresponding to the mapping resource description information; The access request is routed to the target scheduling node using the mapping resource corresponding to the mapping resource description information.
4. The method according to claim 1, characterized in that, The method further includes: If the target dynamic attributes of the target scheduling node do not meet the set conditions, temporary forwarding resources are allocated to the target scheduling node. Based on the temporary forwarding resource, the access request is forwarded to the target scheduling node, and the temporary forwarding resource is released after the access request is processed.
5. The method according to claim 3, characterized in that, The step of allocating a target slot to the target scheduling node, writing the mapping resource description information of the target scheduling node into the target slot, and saving it includes: If there is an idle slot, select an idle slot from the at least one slot as the target slot, and change the status of the target slot from idle to configured. In the configured state, the mapping resource description information of the target scheduling node is written into the target slot and saved, and the state of the target slot is updated from the configured state to the ready state.
6. The method according to claim 5, characterized in that, The method further includes: If there are no idle slots, select a slot that meets the elimination criteria from the ready slots and change the status of the slot to be replaced to elimination. In the process of being phased out, when all in-transit access requests corresponding to the slot to be replaced have been processed and the corresponding reference count has been reduced to zero, the mapping resource description information in the slot to be replaced is deleted and the mapping resource associated with the slot to be replaced is released. The status of the slot to be replaced is updated to idle, and the idle slot to be replaced is assigned as the target slot to the target scheduling node.
7. The method according to any one of claims 1 to 6, characterized in that, The access request carries an access object identifier, and the method further includes: The access object identifier is matched with the service object information of each slot that is in the ready state; If the access object identifier matches the service object information of any slot in the ready state, it is determined that there is a target slot allocated to the target scheduling node in the at least one slot, so as to reuse the target slot.
8. The method according to claim 7, characterized in that, The method further includes: If the access object identifier does not match any service object information of a slot in a ready state, it is determined that there is no target slot allocated to the target scheduling node in the at least one slot.
9. The method according to any one of claims 1 to 6, characterized in that, The method further includes: Obtain the target dynamic attributes, which include at least one of the following: the number of accesses to the local address space of the target scheduling node, the recent access time, and the popularity value; The target dynamic attribute of the target scheduling node is determined to satisfy the set condition when at least one of the following conditions is met; Among them, at least one of the following conditions includes: the number of visits is greater than or equal to a preset number of visits threshold, or the difference between the most recent visit time and the current time is less than a preset time threshold, or the popularity value is greater than or equal to a preset popularity threshold.
10. The method according to any one of claims 1 to 6, characterized in that, The mapping resources include host-side mapping resources and device-side mapping resources.
11. The method according to claim 10, characterized in that, The access request is a read request, and the step of routing the access request to the target scheduling node through the mapping resource corresponding to the mapping resource description information includes: The host-side mapping resources and device-side mapping resources are obtained through the mapping resource description information; The read request is forwarded to the target scheduling node using the host-side mapping resources and the device-side mapping resources.
12. The method according to claim 10, characterized in that, The access request is a write request, and the step of routing the access request to the target scheduling node through the mapping resource corresponding to the mapping resource description information includes: Dynamically establish temporary forwarding resources on the device side, and obtain the host-side mapped resources through the mapped resource description information; The write request is forwarded to the target scheduling node using the host-side mapping resource and the device-side temporary forwarding resource.
13. A chip, characterized in that, include: One or more compute dies, each compute die including one or more scheduling nodes, the scheduling nodes being used to process access requests; At least one slot; The processing unit is configured as follows: Receive an access request to access the local address space of the target scheduling node; if there is a target slot allocated to the target scheduling node in the at least one slot, read the mapping resource description information stored in the target slot, and route the access request to the target scheduling node through the mapping resource corresponding to the mapping resource description information; The target slot is configured to store the mapping resource description information corresponding to the target scheduling node during the period when the target dynamic attribute of the target scheduling node meets the set conditions.
14. The chip according to claim 13, characterized in that, The total physical capacity of at least one slot is less than the total physical capacity of the scheduling nodes in the chip.
15. The chip according to claim 13, characterized in that, The chip supports multiple physical function configurations; Each physical function is associated with and manages its own dedicated slot group; wherein, one or more computing dies corresponding to the same physical function share the slot group managed by the physical function, and the slot groups of different physical functions are isolated from each other to prevent slot competition between scheduling nodes that do not belong to the same physical function.
16. The chip according to any one of claims 13-15, characterized in that, The processing unit is further configured to: If the target dynamic attribute of the target scheduling node does not meet the set conditions, then when all in-transit access requests corresponding to the target slot have been processed and the corresponding reference count has been reduced to zero, the mapping resource description information stored in the target slot is deleted and the mapping resource associated with the target slot is released.
17. The chip according to any one of claims 13-15, characterized in that, The processing unit is further configured to: If there is no target slot allocated to the target scheduling node among the at least one slots, and the target dynamic attribute of the target scheduling node meets the set conditions, then the target slot is allocated to the target scheduling node; Write the mapping resource description information of the target scheduling node into the target slot and save it, so as to associate the target slot with the mapping resource corresponding to the mapping resource description information; The access request is routed to the target scheduling node using the mapping resource corresponding to the mapping resource description information.
18. The chip according to any one of claims 13-15, characterized in that, The processing unit is further configured to: If the target dynamic attributes of the target scheduling node do not meet the set conditions, temporary forwarding resources are allocated to the target scheduling node. Based on the temporary forwarding resource, the access request is forwarded to the target scheduling node, and the temporary forwarding resource is released after the access request is processed.
19. The chip according to claim 17, characterized in that, When allocating a target slot to the target scheduling node, writing the mapping resource description information of the target scheduling node into the target slot, and saving it, the processing unit is specifically configured as follows: If there is an idle slot, select an idle slot from the at least one slot as the target slot, and change the status of the target slot from idle to configured. In the configured state, the mapping resource description information of the target scheduling node is written into the target slot and saved, and the state of the target slot is updated from the configured state to the ready state.
20. The chip according to claim 19, characterized in that, The processing unit is further configured to: If there are no idle slots, select a slot that meets the elimination criteria from the ready slots and change the status of the slot to be replaced to elimination. In the process of being phased out, when all in-transit access requests corresponding to the slot to be replaced have been processed and the corresponding reference count has been reduced to zero, the mapping resource description information in the slot to be replaced is deleted and the mapping resource associated with the slot to be replaced is released. The status of the slot to be replaced is updated to idle, and the idle slot to be replaced is assigned as the target slot to the target scheduling node.
21. The chip according to any one of claims 13-15, characterized in that, The mapping resources include host-side mapping resources and device-side mapping resources.
22. The chip according to claim 21, characterized in that, The access request is a read request. When the access request is routed to the target scheduling node through the mapping resource corresponding to the mapping resource description information, the processing unit is specifically configured as follows: The host-side mapping resources and device-side mapping resources are obtained through the mapping resource description information; The read request is forwarded to the target scheduling node using the host-side mapping resources and the device-side mapping resources.
23. The chip according to claim 21, characterized in that, The access request is a write request. When the access request is routed to the target scheduling node through the mapping resource corresponding to the mapping resource description information, the processing unit is specifically configured as follows: Dynamically establish temporary forwarding resources on the device side, and obtain the host-side mapped resources through the mapped resource description information; The write request is forwarded to the target scheduling node using the host-side mapping resource and the device-side temporary forwarding resource.
24. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer programs; The processor, coupled to the memory, is configured to execute a computer program in the memory to implement the steps of the method according to any one of claims 1-12.
25. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it enables the processor to perform the steps of the method according to any one of claims 1-12.
26. A computer program product, characterized in that, Includes a computer program / instruction that, when executed by a processor, enables the processor to perform the steps of the method according to any one of claims 1-12.
