A request processing method and device

By introducing a duplicate detection unit in the SMMU, the access flow matching conditions of the access request is judged, and the pre-stored target configuration information is directly obtained, which solves the problem of increasing power consumption caused by frequent searching of configuration cache units during address conversion of SMMU, and reduces power consumption and improve response speed.

CN119172362BActive Publication Date: 2025-02-21SMARTER SILICON (SHANGHAI) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411676063.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-21
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

SMMU frequently looks up the configuration cache unit when performing address conversion, resulting in increased power consumption.

Method used

By introducing a duplicate detection unit into the system memory management module, it is determined whether the access request meets the access flow matching condition. If it is met, the pre-stored target configuration information will be directly obtained without looking for the configuration cache unit.

Benefits of technology

Reduces the number of searches for configuration cache units during address translation, reduces the power consumption of SMMU, improves response speed and reduces delay.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172362B_ABST
    Figure CN119172362B_ABST
Patent Text Reader

Abstract

The present application discloses a request processing method and device, the method comprising: obtaining a first access request; in response to the first access request satisfying an access flow matching condition, obtaining target configuration information of the access flow to which the first access request belongs; processing the first access request according to the target configuration information to obtain a first physical address corresponding to the first access request.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of request processing, and in particular to a request processing method and device. Background Art

[0002] The system memory management unit (SMMU) mainly realizes the conversion of virtual addresses (VA) issued by subsystem devices in the system into physical addresses (PA). Usually there are multiple subsystem devices in a system. SMMU can obtain the access request initiated by the subsystem to access the memory, convert the virtual address contained in the request into a physical address and output it, so that the subsystem can access the data of the corresponding physical address.

[0003] In the related art, the SMMU can cache configuration information in a configuration cache unit, and when receiving an access request from a subsystem, search the configuration cache unit for configuration information corresponding to the access request, and then implement the above-mentioned address conversion based on the found configuration information.

[0004] This solution requires frequent searches of the configuration cache unit when performing address translation, resulting in increased power consumption of the SMMU. Summary of the invention

[0005] To this end, this application discloses the following technical solutions:

[0006] The first aspect of the present application provides a request processing method, comprising:

[0007] Get the first access request;

[0008] In response to the first access request satisfying an access flow matching condition, obtaining target configuration information of the access flow to which the first access request belongs;

[0009] The first access request is processed according to the target configuration information to obtain a first physical address corresponding to the first access request.

[0010] Optionally, also include:

[0011] In response to the first access request not satisfying the access flow matching condition, searching for target configuration information corresponding to the first access request from a configuration cache unit;

[0012] The target configuration information found is saved as target configuration information of the access flow to which the first access request belongs.

[0013] Optionally, also include:

[0014] If the target configuration information is not found from the configuration cache unit, searching the system memory unit for the target configuration information corresponding to the first access request;

[0015] The found target configuration information is saved in the configuration cache unit, and the target configuration information is saved as target configuration information of the access flow to which the first access request belongs.

[0016] Optionally, the first access request satisfies an access flow matching condition including:

[0017] The access flow identifier of the first access request matches the access flow identifier of any queue;

[0018] Each of the queues has an access flow identifier, and configuration information corresponding to the access flow is stored in the queue corresponding to the access flow;

[0019] The obtaining target configuration information of the access flow to which the first access request belongs includes:

[0020] The target configuration information stored in the queue matched by the first access request is obtained as the target configuration information of the access flow to which the first access request belongs.

[0021] Optionally, also include:

[0022] In response to the first access request not satisfying the access flow matching condition, a queue corresponding to the access flow to which the first access request belongs is created, and the created queue is used to record the request identifier of the first access request, the access flow identifier of the access flow to which the first access request belongs, and the target configuration information of the access flow to which the first access request belongs found from the configuration cache unit or the system memory unit.

[0023] Optionally, also include:

[0024] In response to obtaining a second access request, a request identifier of the second access request is recorded in a queue corresponding to the access flow to which the first access request belongs, and the second access request and the first access request belong to the same access flow.

[0025] Optionally, also include:

[0026] When the target configuration information corresponding to the first access request is found from the configuration cache unit and / or the system memory unit, the target configuration information is stored in the created queue as the target configuration information of the access flow to which the first access request belongs;

[0027] The access requests corresponding to the request identifiers recorded in the created queue are processed one by one according to the target configuration information in the order of being enqueued.

[0028] Optionally, also include:

[0029] In response to an invalid operation instruction, deleting the invalid operation instruction to-be-cleared data stored in the queue;

[0030] When all data stored in any of the queues are deleted, the queues are deleted.

[0031] Optionally, also include:

[0032] When it is determined that configuration information corresponding to any access flow in the configuration cache unit or the system memory unit is updated, the target configuration information of the access flow to which the first access request belongs is replaced by the updated configuration information.

[0033] A second aspect of the present application provides a request processing device, including a system memory management module, wherein the system memory management module includes:

[0034] The duplication detection unit obtains a first access request; in response to the first access request satisfying an access flow matching condition, obtains target configuration information of the access flow to which the first access request belongs;

[0035] The page table conversion cache unit processes the first access request according to the target configuration information to obtain a first physical address corresponding to the first access request.

[0036] Optionally, the system memory management module further includes a configuration cache unit for storing configuration information;

[0037] The repetition detection unit is also used for:

[0038] In response to the first access request not satisfying the access flow matching condition, searching for target configuration information corresponding to the first access request from a configuration cache unit;

[0039] The target configuration information found is saved as target configuration information of the access flow to which the first access request belongs. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0041] Figure 1 is a flowchart of a request processing method provided by an embodiment of the present application;

[0042] Figure 2 It is a schematic diagram of a system structure provided in an embodiment of the present application;

[0043] Figure 3 is a structural diagram of a system memory management unit provided in an embodiment of the present application;

[0044] Figure 4 It is a schematic diagram of a queue provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0046] This application embodiment provides a request processing method, see Figure 1 , is a flow chart of the method, and the method may include the following steps.

[0047] S101, obtaining a first access request.

[0048] The method provided in this embodiment may be executed by a system memory management module (System Memory Management Unit, SMMU) of an electronic device.

[0049] See also Figure 2 SMMU can be connected to several subsystems through an interconnection network. The first access request can be an access request for accessing the memory sent by any subsystem through the interconnection network. The access request needs to be converted by SMMU.

[0050] The first access request may carry a virtual address that needs to be converted, which is recorded as the first virtual address. The first access request may also carry an access stream identifier (e.g., a stream ID), or an access stream identifier and a sub-access stream identifier (e.g., a sub-stream ID), wherein the access stream identifier is used to indicate which access stream the first access request belongs to, and the sub-access stream identifier is used to indicate which sub-access stream the first access request belongs to.

[0051] A subsystem may correspond to several access flows, each access flow may include several sub-access flows, and the first access request issued by the subsystem may belong to any access flow corresponding to the subsystem, and any sub-access flow of the access flow.

[0052] Among them, if the access flow to which the first access request belongs does not contain a sub-access flow, or only contains one sub-access flow, the first access request may not carry the sub-access flow identifier. If the access flow to which the first access request belongs contains multiple sub-access flows, the first access request may carry both the access flow identifier and the sub-access flow identifier.

[0053] S102: In response to the first access request satisfying an access flow matching condition, obtaining target configuration information of the access flow to which the first access request belongs.

[0054] Each access flow corresponds to specific configuration information for address translation, and different access flows correspond to different configuration information. When an access flow includes multiple sub-access flows, each sub-access flow corresponds to specific configuration information, and different sub-access flows correspond to different configuration information. When an access flow does not contain or contains only one sub-access flow, the access flow can correspond to only one configuration information. Among them, the configuration information of the access flow to which the first access request belongs is recorded as the target configuration information.

[0055] The access flow to which the first access request belongs may be a certain access flow (when the access flow does not contain a sub-access flow) or a sub-access flow of a certain access flow.

[0056] For example, the first access request may belong to access stream 1 or to access stream 2. When the first access request belongs to access stream 1, the first access request may specifically belong to sub-access stream 1 contained in access stream 1, or to sub-access stream 2 contained in access stream 1.

[0057] The access flow to which the first access request belongs can be determined based on the access flow identifier and / or sub-access flow identifier it carries. For example, if the first access request carries access flow identifier 1, it can be determined that it belongs to access flow 1 but not access flow 2. If the first access request carries both access flow identifier 1 and sub-access flow identifier 1, it can be determined that it belongs to sub-access flow 1 contained in access flow 1.

[0058] In this embodiment, see Figure 3 , the SMMU may include a configuration cache unit and a duplicate detection unit for configuring cache lookup duplicate detection. The duplicate detection unit may search for configuration information of any access stream and sub-access stream from the configuration cache unit of the SMMU, and may save the found configuration information.

[0059] In the initial state (for example, when it is just started), the duplicate detection unit may not save any configuration information. In this case, each time the duplicate detection unit obtains an access request, it may save the access flow identifier and / or sub-access flow identifier carried by the access request, and after determining that the access request does not meet the access flow matching conditions, initiate a search to the configuration cache unit and / or system memory unit, and then store the found configuration information of the access flow to which the access request belongs in the duplicate detection unit.

[0060] Therefore, the duplicate detection unit can store the configuration information of the access stream to which the access request belongs during the process of processing the access request. When the duplicate detection unit receives multiple access requests belonging to the same access stream or sub-access stream successively, it only needs to initiate an operation to search the configuration cache unit and / or the system memory unit when the first access request is received, and there is no need to search again for subsequently received access requests.

[0061] In S102, the duplicate detection unit can determine whether the first access request satisfies the access flow matching condition. If it is determined that the first access request satisfies the access flow matching condition, it means that the duplicate detection unit has searched the target configuration information of the access flow to which the first access request belongs from the configuration cache unit before obtaining the first access request. In this case, the target configuration information saved by the duplicate detection unit can be directly obtained without searching the configuration cache unit again.

[0062] In this embodiment, the duplication detection unit may determine whether the first access request satisfies the access flow matching condition according to the access flow identifier carried in the first access request.

[0063] When the duplicate detection unit saves the configuration information corresponding to any access flow found, it may also save the access flow identifier of the access flow. If the access flow is a sub-access flow, it may also save the sub-access flow identifier. When obtaining the first access request, the duplicate detection unit may compare the access flow identifier of the first access request with the access flow identifier saved in the duplicate detection unit, and compare the sub-access flow identifier of the first access request (if any) with the saved sub-access flow identifier.

[0064] If the access flow identifier and sub-access flow identifier of the first access request are consistent with an identifier saved in the duplicate detection unit, it can be determined that the first access request meets the access flow matching condition. If the access flow identifier and sub-access flow identifier of the first access request are inconsistent with the identifier saved in the duplicate detection unit, it can be determined that the first access request does not meet the access flow matching condition. If the access flow matching condition is met, the configuration information corresponding to the same identifier saved in the duplicate detection unit can be obtained as the target configuration information corresponding to the first access request, and there is no need to search for the target configuration information in the configuration cache unit, thereby reducing the number of times the configuration cache unit is searched.

[0065] Exemplarily, the duplicate detection unit may store configuration information 1 and configuration information 2, wherein configuration information 1 corresponds to access flow identifier 1 and sub-access flow identifier 1, indicating that the configuration information belongs to sub-access flow 1 of access flow 1, and configuration information 2 corresponds to access flow identifier 2, indicating that the configuration information belongs to access flow 2. If the first access request carries access flow identifier 1 and sub-access flow identifier 1, it can be determined through comparison that the first access request satisfies the access flow matching condition, and configuration information 1 is obtained as the target configuration information of access flow 1 and sub-access flow identifier 1 to which the first access request belongs. If the first access request carries access flow identifier 1 and sub-access flow identifier 2, it can be determined that the identifier of the first access request and the stored identifier are inconsistent, indicating that the duplicate detection unit has not accessed the memory address corresponding to the access flow to which the first access request belongs before receiving the first access request, and has not pre-stored the configuration information of the access flow to which the first access request belongs, and therefore determines that the first access request does not meet the access flow matching condition.

[0066] S103: Process the first access request according to the target configuration information to obtain a first physical address corresponding to the first access request.

[0067] For each access stream and sub-access stream, the corresponding target configuration information may include the starting position of the page table corresponding to the access stream and sub-access stream in the page table conversion cache unit of the SMMU.

[0068] In step S103, the SMMU can determine the page table of the access flow to which the first access request belongs in the page table conversion cache unit according to the target configuration information of the access flow to which the first access request belongs, and then obtain the conversion information required to convert the first virtual address in the page table, and then convert the first virtual address into the first physical address corresponding to the first access request according to the conversion information. The conversion method can be referred to the relevant technology and will not be repeated here.

[0069] The beneficial effects of this embodiment are:

[0070] When the first access request received meets the access flow matching condition, the target configuration information of the access flow can be obtained without searching the configuration cache unit. Therefore, this embodiment can reduce the number of times the configuration cache unit is searched when performing address conversion, thereby achieving the effect of reducing the power consumption of the SMMU.

[0071] In this embodiment, the duplicate detection unit needs to match an access request obtained with the information stored in the duplicate detection unit. However, the operation logic for determining whether the first access request satisfies the access flow matching condition in the duplicate detection unit is simpler than the search logic for searching the configuration information in the configuration cache unit. Correspondingly, the former consumes fewer resources than the latter. Therefore, reducing the number of searches for the configuration cache unit can bring greater benefits in saving power consumption, thereby achieving the effect of reducing power consumption, improving response speed, and reducing latency. In some optional embodiments, see Figure 1 When it is determined that the first access request does not meet the access flow matching condition, the duplicate detection unit can obtain the target configuration information of the access flow to which the first access request belongs through the following steps.

[0072] S104: In response to the first access request not satisfying the access flow matching condition, searching the configuration cache unit for target configuration information corresponding to the first access request.

[0073] The configuration cache unit can cache multiple configuration information, and cache the identifiers of access flows and sub-access flows corresponding to these configuration information. Exemplarily, the configuration cache unit can cache multiple configuration information as shown in Table 1.

[0074]

[0075] Among them, configuration information 3 belongs to sub-access flow 2 of access flow 1, and configuration information 4 belongs to access flow 3.

[0076] When it is determined that the first access request does not meet the access flow matching conditions, the duplication detection unit may compare the access flow identifier and sub-access flow identifier carried by the first access request with the identifiers cached in the configuration cache unit. If the access flow identifier carried by the first access request is consistent with an access flow identifier of the configuration cache unit, and the sub-access flow identifier carried is consistent with a sub-access flow identifier of the configuration cache unit, then it is determined that the first access request hits the configuration cache unit. At this time, the configuration information corresponding to the access flow identifier and sub-access flow identifier that are the same as those of the first access request in the configuration cache unit can be obtained as the target configuration information.

[0077] Combined with the example in Table 1, assuming that the first access request carries access flow identifier 1 and sub-access flow identifier 2, after comparison, it can be determined that the identifier carried by the first access request is consistent with the identifier in the first row of Table 1, so configuration information 3 can be obtained as the target configuration information corresponding to the first access request.

[0078] S105: Save the searched target configuration information as target configuration information of the access flow to which the first access request belongs.

[0079] After the target configuration information is found, on the one hand, step S103 can be executed based on the target configuration information, and on the other hand, step S105 can be executed to store the target configuration information in the duplicate detection unit, and store the access flow identifier of the access flow corresponding to the target configuration information. When the duplicate detection unit obtains another access request belonging to the same access flow as the first access request, the duplicate detection unit can directly obtain the target configuration information stored in S105 as the configuration information of the access flow to which the other access request belongs, and then convert the virtual address carried by the other access request into the corresponding physical address according to the target configuration information, thereby reducing the number of times the configuration cache unit is searched.

[0080] In some optional embodiments, if the first access request does not hit in the configuration cache unit, that is, the target configuration information is not found from the configuration cache unit, the SMMU can initiate a request to search the system memory unit for the target configuration information corresponding to the first access request; save the found target configuration information in the configuration cache unit, and save the target configuration information in the duplicate detection unit as the target configuration information of the access stream to which the first access request belongs.

[0081] The method of searching for target configuration information from the system memory unit can refer to the method of searching for target configuration information from the configuration cache unit and conventional techniques, which will not be described in detail here.

[0082] After finding the target configuration information, on the one hand, the first access request can be processed according to step S103 based on the found target configuration information. On the other hand, the found target configuration information can be stored in the configuration cache unit and the duplicate detection unit. When the duplicate detection unit obtains another access request that belongs to the same access stream as the first access request, the duplicate detection unit can directly obtain the stored target configuration information and process the other access request based on the target configuration information without having to search the configuration cache unit again, thereby reducing the number of times the configuration cache unit is searched.

[0083] In some optional embodiments, see Figure 4 The duplication detection unit can establish a corresponding queue for each access flow, or for each sub-access flow contained in an access flow, and use the queue to store and manage the configuration information corresponding to the access flow, the request identifier of the access request belonging to the access flow, and the access flow identifier of the access flow. In other words, each queue can have an access flow identifier of the access flow (or sub-access flow) corresponding to the queue, and each queue is distinguished by the access flow identifier, and the configuration information corresponding to the access flow is also stored in the queue corresponding to the access flow.

[0084] In order to store the above information through queues, a certain storage space may be allocated to the duplicate detection unit in advance, so that the duplicate detection unit can allocate the storage space to each queue.

[0085] For each queue, the duplicate detection unit can manage the request identifiers stored in the queue in a linked list. For example, the duplicate detection unit can use the request identifier first written into the queue as the head node of the linked list, and each request identifier written thereafter as a new node to be added to the linked list. When processing the request identifiers in the queue, the request identifiers of each node can be taken out one by one from the head node of the linked list and processed. After each time the request identifier of the head node is taken out, the next node can be updated as the head node, and so on, until all request identifiers in the queue are processed.

[0086] The number and capacity of queues can be determined based on the storage space size of the duplicate detection unit and the number of access flows. If the access requests obtained by the duplicate detection unit belong to multiple different access flows, the capacity of each queue can be reduced, thereby establishing more queues in a limited storage space to store the configuration information of multiple access flows respectively. If the access requests obtained belong to a few access flows and each access flow corresponds to a large number of access requests, the capacity of each queue can be increased and the total number of queues can be reduced, thereby storing the request identifiers of multiple access requests belonging to the same access flow in the queue.

[0087] In the case where configuration information corresponding to access flows is recorded in a queue manner, the duplicate detection unit may determine that any access request satisfies the access flow matching condition by determining that the access flow identifier of the access request matches the access flow identifier of any queue.

[0088] Taking the first access request as an example, Figure 4 , assuming that M queues have been established when the duplicate detection unit obtains the first access request, the duplicate detection unit can compare the access flow identifier and sub-access flow identifier carried by the first access request with the access flow identifier and sub-access flow identifier recorded by each queue in the M queues. If the access flow identifier and sub-access flow identifier carried by the first access request are consistent with the access flow identifier and sub-access flow identifier recorded by a queue in the M queues, the duplicate detection unit can determine that the first access request meets the access flow matching condition. At this time, the duplicate detection unit can obtain the target configuration information of the access flow to which the first access request belongs in the following manner:

[0089] The target configuration information stored in the queue matched by the first access request is obtained as the target configuration information of the access flow to which the first access request belongs.

[0090] Exemplarily, assuming that the first access request obtained carries access flow identifier 1 and sub-access flow identifier 11, the duplication detection unit compares the access flow identifier carried by the first access request with the access flow identifiers of M queues, and finds that the first access request and queue 1 have the same access flow identifier and sub-access flow identifier, so it is determined that the first access request meets the access flow matching condition. At this time, the configuration information 1 recorded in queue 1 can be obtained as the target configuration information corresponding to the first access request.

[0091] The duplicate detection unit can create a queue in the following ways:

[0092] When an access request is received and it is determined that the access request does not meet the access flow matching condition, a queue corresponding to the access flow to which the access request belongs is created.

[0093] In combination with the aforementioned embodiments, after determining that the first access request does not satisfy the access flow matching condition, the duplicate detection unit may, in response to the first access request not satisfying the access flow matching condition, create a queue corresponding to the access flow to which the first access request belongs, wherein the created queue is used to record the request identifier of the first access request, the access flow identifier of the access flow to which the first access request belongs, and the target configuration information of the access flow to which the first access request belongs found from the configuration cache unit or the system memory unit.

[0094] by Figure 4 For example, when the duplicate detection unit obtains the first access request, the duplicate detection unit has established M-1 queues. After the duplicate detection unit determines that the first access request does not meet the access flow matching condition, it can create a new queue M corresponding to the access flow to which the first access request belongs. Then, the duplicate detection unit can obtain the access flow identifier M and the sub-access flow identifier M1 carried by the first access request, and record these identifiers as queue tags (tags) of queue M in queue M to indicate that queue M corresponds to the sub-access flow M1 of the access flow, and the request identifier of the first access request (for example, request identifier M-1) can be recorded in queue M.

[0095] As described above, when it is determined that the first access request does not meet the access flow matching condition, the duplicate detection unit can search for the target configuration information corresponding to the first access request from the configuration cache unit and the system memory unit. Assuming that the duplicate detection unit finds configuration information M from the configuration cache unit or the system memory unit as the target configuration information corresponding to the first access request, the duplicate detection unit can store the target configuration information corresponding to the first access request by recording the configuration information M in the queue M. That is, when the target configuration information corresponding to the first access request is found from the configuration cache unit and / or the system memory unit, the duplicate detection unit can store the target configuration information in the created queue as the target configuration information of the access flow to which the first access request belongs.

[0096] In combination with the above example, after determining that the first access request does not meet the access flow matching condition and creating queue M, the duplicate detection unit searches the configuration cache unit and / or the system memory unit for the target configuration information corresponding to the first access request. After finding the target configuration information, the duplicate detection unit records the target configuration information in queue M. At this time, the target configuration information is equivalent to Figure 4 The configuration information M shown.

[0097] After creating a queue corresponding to the access flow to which the first access request belongs, if the duplicate detection unit receives a new access request that meets the access flow matching conditions, and the access request and the first access request belong to the same access flow, the duplicate detection unit may record the request identifier of the access request into the queue corresponding to the access flow to which the first access request belongs.

[0098] For example, in response to obtaining the second access request, the duplicate detection unit may record the request identifier of the second access request into the queue corresponding to the access flow to which the first access request belongs, and the second access request and the first access request belong to the same access flow.

[0099] In combination with the foregoing example, after the duplicate detection unit obtains the second access request, it can compare the access flow identifier of the second access request with the access flow identifiers of each queue to determine whether the second access request satisfies the access flow matching condition. If it is determined that the second access request satisfies the access flow matching condition, and it is determined during the comparison process that the access flow identifier M and the sub-access flow identifier M-1 carried by the second access request are consistent with queue M, then it can be determined that the second access request and the first access request belong to the same access flow, and then the request identifier of the second access request is added to the same queue as the first access request, that is, added to queue M.

[0100] For each access request received, when it is determined that the access request satisfies the access flow matching condition, the duplicate detection unit can add the request identifier of the access request to the corresponding queue in the above manner, which will not be repeated here.

[0101] In some embodiments, based on the established multiple queues, when the duplicate detection unit determines that the first access request meets the access flow matching condition, the request identifier of the first access request may be first recorded in the matching queue.

[0102] At the same time, for each queue, the duplicate detection unit can process the access requests corresponding to the request identifiers of each queue one by one in the order of entry. When processing the first access request, the duplicate detection unit obtains the target configuration information corresponding to the first access request from the queue to which it belongs, and executes the aforementioned step S103 based on the target configuration information.

[0103] by Figure 4For example, assume that when the first access request is obtained, queue 1 already has two request identifiers, which are request identifier 1-1 and request identifier 1-2 in the order of entering the queue. After determining that the access flow identifier carried by the first access request is consistent with the access flow identifier of queue 1, the duplicate detection unit records the request identifier 1-3 of the first access request into queue 1;

[0104] When processing the access request corresponding to queue 1, the duplicate detection unit can first read out the request identifier 1-1, perform the above-mentioned address conversion on the access request corresponding to the request identifier 1-1 based on the configuration information 1 recorded in queue 1, then read out the request identifier 1-2, process the access request corresponding to the request identifier 1-2 based on the configuration information 1, then read out the request identifier 1-3, obtain the configuration information 1 as the target configuration information of the first access request corresponding to the request identifier 1-3, process the first access request based on the configuration information 1, and obtain the corresponding first physical address.

[0105] In some implementations, the access request for each queue record may also be processed in a queue polling manner. Figure 4 For example, the duplicate detection unit can perform the following polling process on queue 1:

[0106] Determine whether there is a request identifier in queue 1. If there is no request identifier in queue 1, the polling process of queue 1 ends. If there is a request identifier in queue 1, read out the earliest request identifier in queue 1 and the configuration information of the queue in the order of enqueueing, and send it to the page table conversion cache unit to process the access request corresponding to the request identifier, and the polling process of queue 1 ends.

[0107] After the polling process of queue 1 is completed, the above polling process can be performed on queue 2, and then the above polling process can be performed on queue 3, and so on, until each queue is polled, and then each queue is polled one by one again starting from queue 1.

[0108] For each queue, the request identifiers in the queue can be processed in a first-in-first-out manner based on the order of linked list management. That is, each time a queue is polled, the earliest request identifier written in the queue is read out, that is, the request identifier of the head node of the linked list of the queue, and the request identifier is processed according to the above polling process.

[0109] In some embodiments, multiple queues may also be polled in other orders.

[0110] For example, each queue may be polled in the order in which the queues are established, that is, the first established queue is polled first, then the second established queue is polled, then the third established queue is polled, and so on, until the last established queue is polled, and then the polling starts again from the first established queue.

[0111] Each queue can be polled according to the target write time of each queue. The farther the target time of a queue is from the current time, the higher the order is when polling, that is, the queues with target times farther from the current time are polled first, and the queues with target times closer to the current time are polled later. Among them, the target time of a queue can be the write time of the last request identifier written in the queue.

[0112] Each queue can be polled according to its priority, with queues with higher priorities being polled first and queues with lower priorities being polled later. When the duplicate detection unit establishes a queue, the priority of the access flow corresponding to the queue can be used as the priority of the queue. The priority corresponding to each access flow can be determined based on the task involved in the access flow. For example, if the task involved in the access flow is related to the basic service of the system, the access flow can have a higher priority. If the task involved in the access flow is related to the user's personal application, the access flow can have a lower priority.

[0113] Based on the above-mentioned multiple order polling of multiple queues, access requests of specific access flows can be processed preferentially without increasing excessive power consumption as much as possible, thereby reducing access delay as much as possible.

[0114] In some embodiments, the duplicate detection unit may delete the data recorded in the queue or delete the queue in the following manner:

[0115] In response to the invalid operation instruction, deleting the invalid operation instruction to-be-cleared data stored in the queue;

[0116] When all data stored in any queue is deleted, delete the queue.

[0117] The data to be cleared can be specified in the Invalidate operation instruction in a variety of ways. For example, the data recorded in any one or more queues can be specified as the data to be cleared, the data recorded in a queue within a specific time period can be specified as the data to be cleared, and one or more access flow identifiers can be specified to use the data recorded in the queues corresponding to these access flow identifiers as the data to be cleared.

[0118] After obtaining the invalid operation instruction, the SMMU can delete the specified data to be cleared according to the instruction. After deleting the data to be cleared, the SMMU can determine whether the data recorded in each queue is deleted, and then delete the queues whose data is deleted.

[0119] In some embodiments, if the data in a queue is designated as data to be cleared, the SMMU may first process the access requests corresponding to the request identifiers recorded in the queue, obtain the physical address corresponding to each access request and output it, and then delete the queue and the data in the queue after processing all the request identifiers recorded in the queue.

[0120] In some embodiments, the duplicate detection unit may also delete the queue as follows:

[0121] Determine whether the current total number of queues is greater than the set upper limit of the number of queues. If the current total number of queues is greater than the upper limit of the number of queues, the duplicate detection unit may delete the queues created earlier one by one in the order of creation time until the current total number of queues is less than or equal to the upper limit of the number of queues. If the current total number of queues is less than or equal to the upper limit of the number of queues, the duplicate detection unit may not delete the queues.

[0122] The upper limit of the number of queues can be determined according to the available storage space of the duplicate detection unit. The larger the available storage space of the duplicate detection unit is, the larger the upper limit of the number of queues can be set.

[0123] Optionally, the SMMU may also update the configuration information stored in the duplicate detection unit in the following manner:

[0124] When it is determined that configuration information corresponding to any access flow in the configuration cache unit or the system memory unit is updated, the target configuration information of the access flow to which the first access request belongs is replaced by the updated configuration information.

[0125] The SMMU may determine that the configuration information stored in the configuration cache unit or the system memory unit is updated when receiving a request or notification to update the configuration information, or may determine that the configuration information stored in the configuration cache unit or the system memory unit is updated when an error occurs in an output physical address.

[0126] When it is determined that the configuration information corresponding to any access flow in the configuration cache unit or the system memory unit is updated, the SMMU can search the configuration cache unit or the system memory unit for the target configuration information of the access flow to which the first access request belongs, and replace the configuration information recorded in the queue of the access flow to which the first access request belongs in the duplicate detection unit with the found target configuration information.

[0127] Exemplarily, the access flow to which the first access request belongs corresponds to Figure 4 When it is determined that the configuration information corresponding to any access flow in the configuration cache unit or the system memory unit is updated, the SMMU can search the configuration cache unit or the system memory unit for the target configuration information of the access flow to which the first access request belongs, and replace the configuration information M recorded in the queue M with the found target configuration information.

[0128] Alternatively, when it is determined that the configuration information corresponding to any access flow in the configuration cache unit or the system memory unit is updated, the SMMU can search the configuration cache unit or the system memory unit for the target configuration information of the access flow to which the first access request belongs, and compare the found target configuration information with the configuration information of the access flow to which the first access request belongs recorded in the duplicate detection unit. If the two are consistent, it means that the configuration information of the access flow has not been updated and does not need to be replaced. If the two are inconsistent, the original configuration information of the duplicate detection unit is replaced with the found target configuration information.

[0129] The present application provides a request processing device, which may include Figure 3 The system memory management module shown includes:

[0130] The duplication detection unit obtains a first access request; in response to the first access request satisfying an access flow matching condition, obtains target configuration information of the access flow to which the first access request belongs;

[0131] The page table conversion cache unit processes the first access request according to the target configuration information to obtain a first physical address corresponding to the first access request.

[0132] Optionally, the system memory management module further includes a configuration cache unit for storing configuration information;

[0133] The Duplicate Detection Unit is also used to:

[0134] In response to the first access request not satisfying the access flow matching condition, searching the configuration cache unit for target configuration information corresponding to the first access request;

[0135] The target configuration information found is saved as the target configuration information of the access flow to which the first access request belongs.

[0136] The working principle of the above system memory management module can be found in the relevant steps of the request processing method in the above embodiment, which will not be described in detail.

[0137] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0138] For the convenience of description, the above system or device is described by dividing it into various modules or units according to its functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0139] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

[0140] Finally, it should be noted that, in this article, relational terms such as first, second, third and fourth are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0141] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A request processing method, comprising: Get the first access request; In response to the first access request satisfying an access flow matching condition, obtaining target configuration information stored in a queue matched by the first access request as target configuration information of the access flow to which the first access request belongs; Processing the first access request according to the target configuration information to obtain a first physical address corresponding to the first access request; Among them, the queue matching the first access request at least records the target configuration information of the access flow to which the first access request belongs found from the configuration cache unit or the system memory unit, and the target configuration information of the access flow to which the first access request belongs includes the starting position of the page table corresponding to the access flow in the page table conversion cache unit.

2. The method according to claim 1, further comprising: In response to the first access request not satisfying the access flow matching condition, searching for target configuration information corresponding to the first access request from a configuration cache unit; The target configuration information found is saved as target configuration information of the access flow to which the first access request belongs.

3. The method according to claim 2, further comprising: If the target configuration information is not found from the configuration cache unit, searching the system memory unit for the target configuration information corresponding to the first access request; The found target configuration information is saved in the configuration cache unit, and the target configuration information is saved as target configuration information of the access flow to which the first access request belongs.

4. The method according to claim 1, wherein the first access request satisfies the access flow matching condition comprising: The access flow identifier of the first access request matches the access flow identifier of any queue; Each of the queues has an access flow identifier, and configuration information corresponding to the access flow is stored in the queue corresponding to the access flow.

5. The method according to claim 3, further comprising: In response to the first access request not satisfying the access flow matching condition, a queue corresponding to the access flow to which the first access request belongs is created, and the created queue is used to record the request identifier of the first access request and the access flow identifier of the access flow to which the first access request belongs.

6. The method according to claim 5, further comprising: In response to obtaining a second access request, a request identifier of the second access request is recorded in a queue corresponding to the access flow to which the first access request belongs, and the second access request and the first access request belong to the same access flow.

7. The method according to claim 6, further comprising: When the target configuration information corresponding to the first access request is found from the configuration cache unit and / or the system memory unit, the target configuration information is stored in the created queue as the target configuration information of the access flow to which the first access request belongs; The access requests corresponding to the request identifiers recorded in the created queue are processed one by one according to the target configuration information in the order of being enqueued.

8. The method according to claim 4, further comprising: In response to an invalid operation instruction, deleting the invalid operation instruction to-be-cleared data stored in the queue; When all data stored in any of the queues are deleted, the queues are deleted.

9. The method according to claim 3, further comprising: When it is determined that configuration information corresponding to any access flow in the configuration cache unit or the system memory unit is updated, the target configuration information of the access flow to which the first access request belongs is replaced by the updated configuration information.

10. A request processing device, comprising a system memory management module, wherein the system memory management module comprises: A duplicate detection unit obtains a first access request; In response to the first access request satisfying an access flow matching condition, obtaining target configuration information stored in a queue matched by the first access request as target configuration information of the access flow to which the first access request belongs; A page table conversion cache unit processes the first access request according to the target configuration information to obtain a first physical address corresponding to the first access request; Among them, the queue matching the first access request at least records the target configuration information of the access flow to which the first access request belongs found from the configuration cache unit or the system memory unit, and the target configuration information of the access flow to which the first access request belongs includes the starting position of the page table corresponding to the access flow in the page table conversion cache unit.

11. The device according to claim 10, wherein the system memory management module further comprises a configuration cache unit for storing configuration information; The repetition detection unit is also used for: In response to the first access request not satisfying the access flow matching condition, searching for target configuration information corresponding to the first access request from a configuration cache unit; The target configuration information found is saved as target configuration information of the access flow to which the first access request belongs.

Citation Information

Patent Citations

  • Address request method based on GPU memory

    CN114610653A

  • RDMA network-oriented memory pool management method and system

    CN117009253A