A virtual heterogeneous global task scheduling and tuning method based on homogeneous processors
By adopting a virtual heterogeneous global task scheduling and tuning method in the server architecture, homogeneous CPUs are virtualized into efficient and energy-saving cores, and through global task scheduling and power adjustment, it solves the difficulty of finding a balance between high efficiency and energy saving for general-purpose servers. problems and achieve high efficiency and energy saving effects of the system.
Patent Information
- Application Number
- CN202210611427.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-05-31
AI Technical Summary
The existing general server architecture is based on homogeneous processors, making it difficult to find a balance between high efficiency and energy saving. Especially when dealing with complex business requirements, existing solutions cannot achieve both high efficiency and energy saving.
Adopt a virtual heterogeneous global task scheduling and optimization method based on homogeneous processors. The operating system turns on or off the virtual heterogeneous processing function according to the workload threshold, virtualizes the homogeneous CPU into efficient cores and energy-saving cores, and uses global tasks to Scheduling and PCU+FIVR perform power adjustment to achieve task distribution and refined management granularity.
Under the homogeneous processor architecture, the performance distribution of heterogeneous processors is realized to achieve overall system efficiency and energy saving. The problem of insufficient management granularity is solved through refined power adjustment strategies, achieving both high efficiency and energy saving. Effect.
Smart Images

Figure CN114816718B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of server technology, and in particular to a virtual heterogeneous global task scheduling and tuning method based on homogeneous processors. Background Art
[0002] With the continuous rise and development of cloud computing technology and related derivative technologies and products, the business volume of the Internet industry has gradually shown an explosive growth. As the physical carrier of virtual data, the server's storage capacity, processing capacity and interaction capacity for data fundamentally determine the upper limit of cloud computing. With the growth of Internet user business volume, the network's real-time data throughput has also shown a geometric growth. Based on such a large number of interactions, the work efficiency of server nodes and the balance of work energy consumption have become a technical high ground.
[0003] How can server nodes be both efficient and energy-efficient? In the current server market, for non-embedded application scenarios, most products are designed based on homogeneous multi-processor architectures, which are collectively referred to as two-way, four-way, or eight-way servers. The CPUs in these server architectures are all exactly the same homogeneous CPUs, which means that each Core is equal to the system.
[0004] Based on this architecture, the way to control processor power consumption is mostly based on frequency control. For example, Intel's EIST intelligent frequency reduction technology can automatically adjust the processor voltage and frequency according to different system workloads to reduce power consumption and heat generation.
[0005] However, this conflicts with the aforementioned "achieving both energy saving and high efficiency at the same time". Because based on the homogeneous architecture, the overall reduction in frequency means an overall reduction in efficiency. For this reason, AMD proposed the big.LITTLE architecture, which achieves this goal by matching a high-performance large core with several energy-saving small cores, and allocating and migrating tasks through the OS. After adding the big and small core algorithms to the Win10 scheduler, Intel also launched the Lakefield and Alder Lake generations.
[0006] However, both AMD and Intel's CPUs are based on MCP (muti-chip packaged) or MCM (muti-chip module), and implement HMP (Heterogeneous Mutiprocessing) on a single chip. The process is based on 3D Packaged, and chiplet stacking is achieved through Interposer or EMIB (Embedded Muti-die Interconnect Bridge). The stacking of chiplets will inevitably lead to an increase in TDP (Thermal Design Power) per unit area. Therefore, this technology is currently mostly used in embedded products.
[0007] For server products, there are more threads and resources, and the overall performance allocation is more complicated. The Base CPU Die is larger than that of embedded products. If you want to use packaging similar to HBM (High Bandwidth Memory) technology to achieve chiplet stacking, the cost will increase. The current packaging process is not suitable for this usage environment. It is not realistic to develop products only for computing-intensive models such as servers.
[0008] For the existing general server architecture, take the Intel Eagle Stream platform 4-way server as an example. The core of the big.LITTLE architecture is the combination of big and small cores in physical implementation, which cannot be applied to current server products. The current server products use a homogeneous processor architecture. When the overall WL exceeds the business requirements and the business requirements are relatively complex, it is impossible to achieve "high efficiency and energy saving" as similar heterogeneous processor architectures can. If high efficiency and energy saving are to be achieved, the above-mentioned EIST technology is generally adopted, which has a low granularity.
[0009] The existing general server architecture is based on chiplet-level heterogeneous control, and the granularity is not suitable for existing server scenarios. Therefore, the existing solution cannot achieve high efficiency and energy saving under the existing X86 general server architecture. Summary of the invention
[0010] The existing general server architecture is based on chiplet-level heterogeneous control, and the granularity is not suitable for existing server scenarios. Therefore, the existing solution cannot achieve high efficiency and energy saving under the existing X86 general server architecture.
[0011] To solve the above problems, the present invention provides a virtual heterogeneous global task scheduling and tuning method based on homogeneous processors to realize virtual heterogeneity under the existing server architecture, achieving both high efficiency and energy saving. Based on the homogeneous processor architecture under the existing X86 server platform, the workload of the heterogeneous processor architecture is "distributed according to work", heterogeneous virtualization is performed based on homogeneous hardware, and power consumption and energy saving are achieved under the premise of meeting performance through global task scheduling, and the management granularity is refined.
[0012] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0013] In a first aspect, in an embodiment provided by the present invention, a virtual heterogeneous global task scheduling and tuning method based on homogeneous processors is provided, comprising the following steps:
[0014] The operating system (OS) determines whether to enable the Virtually Heterogeneous MutiProcessing function based on whether the actual workload is greater than a preset load threshold. If the actual workload is less than the preset load threshold and the core does not need to work at full rated capacity, the Virtually Heterogeneous MutiProcessing function is enabled to virtualize the non-heterogeneous CPUs at the physical layer in a homogeneous manner with the core as the granularity to obtain virtual cores.
[0015] The operating system divides the virtualized CPU into multiple clusters (Clusters) for regulation according to the SNC4 strategy;
[0016] When the operating system receives a command (Command), it determines the task priority according to the actual parameters of the operating system and outputs a priority list (Priority List);
[0017] The Linux scheduler dispatches each task to the corresponding virtual core according to the priority list; when the priority of the task changes, the scheduler migrates the task to the core;
[0018] When the operating system determines that the current actual workload reaches a preset load threshold, the virtualization mode is exited, and the CPU operates normally at the physical layer.
[0019] As a further solution of the present invention, the operating system determines whether to enable the virtual heterogeneous processing function based on whether the actual workload is greater than a preset load threshold. If the actual workload is greater than the preset load threshold and the core needs to perform all rated work, there is no need to enable the virtual heterogeneous processing function and the core can operate according to the original control strategy.
[0020] As a further solution of the present invention, the non-heterogeneous CPUs of the physical layer are virtualized in a homogeneous manner with the kernel as the granularity to obtain the virtual core, including:
[0021] Homogeneous virtualization is used to virtualize two cores (Core) of a homogeneous CPU into one efficient core (VCore_Efficient), which is used to undertake tasks with high time-related requirements and heavy workloads when working at rated frequency;
[0022] The remaining cores of the homogeneous CPU are virtualized as energy-saving cores (VCore_Energy Saving) to undertake tasks with low time-related requirements and light workloads.
[0023] As a further solution of the present invention, the non-heterogeneous CPU of the physical layer is virtualized in a homogeneous manner with the core as the granularity to obtain the virtual core, and also includes: arranging the high-efficiency core and the energy-saving core according to the actual Fan-out packaging of the chip.
[0024] As a further solution of the present invention, the non-heterogeneous CPU of the physical layer is virtualized in a homogeneous manner with the kernel as the granularity to obtain a virtual core, thereby obtaining a virtualized virtual heterogeneous multi-processing unit (VirtuallyHeterogeneous MutiProcessing Unit).
[0025] As a further solution of the present invention, the operating system divides the virtualized CPU into multiple clusters for regulation according to the SNC4 strategy, and the regulation method includes:
[0026] Task scheduling is performed in units of virtual cores, and tasks are assigned according to their priorities.
[0027] As a further solution of the present invention, the operating system divides the virtualized CPU into multiple clusters for regulation according to the SNC4 strategy, and further includes:
[0028] The high-efficiency cores and energy-saving cores are paired one by one to form clusters, which are managed in clusters.
[0029] As a further solution of the present invention, the actual parameters of the operating system include time-related demand and workload.
[0030] As a further solution of the present invention, the virtual heterogeneous global task scheduling and tuning method based on homogeneous processors also includes: proposing power regulation (Power Regulating) with a granularity of core based on PCU (Packaged Control Unit) and FIVR (Fully Integrated Voltage Ragulator), using the PCU to control the frequency of the CPU core to master the frequency of each core, and using FIVR to control the power supply voltage (Vcc) of the CPU core to control whether the power supply of each core is turned off.
[0031] As a further solution of the present invention, a temperature sensor is also connected to the CPU core, and the temperature sensor is used to detect the temperature of the CPU core, and the FIVR is used to determine whether to turn off the power of the corresponding core according to the temperature detected by the temperature sensor.
[0032] As a further solution of the present invention, when the task priority changes, the scheduler migrates the task to a core. If the operating system determines that the priority of the task has decreased, the process switches to a corresponding high-efficiency core or energy-saving core in the same cluster.
[0033] In a second aspect, in another embodiment provided by the present invention, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of a virtual heterogeneous global task scheduling and tuning method based on homogeneous processors when loading and executing the computer program.
[0034] In a third aspect, in another embodiment provided by the present invention, a storage medium is provided, storing a computer program, which, when loaded and executed by a processor, implements the steps of the virtual heterogeneous global task scheduling and tuning method based on homogeneous processors.
[0035] The technical solution provided by the present invention has the following beneficial effects:
[0036] The virtual heterogeneous global task scheduling and tuning method based on homogeneous processors provided by the present invention realizes virtualization with core as the granularity on the basis of homogeneous processor architecture, and forms a corresponding heterogeneous multiprocessing (Heterogeneous MutiProcessing) architecture; the introduction of the big.LITTLE concept is realized under the existing server architecture, so that tasks are allocated according to energy, and the overall system is "highly efficient and energy-saving"; and, based on PCU and FIVR, a power regulation (Power Regulating) scheme with the granularity of the core is proposed, which can effectively solve the problem of insufficient management granularity under the current server homogeneous CPU architecture, and achieve "energy saving and high efficiency".
[0037] The virtual heterogeneous global task scheduling and tuning method based on homogeneous processors of the present invention is based on kernel virtualization, a power consumption management strategy with kernel as the granularity, and overall task scheduling based on virtual heterogeneous processing, so as to realize "distribution according to work" of heterogeneous processor architecture, perform heterogeneous virtualization based on homogeneous hardware, and realize power consumption saving under the premise of meeting performance through global task scheduling, thereby refining the management granularity.
[0038] These and other aspects of the present invention will be more clearly understood in the following description of the embodiments. It should be understood that the above general description and the following detailed description are only exemplary and explanatory and cannot limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments of the present invention. In the drawings:
[0040] Figure 1 This is a schematic diagram of the Linux Scheduler working on the AMD big.LITTE architecture.
[0041] Figure 2 This is a schematic diagram of the 4CPU interconnection topology of the Intel Eagle Stream platform.
[0042] Figure 3 The present invention is a flowchart of a virtual heterogeneous global task scheduling and tuning method based on homogeneous processors according to an embodiment of the present invention.
[0043] Figure 4 The figure is a schematic diagram of the overall architecture topology of a virtual heterogeneous global task scheduling and tuning method based on homogeneous processors according to an embodiment of the present invention.
[0044] Figure 5The present invention is a schematic diagram of a homogeneous CPU in a virtual heterogeneous global task scheduling and tuning method based on homogeneous processors according to an embodiment of the present invention.
[0045] Figure 6 The present invention is a schematic diagram of the internal Core interconnection of a homogeneous CPU in a virtual heterogeneous global task scheduling and tuning method based on homogeneous processors in an embodiment of the present invention.
[0046] Figure 7 The figure is a CPU Core PV mapping relationship diagram in a virtual heterogeneous global task scheduling and tuning method based on homogeneous processors according to an embodiment of the present invention.
[0047] Figure 8 The figure is a CPU Core PV mapping relationship diagram in a virtual heterogeneous global task scheduling and tuning method based on homogeneous processors according to an embodiment of the present invention.
[0048] Fig. 9 The present invention is a simplified schematic diagram of CPU Virtual Core interconnection in a virtual heterogeneous global task scheduling and tuning method based on homogeneous processors in an embodiment of the present invention.
[0049] Fig.10 The present invention is a schematic diagram of balanced management under the SNC4 strategy in a virtual heterogeneous global task scheduling and tuning method based on homogeneous processors according to an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0051] In some of the processes described in the specification and claims of the present invention and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this application or executed in parallel, and the sequence numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this application are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.
[0052] The following will be combined with the drawings in the exemplary embodiments of the present invention to clearly and completely describe the technical solutions in the exemplary embodiments of the present invention. Obviously, the exemplary embodiments described are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0053] Since the current packaging technology is not suitable for this usage environment, it is not realistic to develop products for computing-intensive models such as servers. This application proposes a virtual heterogeneous global task scheduling and tuning method based on homogeneous processors to achieve virtual heterogeneity under the existing server architecture, achieving both high efficiency and energy saving.
[0054] Due to the AMD big.LITTLE core architecture currently suitable for embedded products and the current general server CPU architecture. Take AMD's A15+7 as an example. It combines the performance of Cortex-A15 and the energy saving of Cortex-A7. As a large core, A15 works at a higher voltage and frequency, consumes more energy, and is used for heavy computing tasks; A7, as a small core, has half the performance of A15, but its power consumption is 1 / 7 of that.
[0055] Then, in the Linux manager, CS (Cluster Switching), IKS (In-Kernel Switching) and GTS (Global Task Scheduling) are used to realize the intelligent allocation of specific task processes at the OS level, such as Figure 1 shown.
[0056] For the existing general server architecture, taking the Intel Eagle Stream platform 4-way server as an example, an applicable interconnection method is as follows Figure 2 As shown, the four CPUs must be of the same model, and the CPUs are interconnected through UPI links.
[0057] However, in the existing general server architecture, when managing the heterogeneous processor architecture, the heterogeneous processors are usually virtually mapped into homogeneous processors and handed over to the software for task processing and execution, or the heterogeneous processors are synchronized into a homogeneous model that supports the same frequency, and the dependency between the peak temperature and task allocation is calculated to achieve on-demand allocation of temperature to achieve power consumption regulation, or the best allocation of workloads is performed for the different performance of different processing components at the same temperature to achieve QoS (Quality of Service) optimization.
[0058] However, the core of the big.LITTLE architecture is the combination of big and small cores in physical implementation, which is not applicable to current server products. Moreover, current server products use a homogeneous processor architecture. When the overall WL exceeds the business requirements and the business requirements are relatively complex, it is impossible to achieve "high efficiency and energy saving" as similar heterogeneous processor architectures can do. If high efficiency and energy saving are to be achieved, the EIST technology mentioned above is generally adopted, which has a low granularity.
[0059] In addition, the above existing technologies are all based on chiplet-level heterogeneous control, and the granularity is not suitable for existing server scenarios.
[0060] In summary, the existing solutions cannot achieve both high efficiency and energy saving under the existing X86 general server architecture.
[0061] The virtual heterogeneous global task scheduling and tuning method based on homogeneous processors provided by the present invention realizes "work-based distribution" of heterogeneous processor architectures for the homogeneous processor architectures under the existing X86 server platform, performs heterogeneous virtualization based on homogeneous hardware, and achieves power consumption saving under the premise of meeting performance through global task scheduling, thereby refining the management granularity.
[0062] Specifically, the embodiments of the present application are further described below in conjunction with the accompanying drawings.
[0063] See also Figure 3 As shown, an embodiment of the present invention provides a virtual heterogeneous global task scheduling and tuning method based on homogeneous processors, and the virtual heterogeneous global task scheduling and tuning method based on homogeneous processors specifically includes the following steps:
[0064] S1. The operating system determines whether to enable the virtual heterogeneous processing function according to whether the actual workload is greater than a preset load threshold. If the actual workload is less than the preset load threshold and the core does not need to work at full rated capacity, the virtual heterogeneous processing function is enabled to virtualize the non-heterogeneous CPU of the physical layer in a homogeneous manner with the core as the granularity to obtain a virtual core.
[0065] S2, the operating system divides the virtualized CPU into multiple clusters for regulation according to the SNC4 strategy;
[0066] S3. When the operating system receives the command, it determines the task priority according to the actual parameters of the operating system and outputs a priority list;
[0067] S4, the Linux scheduler dispatches each task to the corresponding virtual core according to the priority list; when the priority of the task changes, the scheduler performs kernel migration on the task;
[0068] S5. When the operating system determines that the current actual workload reaches a preset load threshold, the virtualization mode is exited, and the CPU operates normally at the physical layer.
[0069] In this embodiment, the operating system determines whether to enable the virtual heterogeneous processing function based on whether the actual workload is greater than a preset load threshold. If the actual workload is greater than the preset load threshold and the core needs to perform all rated work, the virtual heterogeneous processing function does not need to be enabled and the core operates according to the original control strategy.
[0070] The virtual heterogeneous global task scheduling and tuning method based on homogeneous processors of the present application is a method of isomorphic virtual heterogeneous processing units on the physical basis of a homogeneous CPU architecture, so as to achieve task allocation according to capabilities and realize the overall system "both efficient and energy-saving".
[0071] See also Figure 4 As shown in the figure, the specific scheduling and tuning execution operation includes the following steps:
[0072] S10: OS (Operating System, referred to as OS, i.e., operating system) determines whether it is necessary to enable the Virtually Heterogeneous MutiProcessing function according to the actual situation of the total workload. If not, it works with the original control strategy.
[0073] S20: If the OS determines that the current workload is not heavy and the core does not need to work at full capacity, the Virtually Heterogeneous function is enabled to virtualize the non-heterogeneous CPUs at the physical layer.
[0074] S30: OS divides the virtualized CPU into four clusters (Clusters) for regulation according to the SNC4 policy.
[0075] S40: When the OS receives the command, it determines the task priority according to the actual situation (time-related requirements, work compliance and other actual parameters) and outputs a priority list.
[0076] S51: The Linux scheduler dispatches each task to the appropriate virtual core according to the priority list to achieve "both high efficiency and energy saving".
[0077] S52: When a task priority is found to have changed, the scheduler has the authority to perform Core migration on the task.
[0078] S60: When the OS determines that the current workload (WorkLoad) reaches the threshold, it exits the virtualization mode and the CPU works normally at the physical layer.
[0079] In an embodiment of the present application, the actual parameters of the operating system include time-related demand and workload.
[0080] In some embodiments of the present application, the non-heterogeneous CPU of the physical layer is virtualized in a homogeneous manner with the kernel as the granularity to obtain the virtual core, including:
[0081] Homogeneous virtualization is used to virtualize two cores (Core) of a homogeneous CPU into one efficient core (VCore_Efficient), which is used to undertake tasks with high time-related requirements and heavy workloads when working at rated frequency;
[0082] The remaining cores of the homogeneous CPU are virtualized as energy-saving cores (VCore_Energy Saving) to undertake tasks with low time-related requirements and light workloads.
[0083] In one embodiment of the present application, an architecture consisting of four homogeneous 72-core 4MC (Memory Controller) CPUs is taken as an example. Of course, actual application scenarios include but are not limited to the technical solutions exemplified in the present application.
[0084] See also Figure 5 As shown, in the embodiment of the present application, the 4MC72Core general-purpose CPUs involve two cores sharing the same L2 Cache. Figure 2 The topology shown in the figure realizes interconnection. The core is connected to the cache, the cache is connected to the MC, and the MC is hung on the memory bus. At the same time, there are UPI modules on the four corners of the CPU chip (CPU Die) to achieve overall interconnection. Under the original homogeneous architecture, when a command is issued, due to the homogeneity, all cores of the OS are equal. Assuming that the instruction falls on Core 17 of CPU 0, the Core then accesses the adjacent Cache, and the Cache misses and then accesses the main memory (Main Memory) to complete a basic instruction.
[0085] Figure 6This is a schematic diagram of the internal Core interconnection of the 72CoreCPU involved in the embodiment of the present application. In the virtual heterogeneous global task scheduling and tuning method based on homogeneous processors of the present application, the homogeneous virtualization method virtualizes two Cores into one efficient core (VCore_Efficient), which works at the rated frequency and undertakes tasks with higher time-related requirements and heavier workloads (WorkLoad); the remaining Cores are virtualized into energy-saving cores (VCore_Energy Saving) to undertake tasks with lower time-related requirements and lighter workloads (WorkLoad). The specific PV mapping relationship is as follows: Figure 7 shown.
[0086] In some embodiments of the present application, the non-heterogeneous CPU of the physical layer is virtualized in a homogeneous manner with the core as the granularity to obtain the virtual core, and also includes: arranging the high-efficiency core and the energy-saving core according to the actual Fan-out packaging of the chip.
[0087] In the embodiments of the present application, in order to realize the efficient function of the efficient core (VCore_Efficient) working at the rated voltage to bear the time-related high demand and heavy workload (WorkLoad). When the energy-saving core (VCore_Energy Saving) realizes its energy-saving task, relative to AMD's big.LITTLE architecture, AMD chooses to directly use its Cortex-A7 designed specifically for energy saving on the integrated Chiplet. For this application, the Core of the Anisomeric CPU is physically equal, but the application scenario based on the server makes its package substrate (Package Substrate) relatively larger, and various chips (Die) are integrated on the substrate (Substrate) or through an inserter (InterPoser) or EMIB technology, which provides the feasibility of separately adjusting the virtualized "small core", and the arrangement of the two virtual cores can be designed according to the actual Fan-out package of the chip.
[0088] In this way, some relatively less urgent tasks with lighter workloads can be run on small cores. At the same time, some functions of the virtual cores can be virtually selectively castrated with virtual cores as the granularity. This function castration is carried out according to specific business scenarios. For example, for some tasks that are not too important, there is no need to perform non-transparent encryption facing the system, similar to SGX, and it is not important whether there is a leak or not.
[0089] As for how to adjust power consumption according to the granularity of virtual cores, Intel's PCU (Packaged Control Unit) controls the PLL of the CPU core, so it can control the frequency of each core; it controls Vcc, so it can turn off the power of each core; it is also connected to the temperature sensor in the core, which can be used as one of the judgment conditions. Combined with FIVR (Fully Integrated Voltage Ragulator), it is completely possible from a hardware perspective.
[0090] In some embodiments of the present application, the virtual heterogeneous global task scheduling and tuning method based on homogeneous processors also includes: proposing power regulation (Power Regulating) with a granularity of core based on PCU (Packaged Control Unit) and FIVR (Fully Integrated Voltage Ragulator), using the PCU to control the frequency of the CPU core to master the frequency of each core, and using FIVR to control the power supply voltage (Vcc) of the CPU core to control whether the power of each core is turned off.
[0091] The CPU core is also connected to a temperature sensor, which is used to detect the temperature of the CPU core, and the FIVR determines whether to turn off the power of the corresponding core according to the temperature detected by the temperature sensor.
[0092] To solve the above problem, the non-heterogeneous CPU of the physical layer is virtualized in a homogeneous manner with the kernel as the granularity, a virtual core is obtained, and a virtual heterogeneous multi-processing unit (VirtuallyHeterogeneous MutiProcessing Unit) after virtualization is obtained. Figure 8 shown.
[0093] In some embodiments of the present application, the operating system divides the virtualized CPU into multiple clusters for regulation according to the SNC4 policy, and the regulation method includes:
[0094] Task scheduling is performed in units of virtual cores, and tasks are assigned according to their priorities.
[0095] like Figure 8 As shown, the arrangement in the figure is only an ideal arrangement, and the specific arrangement needs to be performed according to the above-mentioned combination of packaging and PCU information. Based on the arrangement, OS-based task scheduling management is performed, and practical applications include but are not limited to the examples listed in this application.
[0096] like Fig. 9 As shown, task scheduling is performed in units of virtual cores, similar to the GTS method, and tasks are directly assigned according to their priorities. Fig. 9 The SNC4 marked in the figure is mentioned above, and only 1 / 4 partition of SNC4 is taken as an example here.
[0097] In some embodiments of the present application, the operating system divides the virtualized CPU into multiple clusters for regulation according to the SNC4 policy, and further includes: pairing the high-efficiency cores with the energy-saving cores to form clusters one by one, and managing them in clusters. Fig.10 As shown, the efficient cores (VCore_Efficient) and energy-saving cores (VCore_Energy Saving) are paired one by one to form a cluster, and then managed in clusters. The purpose is to improve its flexibility.
[0098] In some embodiments of the present application, when the priority of the task changes, the scheduler (Scheduler) performs kernel (Core) migration on the task. If the operating system determines that the priority of the task has decreased, the process is switched to the corresponding high-efficiency core or energy-saving core in the same cluster. For example, there is a process running on the high-efficiency core (VCore_Efficient), but after running for a period of time, the OS determines that its priority has decreased. In this case, the process will be switched to the energy-saving core (VCore_Energy Saving) of the same cluster (Cluster). However, there is also a limitation, because the energy-saving core (VCore_Energy Saving) has been modified compared to the normal Core, and some of its features may not be available. The OS needs to identify this risk and make a decision.
[0099] In the embodiments of the present application, as to which VCore should operate at which voltage and frequency, this needs to be adjusted according to the actual situation and the power consumption adjustment strategy of the overall system.
[0100] Of course, when the overall workload is so high that the existing architecture cannot meet business needs well, the OS can also choose to release permissions to perform full rated work or overload and overclock work.
[0101] Therefore, the virtual heterogeneous global task scheduling and tuning method based on homogeneous processors provided by the present invention realizes virtualization with core as the granularity on the basis of homogeneous processor architecture, and forms a corresponding heterogeneous multiprocessing (Heterogeneous MutiProcessing) architecture; the introduction of the big.LITTLE concept is realized under the existing server architecture, so that tasks are allocated according to energy, and the overall system is "both efficient and energy-saving"; and, based on PCU and FIVR, a power regulation (Power Regulating) scheme with a granularity of core is proposed, which can effectively solve the problem of insufficient management granularity under the current server homogeneous CPU architecture, and achieve "both energy-saving and efficient".
[0102] The virtual heterogeneous global task scheduling and tuning method based on homogeneous processors of the present invention is based on kernel virtualization, a power consumption management strategy with kernel as the granularity, and overall task scheduling based on virtual heterogeneous processing, so as to realize "distribution according to work" of heterogeneous processor architecture, perform heterogeneous virtualization based on homogeneous hardware, and realize power consumption saving under the premise of meeting performance through global task scheduling, thereby refining the management granularity.
[0103] In an embodiment of the present invention, a computer device is provided, the computer device comprising a memory and a processor, the memory storing a computer program, the processor being configured to execute the computer program stored in the memory. The memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the steps in the above method embodiment.
[0104] In one embodiment of the present invention, a storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiment are implemented.
[0105] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the process of the embodiment of the above-mentioned method. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory.
[0106] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A virtual heterogeneous global task scheduling and tuning method based on homogeneous processors, characterized in that: The following steps are involved: The operating system determines whether to enable the virtual heterogeneous processing function based on whether the actual workload is greater than the preset load threshold. If the actual workload is less than the preset load threshold and the core does not need to work at full rated capacity, the virtual heterogeneous processing function is enabled to virtualize the non-heterogeneous CPUs at the physical layer in a homogeneous manner with the core as the granularity to obtain virtual cores. The operating system divides the virtualized CPU into multiple clusters for regulation according to the SNC4 policy; When the operating system receives the command, it determines the task priority according to the actual parameters of the operating system and outputs a priority list; The Linux scheduler dispatches each task to the corresponding virtual core according to the priority list; When the priority of the task changes, the scheduler performs kernel migration on the task; When the operating system determines that the current actual workload reaches a preset load threshold, the virtualization mode is exited and the CPU works normally at the physical layer; The non-heterogeneous CPUs of the physical layer are virtualized in a homogeneous manner with the kernel as the granularity to obtain the virtual core, including: Homogeneous virtualization is used to virtualize two cores of a homogeneous CPU into one high-efficiency core, which is used to undertake tasks with high time-related requirements and heavy workloads when working at rated frequency; The remaining cores of the homogeneous CPU are virtualized as energy-saving cores to undertake tasks with low time-related requirements and light workloads; The non-heterogeneous CPU of the physical layer is virtualized in a homogeneous manner with the kernel as the granularity to obtain a virtual core, thereby obtaining a virtual heterogeneous multi-processing unit after virtualization; The operating system divides the virtualized CPU into multiple clusters according to the SNC4 policy for regulation, and the regulation method includes: Task scheduling is performed in units of virtual cores, and tasks are assigned according to their priorities; The operating system divides the virtualized CPU into multiple clusters for regulation according to the SNC4 strategy, and further includes: The high-efficiency cores and energy-saving cores are paired one by one to form clusters, which are managed in clusters.
2. The virtual heterogeneous global task scheduling and tuning method based on homogeneous processors according to claim 1 is characterized in that: The operating system determines whether to enable the virtual heterogeneous processing function according to whether the actual workload is greater than a preset load threshold. If the actual workload is greater than the preset load threshold and the core needs to perform all rated work, the virtual heterogeneous processing function does not need to be enabled and the core operates according to the original control strategy.
3. The virtual heterogeneous global task scheduling and tuning method based on homogeneous processors according to claim 1 is characterized in that: The method of virtualizing the non-heterogeneous CPU of the physical layer in a homogeneous manner with the core as the granularity to obtain the virtual core also includes: arranging the high-efficiency core and the energy-saving core according to the actual Fan-out packaging of the chip.
4. The virtual heterogeneous global task scheduling and tuning method based on homogeneous processors according to claim 1 is characterized in that: The virtual heterogeneous global task scheduling and tuning method based on homogeneous processors also includes: proposing power regulation with a granularity of core based on PCU and FIVR, using the PCU to control the frequency of the CPU core to master the frequency of each core, and using FIVR to control the power supply voltage of the CPU core to control whether the power supply of each core is turned off.
5. The virtual heterogeneous global task scheduling and tuning method based on homogeneous processors according to claim 4 is characterized in that: The CPU core is also connected to a temperature sensor, which is used to detect the temperature of the CPU core, and the FIVR determines whether to turn off the power of the corresponding core according to the temperature detected by the temperature sensor.
6. The virtual heterogeneous global task scheduling and tuning method based on homogeneous processors according to claim 1, characterized in that: When the priority of the task changes, the scheduler performs kernel migration on the task. If the operating system determines that the priority of the task decreases, the process switches to the corresponding high-efficiency kernel or energy-saving kernel in the same cluster.
