Data processing device management system and method, electronic device and storage medium
By registering the data processing device port and creating instance scheduling management unit in the data processing equipment management system, the problem of the complexity of the device management in the multi -GPU system has been solved, and the efficient equipment instance management and call are realized, and the system performance and easy use of systems are improved. sex.
Patent Information
- Application Number
- CN202411523828.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-29
AI Technical Summary
In the prior art, in managing multiple data processing device instances, especially in multi-GPU systems, there are problems such as cumbersome device discovery and registration processes, complex resource scheduling and management, and low interaction efficiency between user space and kernel space.
Put forward a data processing equipment management system. By registering a data processing equipment port on the platform bus, creating a corresponding number of instance scheduling management units, and linking these units through the system kernel management framework to respond to the user -driven call request for the device instance of the device for example. Manage and call.
The interactive logic of user -driven and underlying devices is simplified, the complexity and maintenance costs of user -driven are reduced, and the overall efficiency and ease of use of the system are improved.
Smart Images

Figure CN119376946A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a data processing device management system and method, an electronic device, and a storage medium. Background Art
[0002] With the rapid development of computer technology, data processing devices (such as graphics processing units (GPUs) and central processing units (CPUs)) are increasingly used in the fields of high-performance computing and graphics rendering. These devices play a key role in processing complex computing tasks and rendering high-quality graphics. However, in the prior art, managing multiple data processing device instances, especially in multi-GPU systems, faces many technical challenges.
[0003] For example, in traditional GPU driver strategies, a single device node is usually used to manage a single GPU instance. When scheduling multiple GPU instances at the same time, multiple contexts must be established, and the entire process is relatively cumbersome.
[0004] Specifically, when the GPU driver schedules multiple GPU instances, device discovery and registration are more cumbersome. In a multi-device system, how to effectively discover, initialize and register each data processing device instance and ensure that they can be correctly identified and used by the operating system and application programs is a complex and time-consuming process. Moreover, resource scheduling and management, and the interaction between user space and kernel space also require complex logic. User space programs need to interact with the data processing device management system in the kernel space through system calls, but the existing interaction mechanisms are often inefficient and difficult to implement complex functional requirements. This limits the full performance of data processing devices and increases the complexity and maintenance costs of the system. Summary of the invention
[0005] The present disclosure proposes a technical solution for data processing equipment management.
[0006] According to one aspect of the present disclosure, there is provided a data processing device management system, comprising:
[0007] The device side of the platform driver registers a data processing device port on the platform bus;
[0008] The driver end of the platform driver creates a corresponding number of instance scheduling management units according to the number of data processing device instances, and links the instance scheduling management units to the system kernel management framework through the interface of the system kernel management framework;
[0009] A system kernel management framework, linking the instance scheduling management unit with the data processing device port;
[0010] The system kernel management framework, in response to a user-driven call request to the data processing device port, calls the data processing device instance through an instance scheduling management unit linked to the data processing device port.
[0011] In a possible implementation, the driver end of the platform driver obtains the number of data processing device instances recorded in a private memory, and creates a corresponding number of instance scheduling management units.
[0012] In a possible implementation, the user driver sends a connection request to the data processing device port;
[0013] The system kernel management framework returns the number of data processing device instances to the user driver in response to the connection request;
[0014] The user driver creates a context resource corresponding to the data processing device port, wherein the context resource is used to provide an isolated execution environment for multiple data processing device instances and maintain related resources required for calling multiple data processing device instances;
[0015] The user driver calls the data processing device instance through the context resource based on the number of the data processing device instance.
[0016] In a possible implementation, the user driver sends a call request to the system kernel management framework, wherein the call request includes an identifier of a data processing device instance to be called;
[0017] The system kernel management framework calls the data processing device instance in response to the calling request and based on the identifier of the data processing device instance.
[0018] In a possible implementation, the system kernel management framework sends the call request to a main instance scheduling management unit among the multiple instance scheduling management units in response to the call request;
[0019] The main instance scheduling management unit determines, based on the identifier of the data processing device instance in the call request, a target instance scheduling management unit corresponding to the identifier;
[0020] In the case where the target instance scheduling management unit is the main instance scheduling management unit, the main instance scheduling management unit calls the corresponding data processing device instance to process the request;
[0021] In the case that the target instance scheduling management unit is another instance scheduling management unit, the main instance scheduling management unit forwards the call request to the target instance scheduling management unit, and the target instance scheduling management unit calls the corresponding data processing device instance to process the request.
[0022] In a possible implementation, the system kernel management framework creates a corresponding number of resource structures according to the number of data processing device instances, and the resource structures are used to store register resources and interrupt resources of multiple data processing device instances.
[0023] In a possible implementation, the instance scheduling management unit calls the corresponding data processing device instance to perform request processing based on the data stored in the created resource structure.
[0024] According to one aspect of the present disclosure, a data processing device management method is provided, which is applied to a data processing device management system, comprising:
[0025] Register a data processing device port on the platform bus;
[0026] According to the number of data processing device instances, a corresponding number of instance scheduling management units are created, and the instance scheduling management units are linked to the system kernel management framework through the interface of the system kernel management framework;
[0027] Linking the instance scheduling management unit to the data processing device port;
[0028] In response to a user-driven call request to the data processing device port, the data processing device instance is called through the instance scheduling management unit linked to the data processing device port.
[0029] According to one aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to implement the above system.
[0030] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above system is implemented.
[0031] It should be understood that the above general description and the following detailed description are exemplary and explanatory only and do not limit the present disclosure. Other features and aspects of the present disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.
[0033] Figure 1 A block diagram showing a data processing device management system according to an embodiment of the present disclosure.
[0034] Figure 2 A schematic diagram of the structure of a data processing device management system provided according to an embodiment of the present disclosure is shown.
[0035] Figure 3 A schematic diagram of the structure of a data processing device management system provided according to an embodiment of the present disclosure is shown.
[0036] Figure 4 A flowchart of a data processing device management method according to an embodiment of the present disclosure is shown.
[0037] Figure 5 A block diagram of an electronic device 1900 according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0038] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0039] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0040] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0041] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0042] Figure 1A block diagram of a data processing device management system according to an embodiment of the present disclosure is shown as follows: Figure 1 As shown, the system 10 includes:
[0043] The device end 11 driven by the platform registers a data processing device port on the platform bus;
[0044] The platform-driven driver 12 creates a corresponding number of instance scheduling management units according to the number of data processing device instances, and links the instance scheduling management units to the system kernel management framework through the interface of the system kernel management framework;
[0045] A system kernel management framework 13, linking the instance scheduling management unit with the data processing device port;
[0046] The system kernel management framework 13, in response to a user-driven call request to the data processing device port, calls the data processing device instance through the instance scheduling management unit linked to the data processing device port.
[0047] The device side of the platform driver can be the part of the platform driver that directly interacts with the hardware device. It is responsible for registering and initializing the hardware device in the operating system so that the hardware device can be recognized and used by the operating system and other software. For example, in Linux, a device node can be registered on the platform bus. For example, the registered device node can be represented as / dev / dri / card0.
[0048] The platform bus can be a logical or physical communication channel for connecting and processing signals and data from different hardware devices and software components. For example, in a Linux system, the platform bus is a software module for connecting and managing buses that do not rely on traditional PCI / PCIe, i.e., a logical communication channel.
[0049] The data processing device port is an interface in the system for communicating with a specific data processing device (such as a GPU). In one example, in a direct rendering manager (DRM) framework, it is usually a device file or device node associated with a GPU device.
[0050] The driver end of the platform driver is a module in the platform driver that is responsible for implementing the specific device control logic. It is used to create and manage the necessary data structures and control logic according to the characteristics and requirements of the device so that the operating system and application programs can use the device efficiently. In an example, the driver end of the platform driver can create a corresponding number of instance scheduling management units according to the number of existing data processing device instances. The instance scheduling management unit is responsible for managing and scheduling the user driver's access to the data processing device instance.
[0051] The data processing device instance can be a device entity that actually exists in the system and can be used for data processing. For example, a GPU device or a CPU device. The instance scheduling management unit is used to manage the user software's access to the data processing device instance, such as task allocation, resource scheduling, error handling and other tasks. The user driver runs in the user space and is used to interact with the hardware device. In one example, in the field of graphics processing, the user driver will be responsible for tasks such as the submission of rendering tasks, the allocation and management of graphics resources, etc.
[0052] The user driver interacts with the system kernel management framework and calls the interface of the system kernel management framework to call the data processing device instance to perform tasks. In one example, the system kernel management framework can be a DRM framework in the Linux kernel for managing graphics hardware (such as GPU). The framework provides a unified interface for user drivers to access and control graphics hardware, while hiding the complexity and differences of the hardware.
[0053] The device side of the platform driver will scan the system bus, find and identify the data processing device (such as GPU) connected to the bus. When the device is identified, the platform driver will perform device initialization operations, such as configuring device registers and allocating corresponding memory space.
[0054] After the device is initialized, the device side of the platform driver will register the device in the kernel (e.g., the Linux kernel). For example, you can add a device node to the kernel's device model (e.g., sysfs) and create a device file (e.g., / dev / dri / card0) in the / dev directory. This device file can be used as an interface for user space programs to communicate with the device.
[0055] After registering the data processing device port, you can further create an instance scheduling management unit. At this time, you can pre-query the number of device instances, that is, query how many available data processing device instances (such as GPU instances) there are in the system. This can be achieved by reading system information, hardware registers or configuration files.
[0056] After obtaining the number of device instances, the driver can create a corresponding instance scheduling management unit for each device instance to schedule the device instance. The created instance scheduling management unit will be linked to the system kernel management framework. For example, the reference or pointer of the scheduling management unit can be added to the drm_device structure of the DRM framework, or the scheduling management unit can be registered with the framework through the registration mechanism provided by the DRM framework.
[0057] Then, the system kernel management framework can link the instance scheduling management unit with the device port. For example, the DRM framework can associate the device file (such as / dev / dri / card0) previously registered by the platform driver's device end with the corresponding drm_device structure and the instance scheduling management unit. Then, when the user driver accesses the GPU through the device file, the DRM framework will use the associated instance scheduling management unit to control access to the GPU instance.
[0058] Specifically, when a user space program (such as a user driver) interacts with a data processing device port (such as a device file) through a system call function (such as an open function, an ioctl function, etc.), the kernel will call a corresponding processing function of the system kernel management framework.
[0059] The system kernel management framework calls the corresponding instance scheduling management unit to perform task scheduling according to the request type of the user driver. During scheduling, specific operations such as allocating resources and submitting tasks to the GPU can be performed, which will not be described here. After the task is scheduled, the system kernel management framework can return the result to the user driver, for example, it can return status information, completion notification, error code and other information.
[0060] In the disclosed embodiment, the device end of the platform driver registers a data processing device port on the platform bus; the driver end of the platform driver creates a corresponding number of instance scheduling management units according to the number of data processing device instances, and links the instance scheduling management units to the system kernel management framework through the interface of the system kernel management framework; the system kernel management framework links the instance scheduling management unit with the data processing device port; the system kernel management framework, in response to the user driver's call request for the data processing device port, calls the data processing device instance through the instance scheduling management unit linked to the data processing device port. Thus, no matter whether there are one or more data processing device instances, only one data processing device port needs to be registered, and the port is responsible for interacting with the user driver, which simplifies the interaction logic between the user driver and the bottom layer, and does not need to create multiple contexts for multiple data processing device instances, reduces the complexity and maintenance cost of the user driver, and improves the overall efficiency and ease of use of the system.
[0061] In a possible implementation, the driver end of the platform driver obtains the number of data processing device instances recorded in a private memory, and creates a corresponding number of instance scheduling management units.
[0062] In this implementation, the driver side of the platform driver can access a private memory area (privatedata), which can be a memory area allocated by the system when the device is registered, and is used to store configuration information related to the data processing device (such as GPU). For example, the number of GPU instances configured in the system. This number can be manually configured by the user, or it can be obtained by the system automatically scanning all devices.
[0063] The driver side of the platform driver will create a corresponding number of instance scheduling management units according to the number of data processing device instances read from the private memory. Each instance scheduling management unit corresponds to a data processing device instance one by one and is used to manage the resources and tasks of the corresponding data processing device instance. By creating an independent scheduling management unit for each data processing device instance, processing resources can be managed and utilized more effectively, ensuring that each data processing device instance can be properly scheduled and accessed.
[0064] In the disclosed embodiment, the platform-driven driver side obtains the number of data processing device instances recorded in the private memory and creates a corresponding number of instance scheduling management units. Thus, the platform-driven driver side can dynamically create instance scheduling management units according to the configuration information in the private memory, so the system can adapt to different numbers of data processing device instances without a large number of code modifications or reconstructions. In addition, since each data processing device instance has an independent scheduling management unit responsible for the management of its resources and tasks, the system can more accurately control the performance and resource usage of each data processing device instance, thereby improving overall performance and efficiency.
[0065] In a possible implementation, the user driver sends a connection request to the data processing device port; the system kernel management framework returns the number of data processing device instances to the user driver in response to the connection request; the user driver creates a context resource corresponding to the data processing device port, and the context resource is used to provide an isolated execution environment for multiple data processing device instances and maintain related resources required for calling multiple data processing device instances; the user driver calls the data processing device instance through the context resource based on the number of data processing device instances.
[0066] When a user driver needs to access a data processing device instance, it initiates a connection request, for example, sending an "open" request, which is usually a system call, such as an open() function implementation, to notify the operating system and the corresponding driver that the user driver needs to start using a device.
[0067] When the system kernel management framework receives a connection request from a user driver, it checks the number of available data processing device instances and returns this number to the user driver. After receiving the number of instances sent by the system kernel management framework, the user program creates a context resource. Since only one data processing device port is registered in this implementation, only one context resource can be created. The context resource provides an isolated execution environment for multiple data processing device instances and maintains the related resources required by multiple data processing device instances, such as the current rendering state, textures, buffers, etc. It allows user applications to perform graphics operations in an isolated environment (i.e., the context resource).
[0068] After the context resource is created, the user driver can call the data processing device instance based on the context resource and the identifier of the data processing device instance to call the specific data processing device instance. The specific calling process can be referred to the possible implementation methods provided in the present disclosure, which will not be described here.
[0069] In one example, when a user application requests to open a GPU, it sends a drmOpen() or similar request to the DRM subsystem through the user driver. The DRM subsystem checks the GPU resources in the system and returns the number of GPU instances. The user driver then creates a context resource. After that, the context resource is used to call the GPU instance based on the GPU instance identifier to manage access to the GPU instance and perform graphics rendering and other operations.
[0070] In the disclosed embodiment, the user driver sends a connection request to the data processing device port; the system kernel management framework returns the number of data processing device instances to the user driver in response to the connection request; the user driver creates a context resource corresponding to the data processing device port, and based on the number of data processing device instances, calls the data processing device instance through the context resource. Thus, the user driver can call multiple data processing device instances through only one context resource, which reduces the complexity and maintenance cost of the user driver and improves the overall efficiency and ease of use of the system.
[0071] In one possible implementation, the user driver sends a call request to the system kernel management framework, wherein the call request includes an identifier of the data processing device instance to be called; the system kernel management framework responds to the call request and calls the data processing device instance based on the identifier of the data processing device instance.
[0072] In this implementation, the data processing device instance (such as GPU) to be called can be specified by a specific flag. The flag can be unique and is used to identify a specific device instance in the system kernel management framework.
[0073] Specifically, the user application layer has specific data processing requirements, which may need to be executed by a specific data processing device instance (such as a GPU). For example, the user driver may want to assign the rendering task to the GPU with the highest performance in the system. The user driver constructs a call request based on the determined identifier. The data contained in the call request includes the identifier of the data processing device instance, the operation type, parameters, etc.
[0074] The user driver sends the request to the system kernel management framework to request a call to a specific data processing device instance. Specifically, the constructed call request can be sent to the system kernel management framework through the interface of the system kernel management framework.
[0075] The system kernel management framework receives the call request from the user driver, parses the data in the call request, obtains the identifier of the data processing device instance, and determines the specific device instance to be called. The system kernel management framework allocates corresponding resources to the call request based on the current system status and resource availability.
[0076] After the resource allocation is completed, the system kernel management framework forwards the call request to the instance scheduling management unit corresponding to the identifier, and the instance scheduling management unit calls the corresponding data processing device instance to perform the data processing task. Exemplarily, the instance scheduling management unit sends the rendering command in the call request to a specific GPU to perform the rendering task.
[0077] In the disclosed embodiment, the user driver interacts with the system kernel management framework by sending a call request containing a specific device instance identifier, thereby implementing the call to a specific data processing device instance. Thus, the user driver can call multiple data processing device instances through only one context resource, reducing the complexity and maintenance cost of the user driver and improving the overall efficiency and ease of use of the system.
[0078] In a possible implementation, the system kernel management framework sends the call request to a main instance scheduling management unit among multiple instance scheduling management units in response to the call request; the main instance scheduling management unit determines the target instance scheduling management unit corresponding to the identifier of the data processing device instance in the call request; when the target instance scheduling management unit is the main instance scheduling management unit, the main instance scheduling management unit calls the corresponding data processing device instance to process the request; when the target instance scheduling management unit is another instance scheduling management unit, the main instance scheduling management unit forwards the call request to the target instance scheduling management unit, and the target instance scheduling management unit calls the corresponding data processing device instance to process the request.
[0079] In this implementation, there is a main instance scheduling management unit among multiple strength scheduling management units. The main instance scheduling management unit directly interacts with the system kernel management framework, while other strength scheduling management units interact with the main strength scheduling management unit. The specific interaction method can be described in detail later.
[0080] As described above, after receiving a call request from a user driver, the system kernel management framework will parse out the identifier of the data processing device instance to be called contained in the request.
[0081] The system kernel management framework sends the call request to the main instance scheduling management unit among the multiple instance scheduling management units. After receiving the call request, the main instance scheduling management unit first parses the data processing device instance identifier in the request, and based on the parsed device instance identifier, searches for the corresponding instance scheduling management unit in the internal data structure or configuration.
[0082] If the target instance scheduling management unit is the main instance scheduling management unit itself, the call request directly points to the data processing device instance managed by the main unit. In this case, the main unit will directly use its own resources or interfaces to call the corresponding data processing device instance for request processing.
[0083] If the target instance scheduling management unit is another instance scheduling management unit, the main unit forwards the call request to the target unit corresponding to the identifier. If the instance scheduling management units are distributed on different physical or logical nodes, the forwarding can be performed through network communication.
[0084] The target instance scheduling management unit receives the call request from the main unit, and uses its own resources or interfaces to call the corresponding data processing device instance (such as GPU) to process the request.
[0085] After the data processing device instance completes the request processing, the target instance scheduling management unit will collect the processing results and perform further processing or forward them to the system kernel management framework or user driver.
[0086] In the disclosed embodiment, the master instance scheduling management unit is responsible for receiving the call request from the user driver, and determines and calls the correct target instance scheduling management unit according to the device instance identifier in the request. Thus, the flexibility and scalability of the system are improved, so that multiple data processing device instances can be managed and utilized more effectively.
[0087] In a possible implementation, the system kernel management framework creates a corresponding number of resource structures according to the number of data processing device instances, and the resource structures are used to store register resources and interrupt resources of multiple data processing device instances.
[0088] In order to facilitate each data processing device instance to store and access its key hardware resources, a corresponding resource structure may be created for each data processing device instance.
[0089] The number of data processing device instances may be the number of instances of data processing devices (such as GPUs) currently available or configured in the system. Each instance may represent an independent hardware unit capable of performing data processing tasks.
[0090] The system kernel management framework dynamically creates the same number of resource structures based on the number of data processing device instances detected or configured by the user. These resource structures are software-level data structures used to map and manage hardware resources in memory. Each resource structure can be used to store and manage register resources and interrupt resources for a specific data processing device instance.
[0091] Among them, registers are special memory units used in hardware to store data and control information. In data processing devices such as GPUs, register resources are essential for performing tasks such as graphics rendering and computing. Register resources can include information such as the base address of the register, the size of the register, and the access rights of the register (such as readable and writable). The resource structure records register resources so that data processing device instances can efficiently access and control them.
[0092] Interrupt resources include resources required by the interrupt mechanism associated with data processing devices (such as GPUs). An interrupt is a signal sent by hardware to software to notify the software that an important event has occurred (such as the completion of data processing, an error, etc.). Interrupt resources can include information such as the interrupt number (IRQ number), a pointer to the interrupt service routine (ISR), interrupt priority, and interrupt triggering mode (such as edge triggering or level triggering). The resource structure will record the interrupt resources required for interrupt processing so that the data processing device instance can respond to and handle interrupts in a timely manner.
[0093] In the disclosed embodiment, the system kernel management framework stores register resources and interrupt resources of multiple data processing device instances by creating a corresponding number of resource structures according to the number of data processing device instances. This enables different data processing device instances to perform processing tasks based on register resources and interrupt resources. In addition, whether adding new device instances or removing old device instances, the system can dynamically adjust resource allocation by creating or destroying corresponding resource structures. This supports device hot-plugging, dynamic resource management, and improved system scalability.
[0094] In a possible implementation, the instance scheduling management unit calls the corresponding data processing device instance to perform request processing based on the data stored in the created resource structure.
[0095] Each instance scheduling management unit can call the corresponding data processing device instance to process the request based on the data stored in its corresponding resource structure. For example, in a multi-GPU system, each GPU instance requires independent resources to ensure that they can execute tasks in parallel without interfering with each other. By creating a resource structure for each GPU, the system can efficiently manage and schedule these resources.
[0096] Figure 2 A structural schematic diagram of a data processing device management system provided according to an embodiment of the present disclosure is shown. The GPU platform device side registers a data processing device node on the platform bus, and its corresponding data processing device port is represented as / dev / dri / card0. The driver side of the platform driver creates a corresponding number of GPU instance scheduling management units 0 to n according to the number of GPU instances, and links the GPU instance scheduling management unit to the system kernel management framework through the interface drm_device of the system kernel management framework. In addition, the system kernel management framework will create a corresponding number of resource structures 0 to n according to the number of data processing device instances, and each resource structure is used to store register resources and interrupt resources of multiple data processing device instances.
[0097] Figure 3 A structural schematic diagram of a data processing device management system provided according to an embodiment of the present disclosure is shown. The user driver sends a GPU call request, which carries the identifier of the GPU scheduling management unit to be called. The user driver calls the data processing device port / dev / dri / card0 exposed by the data processing device node in the kernel based on the created context resource. The request is forwarded to the GPU scheduling management unit 0 (main instance scheduling management unit) through the interface drm_device of the system kernel management framework. The GPU scheduling management unit 0 determines the GPU scheduling management unit that needs to execute the task according to the identifier of the GPU scheduling management unit, and forwards the GPU call request to the corresponding GPU scheduling management unit. The GPU scheduling management unit that finally receives the GPU call request calls the corresponding GPU instance to perform task processing.
[0098] In a possible implementation, the management system may be run by an electronic device such as a terminal device or a server, and the terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The system may be implemented by a processor calling a computer-readable instruction stored in a memory. Alternatively, the system may be implemented by a server.
[0099] In addition, the present disclosure also provides a data processing device management method, an electronic device, a computer-readable storage medium, and a program, all of which can be used to implement any data processing device management system provided by the present disclosure. The corresponding technical solutions and descriptions can be found in the corresponding records in the method part and will not be repeated here.
[0100] Figure 4 A flowchart of a data processing device management method according to an embodiment of the present disclosure is shown. Figure 4 As shown, the method is applied to a data processing equipment management system, comprising:
[0101] In step S21, a data processing device port is registered on the platform bus;
[0102] In step S22, a corresponding number of instance scheduling management units are created according to the number of data processing device instances, and the instance scheduling management units are linked to the system kernel management framework through the interface of the system kernel management framework;
[0103] In step S23, the instance scheduling management unit is linked to the data processing device port;
[0104] In step S24, in response to a user-driven call request to the data processing device port, the data processing device instance is called through the instance scheduling management unit linked to the data processing device port.
[0105] The execution subject of the method is the data processing device management system provided by the present disclosure. The specific implementation of each step can be found in the relevant description in the system embodiment, which will not be repeated here.
[0106] In a possible implementation, the method further includes: obtaining the number of data processing device instances recorded in the private memory, and creating a corresponding number of instance scheduling management units.
[0107] In a possible implementation, the method further includes:
[0108] receiving a connection request sent by a user driver based on a data processing device port;
[0109] In response to the connection request, returning the number of data processing device instances to the user driver;
[0110] Among them, the user driver creates a context resource corresponding to the data processing device port, and the context resource is used to provide an isolated execution environment for multiple data processing device instances and maintain related resources required for calling multiple data processing device instances; the user driver calls the data processing device instance through the context resource based on the number of data processing device instances.
[0111] In a possible implementation, the method further includes:
[0112] Receiving a call request sent by a user driver, wherein the call request includes an identifier of a data processing device instance to be called;
[0113] In response to the call request, the data processing device instance is called based on the identifier of the data processing device instance.
[0114] In a possible implementation, in response to the call request, calling the data processing device instance based on the identifier of the data processing device instance includes:
[0115] In response to the call request, sending the call request to a main instance scheduling management unit among the multiple instance scheduling management units;
[0116] The main instance scheduling management unit determines, based on the identifier of the data processing device instance in the call request, a target instance scheduling management unit corresponding to the identifier;
[0117] In the case where the target instance scheduling management unit is the main instance scheduling management unit, the main instance scheduling management unit calls the corresponding data processing device instance to process the request;
[0118] In the case that the target instance scheduling management unit is another instance scheduling management unit, the main instance scheduling management unit forwards the call request to the target instance scheduling management unit, and the target instance scheduling management unit calls the corresponding data processing device instance to process the request.
[0119] In a possible implementation, the method further includes:
[0120] A corresponding number of resource structures are created according to the number of data processing device instances, and the resource structures are used to store register resources and interrupt resources of multiple data processing device instances.
[0121] In a possible implementation, the method further includes:
[0122] Based on the data stored in the created resource structure, the corresponding data processing device instance is called to perform request processing.
[0123] This method has a specific technical connection with the internal structure of the computer system, and can solve the technical problem of how to improve the hardware computing efficiency or execution effect (including reducing the amount of data storage, reducing the amount of data transmission, increasing the hardware processing speed, etc.), thereby obtaining the technical effect of improving the internal performance of the computer system in accordance with the laws of nature.
[0124] In some embodiments, the functions or modules included in the method provided in the embodiments of the present disclosure can be used to implement the system described in the above system embodiment. The specific implementation can refer to the description of the above system embodiment, and for the sake of brevity, it will not be repeated here.
[0125] The embodiment of the present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.
[0126] The embodiment of the present disclosure also proposes an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to implement the above system.
[0127] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device implements the above system.
[0128] The electronic device may be provided as a terminal, a server, or a device in other forms.
[0129] Figure 5 1 is a block diagram of an electronic device 1900 according to an embodiment of the present disclosure. For example, the electronic device 1900 may be provided as a server or a terminal device. Figure 5 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions that can be executed by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0130] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as a Microsoft Server operating system (Windows Server 2003). TM ), a graphical user interface operating system launched by Apple (Mac OSX TM ), a multi-user, multi-process computer operating system (Unix TM ), a free and open source Unix-like operating system (Linux TM ), an open source Unix-like operating system (FreeBSD TM ) or similar.
[0131] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0132] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0133] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, (but not limited to) an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.
[0134] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0135] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0136] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0137] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0138] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0139] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0140] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK) and the like.
[0141] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0142] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0143] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
[0144] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A data processing equipment management system, characterized in that: include: The device side of the platform driver registers a data processing device port on the platform bus; The driver end of the platform driver creates a corresponding number of instance scheduling management units according to the number of data processing device instances, and links the instance scheduling management units to the system kernel management framework through the interface of the system kernel management framework; A system kernel management framework, linking the instance scheduling management unit with the data processing device port; The system kernel management framework, in response to a user-driven call request to the data processing device port, calls the data processing device instance through an instance scheduling management unit linked to the data processing device port.
2. The management system according to claim 1, characterized in that: The driver end of the platform driver obtains the number of data processing device instances recorded in the private memory and creates a corresponding number of instance scheduling management units.
3. The management system according to claim 1, characterized in that: The user driver sends a connection request to the data processing device port; The system kernel management framework returns the number of data processing device instances to the user driver in response to the connection request; The user driver creates a context resource corresponding to the data processing device port, wherein the context resource is used to provide an isolated execution environment for multiple data processing device instances and maintain related resources required for calling multiple data processing device instances; The user driver calls the data processing device instance through the context resource based on the number of the data processing device instance.
4. The management system according to claim 1, characterized in that: The user driver sends a call request to the system kernel management framework, wherein the call request includes an identifier of a data processing device instance to be called; The system kernel management framework calls the data processing device instance in response to the calling request and based on the identifier of the data processing device instance.
5. The management system according to claim 1, characterized in that: The system kernel management framework sends the calling request to a main instance scheduling management unit among the multiple instance scheduling management units in response to the calling request; The main instance scheduling management unit determines, based on the identifier of the data processing device instance in the call request, a target instance scheduling management unit corresponding to the identifier; In the case where the target instance scheduling management unit is the main instance scheduling management unit, the main instance scheduling management unit calls the corresponding data processing device instance to process the request; In the case that the target instance scheduling management unit is another instance scheduling management unit, the main instance scheduling management unit forwards the call request to the target instance scheduling management unit, and the target instance scheduling management unit calls the corresponding data processing device instance to process the request.
6. The management system according to claim 1, characterized in that: The system kernel management framework creates a corresponding number of resource structures according to the number of data processing device instances, and the resource structures are used to store register resources and interrupt resources of multiple data processing device instances.
7. The management system according to claim 6, characterized in that: The instance scheduling management unit calls the corresponding data processing device instance to perform request processing based on the data stored in the created resource structure.
8. A data processing equipment management method, characterized in that: Applied to data processing equipment management systems, including: Register a data processing device port on the platform bus; According to the number of data processing device instances, a corresponding number of instance scheduling management units are created, and the instance scheduling management units are linked to the system kernel management framework through the interface of the system kernel management framework; Linking the instance scheduling management unit to the data processing device port; In response to a user-driven call request to the data processing device port, the data processing device instance is called through the instance scheduling management unit linked to the data processing device port.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the system described in any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the system according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Container access to graphics processing unit resources
CN107533469A
Device calling method and device for Web application program, equipment and medium
CN115421934A
Display device extended function management system
CN117891426A
Managing access to a resource pool of graphics processing units under fine grain control
US10262390B1
CO-PROCESSING TECHNIQUES ON HETEROGENEOUS GPUs INCLUDING IDENTIFYING ONE GPU AS A NON-GRAPHICS DEVICE
US20110063306A1