Data processing system and data processing method

By sharing the register set of data storage components and hardware devices in the data processing system, dynamically managing message channels is solved, and the problem of low message channel management between data processing agents is achieved, efficient message delivery and system performance improvement is achieved.

CN111201516BActive Publication Date: 2024-11-26ARM LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201880066286.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2017-10-12
Filing Date
2018-09-04
Publication Date
2024-11-26
Estimated Expiration
2039-04-22

AI Technical Summary

Technical Problem

In data processing systems, it is difficult for the prior art to effectively manage and supervise the message channels between multiple data processing agents, resulting in inefficient message delivery and poor system performance.

Method used

By sharing data storage components between data processing agents, storing message data structures and message channel metadata, dynamically creating and managing different types of message channels, and using register set memory mapping of hardware devices to achieve supervision and state management of message channels.

Benefits of technology

It realizes efficient messaging and system performance improvement, supports parallel configuration and operation of multiple message channels, and improves communication efficiency and independence between data processing agents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111201516B_ABST
    Figure CN111201516B_ABST
Patent Text Reader

Abstract

A data processing system and a data processing method are provided. The system includes a first and a second data processing agent, and a data storage component coherently shared between the two data processing agents, the data storage component being used to store a message data structure to provide a message channel between the first and second data processing agents. Both data processing agents can access another data storage component, the other data storage component being used to store message channel metadata, the message channel metadata providing message state information of the message channel. The message channel metadata is one of a plurality of message channel metadata types defined for corresponding plurality of message channel types between the first and second data processing agents, and at least one of the first and second data processing agents establishes a message channel of the selected message channel type in response to an initialization trigger.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to data processing and more particularly to messaging in data processing systems. Background Art

[0002] In a data processing system, it may be necessary for multiple individual data processing agents to communicate with each other by exchanging messages. Depending on the application, these messages may have various contents, such as commands, confirmations, data for delegated processing, etc. These messages may be created by an originating agent and stored in a queue, from which they are then retrieved by a destination agent, for example, using a ring buffer in a shared memory. There are various ways to manage such a queue. Summary of the invention

[0003] In an example embodiment, there is a data processing system comprising: a first data processing agent and a second data processing agent; and a data storage component coherently shared between the first data processing agent and the second data processing agent, the data storage component being used to store message data structures for one or more messages to provide a message channel between the first data processing agent and the second data processing agent; and another data storage component accessible to the first data processing agent and the second data processing agent, the other data storage component being used to store message channel metadata, wherein the message channel metadata provides message status information of the message channel, and wherein the message channel metadata is one of a plurality of message channel metadata types defined for corresponding plurality of message channel types between the first data processing agent and the second data processing agent, and wherein at least one of the first data processing agent and the second data processing agent establishes a message channel having a selected message channel type in response to an initialization trigger.

[0004] In another example embodiment, there is a method of data processing, comprising: operating a first data processing agent; operating a second data processing agent; storing a message data structure for one or more messages in a data storage component, which data storage component is coherently shared between the first data processing agent and the second data processing agent; storing message channel metadata in another data storage component accessible to the first data processing agent and the second data processing agent, wherein the message channel metadata provides message status information of the message channel, and wherein the message channel metadata is one of a plurality of message channel metadata types defined for corresponding plurality of message channel types between the first data processing agent and the second data processing agent; and establishing a message channel having a selected message channel type in response to an initialization trigger.

[0005] In another example embodiment, there is a data processing system comprising: a device for operating a first data processing agent; a device for operating a second data processing agent; a device for storing a message data structure for one or more messages, wherein the device for storing the message data structure for one or more messages is coherently shared between the first data processing agent and the second data processing agent; a device for storing message channel metadata, wherein the device for storing the message channel metadata is accessible by the first data processing agent and the second data processing agent, wherein the message channel metadata provides message status information of the message channel, and wherein the message channel metadata is one of a plurality of message channel metadata types defined for corresponding plurality of message channel types between the first data processing agent and the second data processing agent; and a device for establishing a message channel having a selected message channel type in response to an initialization trigger. BRIEF DESCRIPTION OF THE DRAWINGS

[0006] The present technology will be further described, by way of example only, with reference to embodiments of the present technology illustrated in the accompanying drawings, in which:

[0007] Figure 1 A data processing system in one embodiment is schematically shown;

[0008] Figure 2 Schematically illustrates how memory mapping, coherently shared memory, and additional storage components are used to store message data structures and message channel state information in some embodiments;

[0009] Figure 3A Schematically illustrates a data processing system in one embodiment, wherein there is aliasing of some memory mapped register addresses on dedicated local peripherals associated with multiple processing elements;

[0010] Figure 3B Schematically illustrates a data processing system in one embodiment, wherein memory mapped register addresses used by multiple processing elements in the system are mapped to unique physical registers in a peripheral device;

[0011] Figure 4 schematically illustrates how a first type of message channel is provided in some embodiments, wherein a message data structure holding messages for the message channel is stored in a coherently shared memory, and all message channel metadata associated with the message channel is stored in an internal storage component of an accelerator unit;

[0012] Figure 5 shows a series of steps taken when a software task sends a message over a first type of channel in some embodiments;

[0013] Figure 6 shows a series of steps taken when a software task receives a message via a first type of message channel in some embodiments;

[0014] Figure 7 schematically illustrates how a second type of message channel is provided in some embodiments, wherein a message data structure holding messages for the message channel and a number of message channel metadata associated with the message channel are stored in a coherently shared memory, while notification registers are used in an internal storage component of an accelerator unit;

[0015] Figure 8 shows a series of steps taken when a software task sends a message via a second type of message channel in some method embodiments; and

[0016] Fig. 9 A series of steps are shown that are taken when a software task receives a message via a second type of message channel in some method embodiments. DETAILED DESCRIPTION

[0017] At least some embodiments provide a data processing system, comprising: a first data processing agent and a second data processing agent; and a data storage component, which is coherently shared between the first data processing agent and the second data processing agent, the data storage component being used to: store a message data structure for one or more messages to provide a message channel between the first data processing agent and the second data processing agent; and another data storage component accessible to the first data processing agent and the second data processing agent, the other data storage component being used to store message channel metadata, wherein the message channel metadata provides message status information of the message channel, and wherein the message channel metadata is one of a plurality of message channel metadata types defined for corresponding plurality of message channel types between the first data processing agent and the second data processing agent, and wherein at least one of the first data processing agent and the second data processing agent establishes a message channel having a selected message channel type in response to an initialization trigger.

[0018] The data processing system utilizes a coherently shared data storage component (e.g., a memory such as DRAM) to store a defined message data structure, wherein messages between the first and second data processing agents can be stored in the data storage component, and the first and second data processing agents can access the data storage component. The message can take a variety of forms, and can generally be simply considered throughout this disclosure as a certain type of data that a data processing agent wishes to send to another data processing agent. The data processing system also provides another data storage component, which is accessible to both the first and second data processing agents and is used to store message channel metadata associated with the message data structure stored in the coherently shared data storage component. Accessibility to both the first and second data processing agents can be provided in various ways, but in some embodiments, this is achieved by a memory mapping address within another data storage component.

[0019] There are multiple message channel types defined for the data processing system, and these message channel types can be established for message communication between data processing agents in the data processing system. The form and content of the message channel metadata vary according to the type of the message channel. The message channel can be dynamically created in the data processing system (through the instantiation of the message data structure in the data storage component and the corresponding message channel metadata in another data storage component). Therefore, at system startup, the message channel for communication between data processing agents established in the data processing system is not predefined, but the message channel can be created according to the needs of the data processing activities of the data processing system (in addition, the channel can be closed when it is no longer needed). In addition, different types of message channels may have different requirements in terms of storage requirements for supporting the type of message channel. When a new message channel is established in the data processing system (in response to an appropriate trigger that may take a variety of forms), the message channel type is selected according to the requirements of the message channel and the resources available to support the message channel.

[0020] In some embodiments, the data processing system is arranged to store a message interface data structure, wherein each message interface data structure defines a plurality of message channels established in a data storage component and another data storage component. Thus, a plurality of message channels can be bundled together in a message interface data structure. This facilitates the supervision of a plurality of message channels, for example, such that a group of message channels can be established in a single action (through the instantiation of a message interface data structure), and the configuration can be unilaterally applied by selecting the configuration for a plurality of message channels at the message interface data structure level.

[0021] In some embodiments, at least one of the first data processing agent and the second data processing agent defines a selected message channel type for the plurality of message channels by selecting the selected message channel type for the message interface data structure in response to the initialization trigger. Thus, one configuration of the plurality of message channels that can be unilaterally established is the selected message channel type, wherein when the message interface data structure is created, the properties of the message interface data structure can define the selected message channel type for each of the plurality of message channels defined by the message interface data structure.

[0022] In some embodiments, the data processing system is arranged to store multiple message interface data structures, and the selected message channel type for each of the multiple message interface data structures is independently set. The flexibility of the present technology is further extended to allow multiple message interface data structures to be established in the data processing system, so that multiple separate message channel groups can be established, wherein the selected message channel type for each of these groups can be independently set. In other words, multiple message channel types can be configured and operated in parallel within the data processing system.

[0023] In some embodiments, another data storage component accessible to the first data processing agent and the second data processing agent includes a set of registers in a hardware device in the data processing system, wherein a set of memory addresses is memory mapped to the set of registers. The other data storage component can take various forms in the data processing system, but providing the other data storage component as a set of registers in the hardware device and mapping the set of memory addresses in the data processing system to the set of registers is one way to achieve this purpose. Supervision of the message channel established in the data processing system can be performed in various ways, but this type of approach in which the other data storage component includes a set of registers in the hardware device can make it possible to increase the usefulness of the supervision performed by the hardware device. In the case where such hardware devices are explicitly provided to support message exchange in the data processing system, this thereby supports an efficient system, wherein the message state information provided by the message channel metadata stored in the other data storage component (i.e., here, the set of registers in the hardware device) enables the hardware device to effectively supervise the message channel.

[0024] In some embodiments, at least a subset of the set of memory addresses is memory mapped to multiple locations in the data processing system, and at least one of the multiple locations is in a peripheral device dedicated to the data processing device in the data processing system. In other words, such an embodiment allows these memory addresses to be aliased in the local peripheral device. For example, this approach can be used in the following embodiments: wherein, for performance reasons, it is desired that individual data processing agents in the data processing system can operate with greater independence relative to each other. For example, a data processing agent in a data processing system can access peripheral devices that other data processing agents in the system cannot access, and allowing the data processing agent to perform some of its operations on message channel data stored in its dedicated peripheral device can improve performance, for example, because of lower average access latency.

[0025] In some embodiments, each address in the set of memory addresses is memory mapped to a respective unique location in the data processing system. In other words, in such embodiments, there may be no aliasing such that the view of the memory mapped registers is consistent for all data processing agents in the data processing system. For example, this may facilitate the migration of a task performed by one data processing agent to be performed by another data processing agent.

[0026] In some embodiments, each unique location is in a single peripheral device in the data processing system. For example, if another data storage component in the message channel metadata is stored, multiple data processing agents in the data processing system can access the single peripheral device. This can be, for example, in the above-mentioned dedicated hardware device.

[0027] In some embodiments, at least one address in the set of memory addresses is memory mapped to a location in a plurality of peripheral devices in a data processing system, wherein the plurality of peripheral devices are arranged to implement a coherence mechanism to ensure consistent copies of the contents of registers in the set. Alternatively, another approach may therefore be taken, wherein aliasing is allowed to enable a plurality of peripheral devices to operate in parallel to improve performance, however consistency between message channel metadata stored in these plurality of peripheral devices may be achieved by means of the coherence mechanism.

[0028] In some embodiments, the set of registers includes a notification register for storing message channel metadata, wherein the value stored in the notification register provides message state information of the message channel, and wherein the hardware device performs a predetermined action on the message channel in response to the modification of the value stored in the notification register. Therefore, the memory-mapped notification register can act as a variety of "doorbells", wherein the value stored in the notification register can be modified in the data processing agent in the data processing system, and the modification can trigger the action on the message channel in the hardware device. The specific way in which the hardware device is configured to notify the modification of the value in the notification register can take various forms. For example, the hardware device can poll the notification register at a frequency suitable for the purpose of the message channel, or a physical connection can be provided for the notification register to trigger the "doorbell" notification. In addition, depending on system requirements, the predetermined action taken by the hardware device on the message channel can take various forms. For example, the modification of the value can notify the hardware device that a new message has been stored in the message data structure providing the message channel, and then the hardware device can take action to transmit the message to the appropriate destination.

[0029] In some embodiments, the set of registers includes a plurality of notification registers corresponding to a plurality of message channels, respectively, and the values ​​stored in the notification registers indicate selected messages stored in the message data structures of the message channels. Thus, when there is one notification register for each message channel, the value stored in a given notification register may be used to indicate a particular message stored in the message data structure of that message channel. For example, a notification register may be configured so that the range of values ​​it may store corresponds to (at least) the number of individual messages that may be stored in the message data structure of a message channel, so that the value may indicate a particular message (e.g., a newly stored message).

[0030] In some embodiments, the set of registers includes a summary register for storage of message channel metadata, wherein the values ​​stored in the summary register provide message status information for each of the plurality of message channels, the message status information indicating whether each respective message channel currently has capacity to hold one or more new messages. Thus, in such embodiments, a summary register (a "transfer" summary) may be provided to give an overview of the plurality of message channels, and specifically show whether each message channel has capacity to hold one or more new messages (i.e., has space remaining) or does not (i.e., is full).

[0031] Similarly, in some embodiments, the set of registers includes another summary register for storing message channel metadata, wherein the value stored in the another summary register provides message status information for each of the plurality of message channels, the message status information indicating whether each respective message channel currently holds one or more messages. Thus, in such embodiments, another summary register (a "received" summary) may be provided to give an overview of the plurality of message channels, and specifically show whether each message channel is currently holding one or more new messages (i.e., has new messages ready to be processed) or not (i.e., empty).

[0032] In some embodiments, a set of registers in a hardware device is arranged to store a configuration data structure associated with a message data structure, wherein the configuration data structure defines usage parameters of the message data structure, and wherein the usage parameters include an index of the message data structure, and wherein the hardware device performs a predetermined action on the message data structure in response to a modification of the index. Therefore, one of the usage parameters provided in the configuration data structure in the configuration data structure can be an index, and for example, this can take the form of a write index or a read index of a set of queued messages in a message channel. Therefore, in the case where a data processing agent in a data processing system adds a message to a set of queued messages in a message data structure, it can increment the write index to indicate where the next message should be added to the message data structure subsequently, and the modification of the write index can be used to notify the hardware device that a new message has been stored in the message data structure. Alternatively, the index can be a read index, and once a data processing agent in a data processing system has retrieved a message stored in a message data structure, the data processing agent can update the read index relative to the message data structure, and the modification of the read index can also be used as a notification to the hardware device to notify that a previously stored message in the message data structure has now been retrieved. As in the example of the notification ("doorbell") register above, responding to value modifications in a register from a hardware device can be implemented in a variety of ways, such as polling an index register or a connection to an index register that directly triggers a response.

[0033] In some embodiments, at least one of the first data processing agent and the second data processing agent is a software task executed in the data processing system. In some embodiments, at least one of the first data processing agent and the second data processing agent is a hardware agent in the data processing system. Therefore, the present technology can be used to pass messages between two software tasks, between a software task and a hardware device, or between two hardware devices.

[0034] In some embodiments, the message data structure is an ordered queue of messages. This may be a ring buffer.

[0035] In some embodiments, the message channel provides a one-way message transmission from a first data processing agent to a second data processing agent.

[0036] At least some embodiments provide a method for data processing, comprising: operating a first data processing agent; operating a second data processing agent; storing a message data structure for one or more messages in a data storage component, which data storage component is coherently shared between the first data processing agent and the second data processing agent; storing message channel metadata in another data storage component accessible to the first data processing agent and the second data processing agent, wherein the message channel metadata provides message status information of the message channel, and wherein the message channel metadata is one of a plurality of message channel metadata types defined for corresponding plurality of message channel types between the first data processing agent and the second data processing agent; and establishing a message channel having a selected message channel type in response to an initialization trigger.

[0037] At least some embodiments provide a data processing system comprising: a device for operating a first data processing agent; a device for operating a second data processing agent; a device for storing a message data structure for one or more messages, wherein the device for storing the message data structure for one or more messages is coherently shared between the first data processing agent and the second data processing agent; a device for storing message channel metadata, wherein the device for storing the message channel metadata is accessible by the first data processing agent and the second data processing agent, wherein the message channel metadata provides message status information of the message channel, and wherein the message channel metadata is one of a plurality of message channel metadata types defined for corresponding plurality of message channel types between the first data processing agent and the second data processing agent; and a device for establishing a message channel having a selected message channel type in response to an initialization trigger.

[0038] Some specific embodiments will now be described with reference to the accompanying drawings.

[0039] Figure 1A data processing system 10 in one embodiment is schematically shown. In general, the data processing system 10 includes a plurality of data processing cores 12-18 (four in the illustrated example) that perform various data processing activities when the data processing system is operable. Each of the illustrated cores 12-18 may alternatively be a cluster of cores. To support data processing activities, the data processing system 10 is equipped with a coherently shared memory (e.g., DRAM), each of which can access the memory through an interconnect 22. A system cache 24 is also provided in this example to improve system performance. As will be described in more detail with reference to the accompanying drawings that follow, one of the items stored in the coherently shared memory 20 is a message data structure 26 that is used to provide a message channel to support the delivery of messages between two data processing agents in the data processing system. The message data structure 26 and other data structures defined in the data processing system to support the use of the message channel will be discussed in more detail with reference to the accompanying drawings that follow, and various possibilities for the configuration of the message data structure and other data structures will be stated therein. At this point, it is sufficient to recognize that the data processing system is equipped with the ability to dynamically establish message channels to support message transfer of various types between data processing agents in the data processing system. As will be discussed further below, a given type of message channel among the different possible types of message channels may be more suitable for a particular data processing scenario, and therefore, when establishing a message channel in the data processing system, the message channel type is selected based on the current data processing requirements.

[0040] Figure 1Also shown are an accelerator management device 28 and a peripheral device 30. When a message channel is established in a data processing system, message channel metadata associated with the message data structure 26 is additionally stored in another data storage component of the data processing system, such as a register 32 of the accelerator management device 28 or a storage component 34 of the peripheral device 30. The message channel metadata provides message state information of the message channel, and its storage in another different data storage component (separate from the coherently shared memory) supports the supervision of the message channel, thereby supporting communication between data processing agents in the system. For example, the message channel metadata can be stored in the register 32 of the accelerator management device 28. These registers can be made accessible to the data processing agents (regardless of the type) in the system by memory mapping. In addition, the accelerator management device 28 can be provided as a hardware device dedicated to facilitating communication between data processing agents in the system via the established message channel. In the case where the message state information of the message channel is stored in the register of this hardware device, the hardware device can also be constructed to take appropriate actions in response to changes in the state of the message channel (e.g., the storage of a new message in the message data structure 26) to transmit the new message to its destination. However, it is not necessary that the additional storage component be physically located within a hardware device such as accelerator management device 28, and alternative embodiments that may also be implemented in data processing system 10 may utilize storage component 34 in peripheral device 30 for this purpose. Accelerator management device 28 may then be considered "stateless" (and thus registers 32 may not be provided, or at least may only be used for purposes not directly related to the techniques disclosed herein), although in reality, Figure 1 In the schematic diagram of FIG. 1 , it is shown as a single self-contained unit 28 which may be completely distributed in a data processing system, with its functionality provided by various separate components.

[0041] from Figure 1 As will be appreciated from the schematic diagram, each of the cores 12-18 can access the accelerator management device 28 (specifically its registers 32) and can access the peripheral device 30 (specifically its storage component 34) when one of them is used to provide the aforementioned other data storage component in which the message channel metadata is stored. However, as Figure 1As shown, in this example, each of the cores 12-18 is also equipped with a respective local peripheral device 36-42. This set of local peripheral devices can be used for local storage of memory-mapped addresses, and aliasing of at least some of the memory-mapped addresses can be allowed, so that each address in the set of aliased memory-mapped addresses is mapped to multiple locations in the system (across the set of local peripheral devices 36-42). Allowing the data processing cores 12-18 to access memory-mapped register addresses in their own local peripheral devices in this manner can improve performance (e.g., due to reduced average access latency), but this may limit the ease with which software threads can be migrated between cores if the view of the memory-mapped registers is not consistent for all processing elements in the system.

[0042] Figure 1 Also shown is a session table 21 (which may also be referred to as a routing table) stored in the coherently shared memory 20, which is used to store information indicating the source and destination of each defined message channel in the data processing system. In the following description, a message channel may also be referred to as a "session", and a source or destination may also be referred to as a "socket". In this terminology, the concepts of socket and session are directly related to each other: a session refers to a logical link between two sockets, whereas a socket is an endpoint in a specific session. A session can be established between two software tasks (which may be referred to as threads), between a hardware task and a software task (which may be regarded as a particle of state required by an accelerator and execution of work completely independent of each other), or between two hardware tasks. Sessions are used to transmit messages between the tasks of these "agents" in the data processing system.

[0043] Figure 2 Schematically illustrates how to store the message data structure and message channel metadata of the present technology. The figure shows a coherently shared memory 50, in which the message data structure is stored, and an accelerator storage component 52 (it should be understood that the storage component can form part of the accelerator device itself, or can be other system storage components accessible to the accelerator device), in which the message channel metadata is stored. A corresponding system memory map 54 is also shown, which shows that both the message channel metadata and the message data structure themselves form part of the memory map, and can therefore be coherently accessed by any data processing agent in the system. At initialization, the message data structure in the coherently shared memory 50 and the message channel metadata in the accelerator storage component 52 are instantiated. Figure 2The following example is shown: Message channel 1 is initialized with message data structure 1 set up in coherently shared memory 50, and message channel 1 state information is stored in registers 58 providing accelerator storage component 52. A separate message channel 0 already exists, which has a corresponding message data structure 0 in coherently shared memory 50 and message channel 0 state information stored in registers 56 that are part of accelerator storage component 52. The two message channels are independent of each other and can be of different types. Figure 2 Also shown is an accelerator message handling control 60, which may, for example, form a Figure 1 1 is a portion of the accelerator management device 28 shown. One function of the control unit 60 shown here is to monitor the contents of registers 56 and 58 so that appropriate message-related processing can be performed in response to a change in the contents of one of those registers. Figure 2 Two alternative mechanisms for performing this monitoring are shown in FIG. 1 . In the first mechanism, a connection is established between each register and the accelerator message processing control 60 so that each register can act as a "doorbell" to trigger a response from the accelerator message processing control 60. In the second mechanism, the accelerator message processing control 60 polls the registers to determine when a content change occurs, where the setting of the polling period depends on a balance between the speed at which subsequent actions should follow and the overhead associated with providing the polling.

[0044] Figure 3A and 3B Returns to the problem of the memory mapping to a given register address for storage of message channel metadata (including message status information) for a given message channel. The example shown is closely based on e.g. reference Figure 1 The structure of the data processing system discussed and in Figures 3A and Figure 3B The components of the system are reproduced in , and given the same labels (but note that here, Figure 1 The cores 12-16 are referred to as "processing elements" 12-16). Figure 3A In the example of , it can be seen that register address (0x100) is mapped to multiple locations in the system, namely in each of local peripherals 36, 38, and 40. This means that for each processing element 12-16, and specifically for each thread 70-74 shown as executing in a processing element 12-16, respectively, the view of the memory mapped register is not consistent. However, this also means that each processing element 12-16 is able to access this memory mapped register address 0x100 in its local peripheral 36-40, which may be beneficial to performance, for example due to reduced average access latency. In contrast, in Figure 3BIn the example of FIG. 1 , for each processing element 12-16, specifically for each thread 76 and 78 shown as currently executing in processing elements 12 and 16, respectively, the view of the memory mapped registers is consistent because all memory mappings (address 0x100) are consistently mapped to the indicating register 80 in the peripheral slave device 30. Because of this consistency, it means that a thread executing in one processing element (e.g., core) can be migrated to a different processing element without causing significant complexity. This is in Figure 3B Schematically illustrated in FIG. 1 , where thread 76 is migrated from executing in processing element 12 to executing in processing element 14. Returning to FIG. Figure 3A Considering that consistency can be achieved by implementing a coherence mechanism between local peripheral devices 36-40 instead (e.g., to allow direct thread migration). By providing a coherence control 82 that implements the coherence mechanism, this Figure 3A Alternatively, the message channel may be provided using the second type of message channel described herein (where the entire AMS table is stored in a coherently shared memory to facilitate migration of software threads).

[0045] As mentioned above, the present technology provides different types of message channels that can be dynamically established in a data processing system, and Figure 4 Schematically illustrates how, in some embodiments, a first type of message channel is provided in more detail, wherein a message data structure holding messages of the message channel is stored in a coherently shared memory, and all message channel metadata associated with the message channel is stored in an internal storage component of an accelerator device in a data processing system. Example contents of the coherently shared memory 102 and the accelerator device internal storage component 104 are illustrated, wherein all of these contents are memory mapped, and a memory map 100 is also illustrated.

[0046] In the upper portion of the memory map 100, three examples of an accelerator message interface (AMI-SW) for software are shown (AMI-SW 0, AMI-SW 1, and AMI-SW n). The first two interfaces both provide groups of message channels of this first type (where all message channel metadata associated with the message channels is stored outside of coherently shared memory—in this example, in registers of the accelerator device). Figure 4 In the illustrated embodiment, the message channel is also referred to as an accelerator message socket (AMS), and each AMS supports one message queue. The AMS type provided by the interface AMI-SW n is Figure 4In fact, it should be noted that the configuration of the message channel (AMS) type is determined at the granular level of each interface, so this interface AMI-SW n can also provide this first type of message channel (such as Figure 4 ), or another type of message channel supported by the system may be provided (for example, as shown in the following reference Figure 7 In the lower portion of memory map 100, two example ring buffer mappings are shown.

[0047] A first hierarchical level of message channel metadata associated with the first type of message channel is at Figure 4 106, which includes TX_DIGEST and RX_DIGEST registers and TX and RX AMS data structures for each AMI-SW, which are arranged in the corresponding AMI-SW partition when the AMI-SW is established. The AMI-SW partition contains a summary followed by the AMS data structure. The size of the partition depends on the number of transmit (TX) and receive (RX) AMSs defined by each AMI in the system (NUM_TX_AMS and NUM_RX_AMS). In one example, for each AMI SW, there are 64 AMS TX for transmission and 64 AMS RX for reception. The TX_DIGEST and RX_DIGEST registers and TX and RX AMS data structures in this embodiment are described below in Table 1.

[0048]

[0049] Table 1 - AMI-SW partitioning for the first type of AMS

[0050] The ring buffer data structures TX_AMS_TABLE and RX_AMS_TABLE are in Figure 4 , labeled as the socket (AMS) table. Further details of the contents of the socket table are shown in the second hierarchical level of the message channel metadata associated with this first type of message channel as item 108, which are the ring buffer parameters for each TX socket in the AMI- SW partition, followed by the ring buffer parameters for each RX socket in the AMI- SW partition. Specific details of a set of ring buffer parameters (for TX_AMS#1) are shown in the third hierarchical level of the message channel metadata associated with this first type of message channel as item 110. These ring buffer parameters include: the current read and write indexes of the ring buffer (essentially indicating where the next message should be read from the ring buffer, and indicating where the next message should be written to the ring buffer); the element size definition of the ring buffer (a given message can occupy one or more elements); a mask value indicating the size of the ring buffer (which is n2 , where n is a value indicated by a binary mask value); and a base pointer indicating a base address of a ring buffer in a coherently shared memory.

[0051] Reference now Figure 5 and Figure 6 To discuss an example manner of using message channel metadata associated with the first type of message channel, Figure 5 and Figure 6 An example sequence of steps taken when a software task sends a message via one of the TX_AMS data structures and receives a message via one of the RX_AMS data structures, respectively, is shown. Figure 5 Initially, with the message being sent from the software task, at step 150, the software task accesses the AMS data structure using index (i, s) to obtain the parameters of the corresponding ring buffer. Then at step 152, the software task determines whether there is room in the ring buffer for the message it is about to send by accessing the TX_DIGEST value. The value of the bit corresponding to the relevant ring buffer indicates this in a binary value (yes / no). In the event that there is no available space, the task waits, looping through step 154. When space is available, at step 156, the software task stores the message in the ring buffer at index WRITE_INDEX. Then at step 158, the software task issues a barrier instruction to ensure that all ongoing write transactions have reached their destination. This is because writes in coherently shared memory are not restricted by order, so this ensures that other write transactions to the shared memory issued before the barrier instruction are guaranteed to be executed in front of other transactions issued after the barrier instruction. Then at step 160, the software task increments its own write index (in its local AMS table) and writes this updated value to the AMS (socket) table through the AMI-SW partition. Now, the steps performed by the software task are complete. In response, the accelerator manager will take subsequent steps. In step 162, the accelerator manager (also referred to herein as the AMU) detects an update to the write index for socket #s, interface #i. Note that this detection can be implemented in various ways, such as polling the WRITE_INDEX register or configuring the WRITE_INDEX register to act as a doorbell that triggers additional actions by the accelerator manager (see also above on this topic). Figure 2 Then, in step 164, the accelerator manager accesses the session table (see Figure 121 in step 166) to determine the destination socket. In step 166, the accelerator manager determines whether the message can be written to the destination socket (i.e., whether RX_DIGEST of RX_AMS indicates that the associated ring buffer has space). When there is no available space, the accelerator manager will wait, looping via step 168. When space is available, in step 170, the accelerator manager performs a copy of the message from the TX_AMS ring buffer to the RX_AMS ring buffer.

[0052] Now turn to Figure 6 , shows an example sequence of steps taken when a software task receives a message. First, at step 180, the software task determines that a message is available from the RX AMS#s of AMI#i by accessing the RX_DIGEST of AMI#i. Then at step 182, the software task accesses the AMS data structure using index (i, s) to obtain the parameters of the relevant ring buffer. At step 184, the software task reads one (or more) messages from the ring buffer at index READ_INDEX, and at step 186, the software task increments its own local read index and writes this updated value to the AMS table via the AMI-SW partition. The steps performed by the software task are now complete, and in response, the accelerator manager takes the final step 190. At step 190, the accelerator manager detects the update to the read index of AMS#s, AMI#i, and has therefore confirmed that the destination software task has received the message. This confirmation can then be propagated to the sender of the message if necessary. Note that, as described above with respect to detection of modifications to the write index, such detection of modifications to the read index may also be implemented in a variety of ways, such as polling the READ_INDEX register or configuring the READ_INDEX register to act as a doorbell that triggers the accelerator manager to take additional action (see also above on this topic). Figure 2 description).

[0053] Figure 7 Schematically illustrated is how to provide more details of a second type of message channel that can be dynamically established in a data processing system in some embodiments. For this second type of message channel, not only the message data structure that stores the messages of the message channel is stored in a coherently shared memory, but also a large part of the message channel metadata associated with the message channel (actually all AMS tables) is stored here. In the data processing system, only a small group of status indications (notification registers) are stored in the internal storage component of the accelerator device. Shown are example contents of a coherently shared memory 200 and an accelerator device internal storage component 202, wherein all of these contents are memory mapped and a memory map 204 is also shown.

[0054] In the upper portion of the memory map 204, two examples of accelerator message interfaces for software (AMI-SW) are shown (AMI-SW [0] and AMI-SW [n]) for their mapping to coherently shared memory. Both interfaces provide groups of this second type of message channels, where most of the message channel metadata (all AMS tables) associated with the message channels are stored in the coherently shared memory. Figure 7 In the illustrated embodiment, the message channel is also referred to herein as an accelerator message socket (AMS), and each AMS supports one message queue. It should be noted again that the configuration of the message channel (AMS) type is determined at the granularity level of each interface, so that other AMI-SW interfaces can also provide this second type of message channel (such as Figure 7 ) or may provide another type of message channel supported by the system (e.g., Figure 4 In the middle portion of the memory map, the mapping to the accelerator device internal storage components for the AMI software partitions (one per AMI-SW) is shown (the size of the AMI-SW partition depends on the number of AMSs specified), and in the bottom portion of the memory map 100, the mapping of two example ring buffers is shown.

[0055] The first hierarchical level of message channel metadata associated with the second type of message channel is Figure 7 , which (similar to the first type of message channel) includes for each AMI-SW TX_DIGEST and RX_DIGEST values ​​and TX and RX AMS data structures, which are arranged in a coherently shared memory when the AMI-SW is established. The digest is followed by the AMS data structure. The second hierarchical level of message channel metadata associated with the second type of message channel is at Figure 7 208, and the third hierarchical level is shown as item 210. These Figure 4 Items 108 and 110 are the same as those described in . The format of the AMI-SW entry is provided below in Table 2, where N = (NUM_TX_AMS-1) and M = (NUM_RX_AMS-1). The AMI table contains one doorbell register per AMS.

[0056]

[0057] Table 2 - AMI-SW table for the second type of AMS

[0058] In this embodiment, if Figure 7As shown, in each doorbell register, bits [15:0] are used to specify the number of elements in the ring buffer, while bits [31:16] are reserved. In other embodiments, all bits of each doorbell register may correspond to elements in the ring buffer.

[0059] Reference now Figure 8 and Fig. 9 Let's discuss an example manner of using message channel metadata associated with the second type of message channel. Figure 8 and Fig. 9 An example sequence of steps taken when a software task sends a message via one of the TX_AMS data structures and receives a message via one of the RX_AMS data structures, respectively, is shown. Figure 8 Initially, with the message from the software task being transmitted, at step 250, the software task accesses the AMS data structure using index (i, s) to obtain the parameters of the corresponding ring buffer. Then at step 252, the software task determines whether there is room in the ring buffer for the message it is about to send by accessing the TX_DIGEST value. The value of the bit corresponding to the relevant ring buffer indicates this in a binary value (yes / no). In the event that there is no available space, the task waits, looping through step 254. When space is available, at step 256, the software task stores the message in the ring buffer at index WRITE_INDEX. Then at step 258, the software task issues a barrier instruction to ensure that all in-flight write transactions have reached their destination (see above—writes to coherently shared memory are not restricted in order). Then at step 260, the software task increments its own write index (in its local AMS table) and notifies the accelerator manager (AMU) by writing the number of the element it just queued into the doorbell register of AMS#s. The steps performed by the software task are now complete. In response, the accelerator manager will take subsequent steps. At step 262, the accelerator manager (AMU) detects an update to the doorbell register for socket #s, interface #i. Note that (as described above for read and write indexes), this detection can be achieved in various ways (despite the convenient name of "doorbell register"), such as polling the doorbell register or configuring the doorbell register to actually act as a doorbell that triggers further action by the accelerator manager (see also above on this topic). Figure 2 Then, in step 264, the accelerator manager accesses the session table (see Figure 121 in step 266) to determine the destination socket. In step 266, the accelerator manager determines whether the message can be written to the destination socket (i.e., whether RX_DIGEST of RX_AMS indicates that the associated ring buffer has space). When there is no available space, the accelerator manager waits, looping via step 268. When space is available, in step 270, the accelerator manager performs a copy of the message from the TX_AMS ring buffer to the RX_AMS ring buffer.

[0060] Now turn to Fig. 9 , shows an example sequence of steps taken when a software task receives a message. First, at step 280, the software task determines that a message is available from RX AMS#s of AMI#i by accessing RX_DIGEST of AMI#i. Then at step 282, the software task accesses the AMS data structure using index (i, s) to obtain the parameters of the relevant ring buffer. At step 284, the software task reads one (or more) messages from the ring buffer at index READ_INDEX, and at step 286, the software task increments its own local read index and notifies the accelerator manager (AMU) by writing the number of the element it just dequeued into the doorbell register of AMS#. The steps performed by the software task are now complete. At step 290, the accelerator manager detects the update to the doorbell register of AMS#s, AMI#i, and has therefore confirmed that the destination software task has received the message. This confirmation can then be propagated to the sender of the message if necessary. Note that, as described above with respect to detection of modifications to the write index, such detection of modifications to the doorbell register may also be implemented in a variety of ways, such as by polling or actually configuring the doorbell register to act as a doorbell that triggers further action by the accelerator manager (see also above on this topic). Figure 2 Finally, at step 292, the accelerator manager initiates a DMA read transaction to obtain the updated value of READ_INDEX.

[0061] As a brief general summary, a data processing system and method of data processing are provided. The system includes: first and second data processing agents, and a data storage component coherently shared between the two data processing agents, the data storage component for storing message data structures to provide a message channel between them. Both data processing agents can access another data storage component, the other data storage component for storing message channel metadata, the message channel metadata providing message status information for the message channel. The message channel metadata is one of a plurality of message channel metadata types defined for corresponding plurality of message channel types between the first and second data processing agents, and at least one of the first and second data processing agents establishes a message channel of the selected message channel type in response to an initialization trigger.

[0062] In this application, the phrase "configured to..." is used to indicate that an element of a device has a configuration capable of performing a defined operation. In this context, "configuration" refers to the arrangement or manner of interconnection of hardware or software. For example, a device may have dedicated hardware that provides the defined operation, or a processor or other processing device that can be programmed to perform the function. "Configured to" does not mean that the device elements need to be changed in any way to provide the defined operation.

[0063] Although the illustrative embodiments have been described in detail herein with reference to the accompanying drawings, it should be understood that the present invention is not limited to those specific embodiments, and that various changes, additions and modifications may be practiced by those skilled in the art without departing from the scope of the present invention as defined in the appended claims. For example, the features of the dependent claims may be variously combined with the features of the independent claims without departing from the scope of the present invention.

Claims

1. A data processing system, include: a first data processing agent and a second data processing agent; a data storage component coherently shared between the first data processing agent and the second data processing agent, the data storage component being used to store a message data structure for one or more messages to provide a message channel between the first data processing agent and the second data processing agent; as well as another data storage component accessible to the first data processing agent and the second data processing agent, the another data storage component being used to store message channel metadata, wherein the message channel metadata provides message state information of the message channel, and wherein the message channel metadata is one of a plurality of message channel metadata types defined for corresponding plurality of message channel types between the first data processing agent and the second data processing agent, And wherein at least one of the first data processing agent and the second data processing agent establishes the message channel of the selected message channel type in response to an initialization trigger.

2. The data processing system according to claim 1, in, The data processing system is arranged to store message interface data structures, wherein each message interface data structure defines a plurality of message channels established in the data storage component and the further data storage component.

3. The data processing system according to claim 2, in, At least one of the first data processing agent and the second data processing agent defines the selected message channel type for the plurality of message channels by selecting the selected message channel type for the message interface data structure in response to the initialization trigger.

4. The data processing system according to claim 3, in, The data processing system is arranged to store a plurality of message interface data structures, and wherein the selected message channel type for each of the plurality of message interface data structures is independently set.

5. The data processing system according to any one of claims 2 to 4, in, The another data storage component accessible to the first data processing agent and the second data processing agent comprises a set of registers in a hardware device in the data processing system, wherein a set of memory addresses is memory mapped to the set of registers.

6. The data processing system according to claim 5, in, At least a subset of the set of memory addresses is memory mapped to a plurality of locations in the data processing system, and at least one of the plurality of locations is in a peripheral device in the data processing system that is dedicated to a data processing device.

7. The data processing system according to claim 5, in, Each address in the set of memory addresses is memory mapped to a respective unique location in the data processing system.

8. The data processing system according to claim 7, in, The each unique location is located in a single peripheral device in the data processing system.

9. The data processing system according to claim 5, in, At least one address in the set of memory addresses is memory mapped to a location in a plurality of peripheral devices in the data processing system, wherein the plurality of peripheral devices are arranged to implement a coherency mechanism to ensure a consistent copy of the contents of the set of registers.

10. The data processing system according to claim 5, in, The set of registers includes a notification register for storing metadata of the message channel, wherein the value stored in the notification register provides the message status information of the message channel, and wherein the hardware device performs a predetermined action on the message channel in response to a modification of the value stored in the notification register.

11. The data processing system of claim 10, wherein the set of registers includes a plurality of notification registers corresponding to the plurality of message channels, respectively, and the values ​​stored in the notification registers indicate the selected messages stored in the message data structures of the message channels.

12. The data processing system according to claim 5, in, The set of registers includes a summary register for storing the message channel metadata, wherein the value stored in the summary register provides the message status information for each of the multiple message channels, and the message status information indicates whether each corresponding message channel currently has capacity to save one or more new messages.

13. The data processing system according to claim 12, in, The set of registers includes another summary register for storing the message channel metadata, wherein the value stored in the another summary register provides the message status information for each of the multiple message channels, and the message status information indicates whether each corresponding message channel currently stores one or more new messages.

14. The data processing system according to claim 5, in, The set of registers in the hardware device is arranged to store a configuration data structure associated with the message data structure, wherein the configuration data structure defines usage parameters of the message data structure, and wherein the usage parameters include an index of the message data structure, and wherein the hardware device performs a predetermined action on the message data structure in response to a modification of the index.

15. The data processing system according to claim 1, in, At least one of the first data processing agent and the second data processing agent is a software task executing in the data processing system.

16. The data processing system according to claim 1, in, At least one of the first data processing agent and the second data processing agent is a hardware agent in the data processing system.

17. The data processing system according to claim 1, in, The message data structure is an ordered queue of messages.

18. The data processing system according to claim 1, in, The message channel provides one-way message transmission from the first data processing agent to the second data processing agent.

19. A method of data processing, include: operating a first data processing agent; operating a second data processing agent; storing a message data structure for one or more messages in a data storage component to provide a message channel between the first data processing agent and the second data processing agent, the data storage component being coherently shared between the first data processing agent and the second data processing agent; storing message channel metadata in another data storage component accessible to the first data processing agent and the second data processing agent, wherein the message channel metadata provides message state information of the message channel, and wherein the message channel metadata is one of a plurality of message channel metadata types defined for corresponding plurality of message channel types between the first data processing agent and the second data processing agent; and In response to an initialization trigger, the message channel having the selected message channel type is established.

20. A data processing system, include: means for operating a first data processing agent; means for operating a second data processing agent; means for storing a message data structure for one or more messages to provide a message channel between the first data processing agent and the second data processing agent, the means for storing a message data structure for one or more messages being coherently shared between the first data processing agent and the second data processing agent; means for storing message channel metadata, the means for storing message channel metadata being accessible by the first data processing agent and the second data processing agent, wherein the message channel metadata provides message state information of the message channel, and wherein the message channel metadata is one of a plurality of message channel metadata types defined for a corresponding plurality of message channel types between the first data processing agent and the second data processing agent; and Means for establishing the message channel of a selected message channel type in response to an initialization trigger.