A method and system for synchronously switching performance modes of a Linux system platform and peripherals

By loading a peripheral performance mode synchronization mechanism module and initializing the peripheral list in the Linux system platform, the synchronous switching between peripheral performance mode and overall system performance mode is realized, solving the problem of mismatch between overall system and peripheral modes and ensuring high-performance use and energy-saving requirements of peripherals.

CN121029250BActive Publication Date: 2026-08-25KYLIN CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511098222.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-06
Publication Date
2026-08-25
Estimated Expiration
2045-08-06

AI Technical Summary

Technical Problem

In existing Linux system platforms, the performance modes of the whole machine and peripherals are mismatched, which causes peripherals to fail to exert their performance advantages or increases the power consumption of the whole machine, thus failing to meet energy-saving requirements.

Method used

By loading the peripheral performance mode synchronization mechanism module in the kernel, the peripheral list and message queue are initialized, and the interface is registered to realize the synchronous switching between peripheral performance mode and overall system performance mode. The peripheral driver adjusts its performance according to the custom matching relationship to match the overall system mode.

Benefits of technology

It achieves matching between peripheral performance mode and overall system performance mode, avoiding conflicts between overall system and peripheral modes, and ensuring high-performance use of peripherals and energy-saving requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121029250B_ABST
    Figure CN121029250B_ABST
Patent Text Reader

Abstract

The application discloses a kind of Linux system platform whole machine and peripheral performance mode synchronous switching method and system, method includes: loading peripheral performance mode synchronous mechanism module, according to current CPU working mode setting initial performance mode, initialization message queue, initialize peripheral list, load the platform configuration file driver of whole machine and initialize, register associated peripheral performance mode synchronous mechanism module;Load the peripheral driver of all peripherals and initialize, peripheral driver calls interface function according to demand, the peripheral with dynamic performance mode requirement is registered to peripheral list, while the performance mode of the peripheral with dynamic performance mode requirement is set to match initial performance mode;If new performance mode of whole machine is obtained by platform configuration file driver, the performance mode of peripheral in peripheral list is set to match new performance mode.The application realizes that peripheral performance mode matches the change of whole machine performance mode, and can effectively exert peripheral performance or more energy saving and environmental protection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic technology, and specifically to a method and system for synchronously switching the performance modes of the entire system platform and peripheral devices on a Linux system platform. Background Technology

[0002] Platform profile drivers are drivers used to manage system performance modes (such as power modes, thermal strategies, performance tuning, etc.). They allow the operating system to interact with firmware (such as BIOS / UEFI) to dynamically adjust system operating states (such as "energy-saving mode", "balanced mode", "high-performance mode"). Currently, various Linux kernel system platforms have implemented corresponding platform profile drivers, such as the Inspur Profile driver for Inspur's complete systems based on the domestic Linux kernel x86 platform.

[0003] However, since not all peripheral drivers support Linux system platform configuration file drivers, when the overall system performance mode is reset to high performance mode, peripherals may still operate in the default performance mode or other modes. This mismatch between the overall system performance mode and the peripheral performance mode prevents the peripherals from fully utilizing their performance advantages. Alternatively, when the overall system is operating in energy-saving mode, some peripherals may be operating in performance mode, leading to increased power consumption and failing to meet energy-saving requirements or standards. For example, when the overall system is operating in energy-saving mode, a system that synchronizes overall system and peripheral performance can instruct the graphics card driver to adjust the display refresh rate from 60Hz to 30Hz, resulting in greater energy savings for the entire system. Summary of the Invention

[0004] The technical problem to be solved by this invention is to provide a method and system for synchronously switching the performance modes of the entire system platform and peripheral devices in order to address the above-mentioned problems in the prior art. This method and system achieves the matching of peripheral device performance modes with changes in the overall system performance mode, thereby effectively maximizing the performance of peripheral devices.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for synchronously switching performance modes of the entire Linux system platform and its peripherals includes the following steps: The kernel loads the peripheral performance mode synchronization mechanism module. The peripheral performance mode synchronization mechanism module sets the initial performance mode and initializes the peripheral list according to the current performance of the whole machine. At the same time, it provides a performance mode synchronization mechanism registration interface and a shortcut key association registration interface. The kernel loads and initializes the platform configuration file driver for the entire machine, calls the shortcut key association registration interface to associate with the platform configuration file driver, and enables the peripheral performance mode synchronization mechanism module to associate with the shortcut key switching of performance mode. The kernel loads and initializes the peripheral drivers of all peripherals. Peripheral drivers of peripherals with dynamic performance mode requirements call the performance mode synchronization mechanism registration interface. The peripheral performance mode synchronization mechanism module registers peripherals with dynamic performance mode requirements to the peripheral list and sets the performance mode of peripherals with dynamic performance mode requirements to match the initial performance mode. If the platform configuration file driver obtains a new performance mode, it notifies the peripherals in the peripheral list through the peripheral performance mode synchronization mechanism module to match the new performance mode.

[0006] Furthermore, the peripheral performance mode synchronization mechanism module registers peripherals with dynamic performance mode requirements to the peripheral list in the following specific steps: The peripheral performance mode synchronization mechanism module waits for the peripheral driver to call the performance mode synchronization mechanism registration interface and return a value. If the return value is the specified value, the corresponding peripheral is registered in the peripheral list. If the return value is not the specified value, the performance mode of the corresponding peripheral is set to the default performance mode. If the wait times out, the performance mode of the corresponding peripheral is set to the default performance mode and an error message for the corresponding peripheral is generated.

[0007] Furthermore, after registering peripherals with dynamic performance mode requirements to the peripheral list, the peripheral performance mode synchronization mechanism module also includes a step of deregistering peripherals from the peripheral list, specifically including: The peripheral performance mode synchronization mechanism module waits for and receives peripheral deregistration requests, searches for the corresponding peripheral in the peripheral list, removes the found peripheral from the peripheral list, and sets the performance mode of the corresponding peripheral to the default performance mode.

[0008] Furthermore, when setting the performance mode of the corresponding peripheral to the default performance mode, the default performance mode information is sent to the peripheral driver of the corresponding peripheral through the peripheral performance mode synchronization mechanism module. The peripheral driver adjusts the performance of the corresponding peripheral according to the custom matching relationship to match the default performance mode.

[0009] Furthermore, when the performance mode of a peripheral device with dynamic performance mode requirements matches the initial performance mode, the peripheral device performance mode synchronization mechanism module sends the initial performance mode information to the peripheral driver of the peripheral device with dynamic performance mode requirements. The peripheral driver then adjusts the performance of the corresponding peripheral device according to a custom matching relationship to match the initial performance mode.

[0010] Furthermore, when the peripheral performance mode synchronization mechanism module notifies the peripherals in the peripheral list to match the new performance mode of the whole machine, the peripheral performance mode synchronization mechanism module traverses the peripheral list and uses a message queue to send the new performance mode information to the peripheral driver of each peripheral in the peripheral list. The peripheral driver adjusts the performance of the corresponding peripheral according to the custom matching relationship to match the new performance mode.

[0011] Furthermore, when the peripheral driver adjusts the performance of the corresponding peripheral according to the custom matching relationship, it includes: if the performance mode is high-performance mode, then the peripheral performance is adjusted to high-power performance; if the performance mode is energy-saving mode, then the peripheral performance is adjusted to low-power performance; if the performance mode is balanced mode, then the peripheral performance is adjusted to medium-power performance.

[0012] Furthermore, when the platform configuration file driver obtains the new performance mode of the whole machine, specifically, after the platform configuration file driver listens for the hotkey command or terminal command to reset the performance mode of the whole machine, it parses the content of the hotkey command or terminal command, obtains the new performance mode, and sends it to the peripheral performance mode synchronization mechanism module.

[0013] The present invention also proposes a computer system including a processor and a computer-readable storage medium interconnected, wherein a computer program in the computer-readable storage medium is executed by the processor to implement the steps of the method for synchronously switching the performance modes of the entire Linux system platform and its peripherals.

[0014] The present invention also proposes a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the method for synchronously switching the performance modes of the entire Linux system platform and its peripherals.

[0015] Compared with the prior art, the advantages of the present invention are as follows: This invention registers peripherals with dynamic performance mode requirements into a peripheral list, obtains the new performance mode of the whole machine through the platform configuration file driver, sets the performance mode of the peripherals in the peripheral list to match the new performance mode of the whole machine, has no special requirements for the peripheral drivers, ensures that the performance mode of the whole machine and the performance mode of the peripherals match, and avoids conflicts between the performance mode of the whole machine and the working mode of the peripherals, which would affect the high-performance use of the peripherals or save energy and remain idle. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the method steps in an embodiment of the present invention.

[0017] Figure 2 This is a schematic diagram illustrating how the peripheral driver is notified by the platform configuration file driver to adjust the peripheral performance when resetting the overall system performance mode in an embodiment of the present invention. Detailed Implementation

[0018] The present invention will be further described below with reference to the accompanying drawings and specific preferred embodiments, but this does not limit the scope of protection of the present invention.

[0019] This embodiment proposes a method for synchronously switching the overall system performance mode and peripheral performance modes on a Linux system platform. It records each peripheral requiring synchronized performance mode through a peripheral list, shares the current overall system performance mode in real time via a message queue, and notifies each peripheral in the peripheral list that has this requirement. It also supports the registration and deregistration of peripherals in the peripheral list. This effectively solves problems such as power consumption and performance overflow caused by mismatches between the overall system performance mode and peripheral performance modes, and the failure of peripheral operating modes to dynamically adjust and match when the user adjusts the overall system performance mode. Figure 1 As shown, the method includes the following steps: S1) The kernel loads the peripheral performance mode synchronization mechanism module. This module sets the initial performance mode based on the current CPU operating mode, initializes the message queue, and initializes the peripheral list. It provides a performance mode synchronization mechanism registration interface and a shortcut key association registration interface. S2) The kernel loads and initializes the platform configuration file driver for the whole machine. The platform configuration file driver calls the interface function of the peripheral performance mode synchronization mechanism module to notify the peripheral performance mode synchronization mechanism module to associate with the platform configuration file driver. The platform configuration file driver, such as the Inspur Profile driver, supports the hotkey Fn + Q to switch performance modes, so that the peripheral performance mode synchronization mechanism module can associate with the shortcut key to switch performance modes. S3) During the kernel loading of peripheral drivers, peripherals with dynamic performance mode requirements call the interface function of the peripheral performance mode synchronization mechanism module during driver initialization. This causes the peripheral performance mode synchronization mechanism module to register peripherals with dynamic performance mode requirements to the peripheral list and set the performance mode of peripherals with dynamic performance mode requirements to match the initial performance mode. S4) If the platform configuration file driver obtains the new performance mode of the whole machine, the platform configuration file driver will notify the peripheral performance mode synchronization mechanism module of the new performance mode. The peripheral performance mode synchronization mechanism module will traverse and notify the peripherals in the peripheral list to match the new performance mode.

[0020] The specific code for the above steps is implemented through a small kernel subsystem or kernel module. The following explanation is based on the domestic Inspur complete machine.

[0021] In step S2 of this embodiment, the platform configuration file driver is specifically the Inspur Profile driver. It should be noted that if applied to other platforms, it is necessary to associate it with the platform configuration file driver of those other platforms. Step S1 specifically includes the following steps: Step S01: Kernel initialization, loading the peripheral performance mode synchronization mechanism module; Step S02: The peripheral device performance mode synchronization mechanism module obtains the current overall system performance and sets the initial performance mode, sets flag bits, initializes the message queue, and initializes the peripheral device list. It provides a performance mode synchronization mechanism registration interface and a shortcut key association registration interface.

[0022] / / Synchronization mechanism for registering interfaces devm_performance_mode_sync_register(peripheral); / / Synchronization mechanism to cancel interface devm_performance_mode_sync_unregister(peripheral); / / Initialize peripheral list init_devm_list(); / / Initialize message queue init_sync_notify(); Step S03: Load the platform configuration file driver (Inspur Profile driver), call the shortcut key association registration interface, and notify the performance mode synchronization mechanism module to associate with the Inspur Profile driver. The Inspur Profile driver supports switching performance modes using the shortcut key Fn + Q. A pseudocode example is shown below: / / Inspur profile driver initialization function call In this embodiment, step S3 achieves performance mode information sharing by registering peripherals with dynamic performance mode requirements to the peripheral list. Step S3 specifically includes the following steps: Step S04: Kernel initialization, loading peripheral drivers, peripheral driver initialization. Peripheral drivers with dynamic performance mode requirements call the interface functions provided by the peripheral performance mode synchronization mechanism module to register the requirement to synchronize the overall system performance mode as registration information. After successful registration, the peripheral performance mode synchronization mechanism module returns the initial performance mode to the corresponding peripheral driver, realizing a peripheral performance mode that matches the current overall system performance mode. A pseudocode example is as follows: / / Peripheral driver initialization calls the registration function Return value = devm_performance_mode_sync_register(peripheral); / / Check if the return value is normal and preset the peripheral performance mode. if (return value) Set the peripheral performance mode to match the current overall system performance mode. else Set default peripheral performance mode / / The peripheral performance synchronization mechanism module adds peripherals to the peripheral list. add_devm_in_list(); As can be seen from the above, before registering peripherals with dynamic performance mode requirements to the peripheral list, it is necessary to identify the peripherals with dynamic performance mode requirements. Specifically, this includes: the peripheral performance mode synchronization mechanism module waits for the peripheral driver to initialize and then calls the return value of the performance mode synchronization mechanism registration interface. If the return value is a specified value, the corresponding peripheral is identified as having dynamic performance mode requirements, and its performance mode is set to the initial performance mode to match the current overall system performance. If the return value is not a specified value, the performance mode of the corresponding peripheral is set to the default performance mode. If the wait times out, the performance mode of the corresponding peripheral is set to the default performance mode, and an error message for the corresponding peripheral is generated to remind the kernel engineer to debug the peripheral driver.

[0023] In this embodiment, when the performance mode of a peripheral device with dynamic performance mode requirements matches the initial performance mode, the peripheral device performance mode synchronization mechanism module sends the initial performance mode information to the peripheral driver of the peripheral device with dynamic performance mode requirements. The peripheral driver adjusts the performance of the corresponding peripheral device according to a custom matching relationship to match the initial performance mode, including: if the performance mode is high-performance mode, then the peripheral device performance is adjusted to high-power performance; if the performance mode is energy-saving mode, then the peripheral device performance is adjusted to low-power performance; if the performance mode is balanced mode, then the peripheral device performance is adjusted to medium-power performance.

[0024] For example, when the peripheral is a graphics card, in high-performance mode, the graphics card driver adjusts the graphics card's performance to high-power performance by increasing the graphics card's operating frequency and frame rate; in power-saving mode, the graphics card driver adjusts the graphics card's performance to low-power performance by decreasing the graphics card's operating frequency, power consumption, and frame rate; and in balanced mode, the graphics card driver adjusts the graphics card's performance to medium-power performance through dynamic frequency adjustment.

[0025] In this embodiment, when the performance mode of the corresponding peripheral is set to the default performance mode, the information of the default performance mode is sent to the peripheral driver of the corresponding peripheral through the peripheral performance mode synchronization mechanism module. The peripheral driver adjusts the performance of the corresponding peripheral according to the custom matching relationship to match the default performance mode. The default performance mode usually refers to the state of the peripheral when no specific performance adjustment is made. It aims to balance performance and power consumption to adapt to most usage scenarios. Therefore, adjusting the performance of the peripheral to medium power consumption will not consume too much power or sacrifice too much performance.

[0026] Step S05: The peripheral performance mode synchronization mechanism module receives the peripheral driver registration information, inserts the peripheral into its own peripheral list, and realizes the registration of peripherals with dynamic performance mode requirements in the peripheral list.

[0027] / / Peripheral performance mode synchronization mechanism module notifies peripherals for all devices (loop through all peripherals) The notification list shows that the current performance mode of the peripheral device has been switched, and the new performance mode. / / Peripheral driver The peripheral driver obtains the current system mode through a function callback, and then resets the peripheral performance mode. It should be noted that peripherals requiring dynamic performance modes are not static. Users may change these requirements based on actual needs. Therefore, after registering peripherals requiring dynamic performance modes in the peripheral list, the following should also be included: To unregister a peripheral from the peripheral device list, follow these steps: The peripheral performance mode synchronization mechanism module waits for and receives peripheral deregistration requests, searches for the corresponding peripheral in the peripheral list, removes the found peripheral from the peripheral list, and simultaneously sets the performance mode of the corresponding peripheral to the default performance mode. In this embodiment, the peripheral deregistration request can be initiated by the user modifying the return value of the peripheral driver from a specified value to another value through operation commands or configuration software, and then forwarding the new return value to the peripheral performance mode synchronization mechanism module. After receiving the new return value, the peripheral performance mode synchronization mechanism module removes the corresponding peripheral from the peripheral list and sets the performance mode of the corresponding peripheral to the default performance mode.

[0028] To register a new peripheral in the peripheral list, follow these steps: The peripheral performance mode synchronization mechanism module waits for and receives peripheral registration requests, adds the corresponding peripheral to the peripheral list, and sets the performance mode of the corresponding peripheral to the current performance mode. In this embodiment, the peripheral registration request may be a user modifying the return value of the peripheral driver from other values ​​to a specified value through operation commands or configuration software, and then forwarding the new return value to the peripheral performance mode synchronization mechanism module. After receiving the new return value, the peripheral performance mode synchronization mechanism module adds the corresponding peripheral as a peripheral with dynamic performance mode requirements to the peripheral list and sets the performance mode of the corresponding peripheral to match the current performance mode of the entire machine.

[0029] In this embodiment, when the performance mode of a peripheral device with dynamic performance mode requirements matches the current performance mode, the peripheral device performance mode synchronization mechanism module sends the current performance mode information to the peripheral driver of the peripheral device with dynamic performance mode requirements. The peripheral driver adjusts the performance of the corresponding peripheral device according to a custom matching relationship to match the current performance mode, including: if the performance mode is high-performance mode, then the peripheral device performance is adjusted to high-power performance; if the performance mode is energy-saving mode, then the peripheral device performance is adjusted to low-power performance; if the performance mode is balanced mode, then the peripheral device performance is adjusted to medium-power performance.

[0030] In step S4 of this embodiment, the peripheral list ensures that all peripherals requiring dynamic performance modes switch their operating modes synchronously when the overall system performance mode is switched. Figure 2 As shown, the specific steps include: Step S06: Peripheral terminal users reset the overall system performance mode via shortcut keys or the terminal settings window. Inspur profile driver supports resetting the overall system performance mode using the Fn + Q shortcut key, and also supports resetting the overall system performance mode via the Inspur profile driver device node. After listening to the hotkey command or terminal command to reset the overall system performance mode, the Inspur profile driver parses the content of the hotkey command or terminal command to obtain the new overall system performance mode.

[0031] Step S07: The Inspur profile driver calls the interface function provided by the peripheral performance mode synchronization mechanism module to notify the peripheral performance mode synchronization mechanism module to reset the current overall system performance mode. The peripheral performance mode synchronization mechanism module reads the current overall system performance mode, sets the performance mode flag, traverses the peripheral list that needs dynamic performance mode switching, and notifies the peripheral drivers of all peripherals in the peripheral list to adjust the current performance mode of the peripherals to adapt to the new overall system performance mode. In this embodiment, when setting the performance mode of the peripherals in the peripheral list to match the new overall system performance mode, a message queue is used to send the information of the new overall system performance mode to the peripheral driver of each peripheral in the peripheral list. Step S08: After the peripheral driver receives the message that the overall system performance mode has changed, it resets the peripheral performance mode to adapt to the new overall system performance mode. Specifically, the peripheral driver adjusts the performance of the corresponding peripheral according to the custom matching relationship to match the new overall system performance mode, including: if the performance mode is high performance mode, the peripheral performance is adjusted to high power consumption performance; if the performance mode is energy saving mode, the peripheral performance is adjusted to low power consumption performance; if the performance mode is balanced mode, the peripheral performance is adjusted to medium power consumption performance.

[0032] This embodiment also proposes a computer system, including a processor and a computer-readable storage medium interconnected, wherein a computer program in the computer-readable storage medium is executed by the processor to implement the steps of the method for synchronously switching the performance modes of the entire Linux system platform and its peripherals.

[0033] This embodiment also proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for synchronously switching the performance modes of the entire Linux system platform and its peripherals.

[0034] In summary, this invention proposes a method and system for synchronously switching the overall system performance mode and peripheral performance mode on a Linux system platform. It utilizes message queues and peripheral lists to support synchronous switching between overall system performance modes and peripheral performance modes. It has no special requirements for peripheral drivers, good compatibility, and does not restrict specific peripherals. Peripherals that need to synchronize overall system performance modes can share overall system performance mode information, ensuring that the overall system performance mode and peripheral performance modes match, avoiding conflicts between overall system performance modes and peripheral operating modes, and preventing peripherals from performing at high performance or being idle for energy saving.

[0035] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A method for synchronously switching performance modes of the entire Linux system platform and its peripherals, characterized in that, Includes the following steps: The kernel loads the peripheral performance mode synchronization mechanism module. The peripheral performance mode synchronization mechanism module sets the initial performance mode and initializes the peripheral list according to the current performance of the whole machine. At the same time, it provides a performance mode synchronization mechanism registration interface and a shortcut key association registration interface. The kernel loads and initializes the platform configuration file driver for the entire machine, calls the shortcut key association registration interface to associate with the platform configuration file driver, and enables the peripheral performance mode synchronization mechanism module to associate with the shortcut key switching of performance mode. The kernel loads and initializes the peripheral drivers of all peripherals. Peripheral drivers of peripherals with dynamic performance mode requirements call the performance mode synchronization mechanism registration interface. The peripheral performance mode synchronization mechanism module registers peripherals with dynamic performance mode requirements to the peripheral list and sets the performance mode of peripherals with dynamic performance mode requirements to match the initial performance mode. If the platform configuration file driver obtains a new performance mode, it notifies the peripherals in the peripheral list through the peripheral performance mode synchronization mechanism module to match the new performance mode.

2. The method for synchronously switching performance modes of the entire Linux system platform and peripheral devices according to claim 1, characterized in that, The peripheral performance mode synchronization mechanism module registers peripherals with dynamic performance mode requirements into the peripheral list through the following steps: The peripheral performance mode synchronization mechanism module waits for the peripheral driver to call the performance mode synchronization mechanism registration interface and return a value. If the return value is the specified value, the corresponding peripheral is registered in the peripheral list. If the return value is not the specified value, the performance mode of the corresponding peripheral is set to the default performance mode. If the wait times out, the performance mode of the corresponding peripheral is set to the default performance mode and an error message for the corresponding peripheral is generated.

3. The method for synchronously switching performance modes of the entire Linux system platform and peripheral devices according to claim 2, characterized in that, After registering peripherals with dynamic performance mode requirements to the peripheral list, the peripheral performance mode synchronization mechanism module also includes a step of deregistering peripherals from the peripheral list, specifically including: The peripheral performance mode synchronization mechanism module waits for and receives peripheral deregistration requests, searches for the corresponding peripheral in the peripheral list, removes the found peripheral from the peripheral list, and sets the performance mode of the corresponding peripheral to the default performance mode.

4. The method for synchronously switching performance modes of the entire Linux system platform and peripheral devices according to claim 2 or 3, characterized in that, When setting the performance mode of the corresponding peripheral to the default performance mode, the peripheral performance mode synchronization mechanism module sends the default performance mode information to the peripheral driver of the corresponding peripheral. The peripheral driver then adjusts the performance of the corresponding peripheral according to a custom matching relationship to match the default performance mode.

5. The method for synchronously switching performance modes of the entire Linux system platform and peripheral devices according to claim 1, characterized in that, When the performance mode of a peripheral device that requires a dynamic performance mode is matched with the initial performance mode, the peripheral device performance mode synchronization mechanism module sends the initial performance mode information to the peripheral driver of the peripheral device that requires a dynamic performance mode. The peripheral driver then adjusts the performance of the corresponding peripheral device according to a custom matching relationship to match the initial performance mode.

6. The method for synchronously switching performance modes of the entire Linux system platform and peripheral devices according to claim 1, characterized in that, When the peripheral performance mode synchronization mechanism module notifies the peripherals in the peripheral list to match the new performance mode, the peripheral performance mode synchronization mechanism module traverses the peripheral list and uses a message queue to send the information of the new performance mode to the peripheral driver of each peripheral in the peripheral list. The peripheral driver adjusts the performance of the corresponding peripheral according to the custom matching relationship to match the new performance mode.

7. The method for synchronously switching performance modes of the entire Linux system platform and peripheral devices according to claim 5 or 6, characterized in that, When a peripheral driver adjusts the performance of a corresponding peripheral based on a custom matching relationship, it includes: if the performance mode is high-performance mode, adjusting the peripheral's performance to high-power performance; if the performance mode is energy-saving mode, adjusting the peripheral's performance to low-power performance; and if the performance mode is balanced mode, adjusting the peripheral's performance to medium-power performance.

8. The method for synchronously switching performance modes of the entire Linux system platform and peripheral devices according to claim 1, characterized in that, When the platform configuration file driver obtains the new performance mode of the whole machine, it listens for the hotkey command or terminal command to reset the performance mode of the whole machine, parses the content of the hotkey command or terminal command, obtains the new performance mode, and sends it to the peripheral performance mode synchronization mechanism module.

9. A computer system, characterized in that, The system includes an interconnected processor and a computer-readable storage medium, wherein a computer program in the computer-readable storage medium is executed by the processor to implement the steps of the method for synchronously switching the overall and peripheral performance modes of a Linux system platform as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for synchronously switching the performance modes of the entire Linux system platform and its peripherals as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Operation system state detection method and device, equipment and medium

    CN118152017A

  • Peripheral system and methods for synchronizing the peripheral system

    DE102013104819A1