WO2025215802A1 - 休止状態制御装置、休止状態制御方法およびプログラム - Google Patents

休止状態制御装置、休止状態制御方法およびプログラム

Info

Publication number
WO2025215802A1
WO2025215802A1 PCT/JP2024/014714 JP2024014714W WO2025215802A1 WO 2025215802 A1 WO2025215802 A1 WO 2025215802A1 JP 2024014714 W JP2024014714 W JP 2024014714W WO 2025215802 A1 WO2025215802 A1 WO 2025215802A1
Authority
WO
WIPO (PCT)
Prior art keywords
sleep
core
thread
state
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/JP2024/014714
Other languages
English (en)
French (fr)
Inventor
育生 大谷
奨悟 斎藤
廣 名取
圭 藤本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NTT Inc
NTT Inc USA
Original Assignee
Nippon Telegraph and Telephone Corp
NTT Inc USA
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp, NTT Inc USA filed Critical Nippon Telegraph and Telephone Corp
Priority to PCT/JP2024/014714 priority Critical patent/WO2025215802A1/ja
Publication of WO2025215802A1 publication Critical patent/WO2025215802A1/ja
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/3287Power saving characterised by the action undertaken by switching off individual functional units in the computer system
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/329Power saving characterised by the action undertaken by task scheduling
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present invention relates to a hibernation control device, a hibernation control method, and a program.
  • the CPU has a function that controls the CPU's idle state through hardware control, called the LPI hardware control function.
  • the LPI hardware control function is often called CPU idle or C-state, and the idle state of the LPI hardware control function will be explained below.
  • CPU idle when the CPU load decreases, the CPU attempts to save power by turning off the power supply to part of the CPU circuit (Non-Patent Document 1).
  • Fig. 33 is a table showing an example of a CPU idle state. Note that state definitions differ depending on CPU hardware, so Fig. 33 is merely a reference example. As shown in Figure 33, there are grades C0 to C6 for CPU idle states, and as the time without CPU load increases, the CPU transitions to a deeper idle state. A deeper idle state reduces CPU power consumption, but the deeper the idle state, the longer it takes to return to normal, which can be an issue in terms of low latency.
  • the definition of the idle state varies depending on the CPU hardware. For example, there are models that do not have C4 or C5, and models in which the state after C1 is C1E. The deeper the state, the greater the power saving effect, but the longer it takes to return from the idle state.
  • the depth to which the CPU transitions to idle state is controlled by the CPU hardware and is CPU product dependent. In other words, it is often not possible to control it from the OS kernel, etc.
  • Figure 34 is a table showing an example of the maximum time it takes to transition to a new state (RESIDENCY) and the time it takes to return to normal (WAKE-UP LATENCY).
  • Figure 34 shows C-state information for an Intel Xeon CPU E5-26X0 v4 ("Intel” and "Intel Xeon” are registered trademarks).
  • Linux kernel 4 (“Linux” is a registered trademark) provides two types of CPU idle governors to manage CPU idle states (C-states).
  • a ladder governor initially allows only the shallowest idle state transition, and if there are no tasks in the period leading up to the periodic processing, it gradually transitions to a deeper idle state. However, if there is no periodic processing, the system will remain in a shallow idle state, so it must be based on periodic processing.
  • a menu governor uses a heuristic approach to estimate the idle period and idle state. For example, the menu governor estimates the next idle period based on the last eight idle periods and transitions to an idle state appropriate for that idle period. This allows the menu governor to directly transition to a deeper idle state.
  • the menu governor used in systems without periodic processing is a method that estimates the appropriate idle state depth for the next idle period based on the performance of the most recent idle period. The menu governor is effective for workloads with regular idle times, but its effectiveness is limited for irregular workloads.
  • FIG. 35 is a diagram for explaining the logic outline of the menu governor.
  • the menu governor records the most recent idle time (step S30). Then, the menu governor estimates the next idle time (step S31). For example, based on the idle time recorded in step S30, if the deviation is small, the average value is adopted as the next idle time. Based on the estimate of the next idle time, the menu governor estimates an appropriate depth of the idle state (step S32). For example, if the estimated value of the next idle time is equal to the recovery time from the idle state, it is determined that the idle state is too deep, and the idle state is transitioned to a shallower idle state.
  • Neither of the two types of ladder governors and menu governors mentioned above has a mechanism to issue a pre-wake-up command from idle state, return the system to preparations, and prepare for a new task when it arrives. This creates the problem of a delay corresponding to the time it takes to return when a task is assigned while the system is in a deep idle state.
  • Figures 36 and 37 are C-state transition images of the CPU core used for calculations.
  • the horizontal axis indicates elapsed time, and the vertical axis indicates idle state grades C0 to C6.
  • Figure 36 shows a case where the no-task time is short, while Figure 37 shows a case where the no-task time is long.
  • a period P0 is a period during which the CPU is performing a certain task.
  • a period P1 is a period after this task has been completed and there are no other tasks.
  • the CPU has transitioned to state C2 via state C1.
  • a new task occurs at time t0 .
  • a period P2 is a delay period until the CPU returns from state C2 to state C0. After the CPU transitions to state C0, the task that occurred at time t0 is executed in period P3 .
  • the period P4 shown in Figure 37 is a period during which the CPU is performing task processing.
  • the period P5 is a period during which the task processing has ended and there are no tasks. At this time, the CPU is gradually transitioning from state C1 to state C5.
  • a new task occurs at time t1 .
  • a period P6 is the period from the occurrence of this task to the start of processing the new task, and is a delay period during which the CPU returns from state C5 to state C0. Thereafter, during period P7 , the task that occurred at time t1 is executed.
  • the CPU core is in a shallow idle state at time t0 when the task is generated, and the period P2 until recovery after the task is generated is short.
  • the period P6 until recovery will be longer than in the example shown in Fig. 36. In other words, if the CPU core falls into a deep idle state, it will take a long time to recover, impairing real-time performance.
  • the aforementioned extended delay period until recovery is a problem that cannot be ignored in a system in which real-time performance is given top priority, such as a base band unit (BBU) in a wireless access system.
  • BBU base band unit
  • the base station may adopt a setting that disables transitions to the idle state or limits the transitions to a limited depth, such as the C1 state. In other words, tuning may be performed to prioritize real-time performance at the expense of power saving.
  • the present invention is not limited to a virtual Radio Access Network (vRAN), and the BBU in a wireless access system is merely an example.
  • vRAN virtual Radio Access Network
  • SMT technology There are systems that utilize simultaneous multithreading (SMT) on general-purpose servers to logically increase the number of CPU cores and execute data processing in parallel.
  • the CPU has a simultaneous multithreading (SMT) function, which allows one physical core to operate separately as multiple logical cores.
  • SMT simultaneous multithreading
  • SMT such as Intel Hyper Threading
  • SMT allows logical cores to share the CPU's microinstruction processor, increasing the processor utilization rate.
  • the idle state of the physical core changes depending on the idle state of the logical core.
  • FIG. 38 is a diagram for explaining the types of c-states in the SMT technology.
  • a package (CPU socket) 50 includes two physical cores 51, and each physical core 51 has a logical core 52 that executes two threads.
  • the right side of Figure 38 is an image diagram showing the power saving effect and performance impact of package c-state (PCx), core c-state (CCx), and c-state (Cx), which correspond to package (CPU socket) 50, physical core 51, and logical core 52, respectively, in the left side of Figure 38.
  • the power saving effect and performance impact are both greatest for package c-state (PCx), decreasing in order of core c-state (CCx), and c-state (Cx).
  • a physical core will not drop into a core c-state (CCx) unless all logical cores have dropped into a certain c-state (Cx).
  • Cx c-state
  • PCx package c-states
  • PCx package c-states
  • CCx core c-state
  • CCx core c-state
  • Figure 39 is a diagram explaining issue (1) in the c-state of a CPU using SMT, shown in the left diagram of Figure 38.
  • Physical #0 in Figure 39 represents “physical core #0” due to space limitations in the diagram notation
  • Logical #0 and "Logical #4” represent “Logical core #0” and “Logical core #4” (similar notation will be used in the following relevant figures).
  • the thread of "logical core #0” executes process A, after which the c-state of "logical core #0" drops to the lowest grade C6 ( Figure 33).
  • a physical core can only be put into an idle state when all logical cores on that physical core are no longer processing. As a result, the timing at which each logical core enters the idle state varies, which creates the issue of excess power consumption as the physical core cannot be effectively put to sleep (transitioned to a deeper core c-state).
  • FIG. 40 is a diagram for explaining the problem (2) in the c-state of a CPU using the SMT shown in the left diagram of FIG.
  • "logical core #0" is in the shallow c-state C1 ( Figure 33), and then returns from sleep, and the thread of "logical core #0” executes process A (symbol b1 in Figure 40).
  • "logical core #4" is in the deepest c-state C6 ( Figure 33), and then returns from sleep, and the thread of "logical core #4" executes process B (symbol b2 in Figure 40).
  • the physical core is matched to the shallowest c-state among the logical cores, but the depth of the logical core's c-state is left to kernel and hardware control.
  • the present invention was made in light of this background, and its objective is to effectively transition a physical core to a deeper core c-state, thereby reducing power consumption.
  • a sleep state control device for a data processing system that uses simultaneous multithreading of the CPU to logically increase the number of CPU cores and assign data processing threads to logical cores to execute data processing in parallel.
  • the sleep state control device includes a sleep thread control unit that uses a sleep thread that operates with a higher priority than the data processing thread to indicate the execution timing of a sleep command and the sleep duration, and the sleep thread control unit executes the sleep thread, which is an instruction that forces logical cores corresponding to the same physical core to pause at the same timing and for the same duration, thereby pausing all of the logical cores on the same physical core.
  • FIG. 1 is a schematic configuration diagram of a hibernation state control device according to a first embodiment of the present invention
  • FIG. 1 is a diagram illustrating the basic concept of the present invention
  • 3A and 3B are diagrams illustrating the basic operation of the hibernation state control device according to the first embodiment of the present invention.
  • 4 is a flowchart of a pause instruction process in the basic operation of the pause state control device according to the first embodiment of the present invention.
  • 4 is a flowchart of a hibernation execution process in the basic operation of the hibernation state control device according to the first embodiment of the present invention.
  • 10A and 10B are diagrams illustrating another form of the basic operation of the hibernation state control device according to the first embodiment of the present invention.
  • FIG. 10 is a flowchart of a pause instruction process in another mode of the basic operation of the pause state control device according to the first embodiment of the present invention.
  • 10 is a flowchart of a hibernation execution process in another mode of the basic operation of the hibernation state control device according to the first embodiment of the present invention.
  • FIG. 10 is an explanatory diagram of a c-state of a CPU using SMT of a hibernation state control device according to a second embodiment of the present invention.
  • FIG. 10 is an explanatory diagram of a c-state of a CPU using SMT of a hibernation state control device according to a second embodiment of the present invention.
  • FIG. 10 is a diagram illustrating the operation of a hibernation control device according to a second embodiment of the present invention.
  • 10 is a flowchart of a pause instruction process in the operation of a pause state control device according to a second embodiment of the present invention.
  • 10 is a flowchart of a hibernation execution process in another form of the basic operation of the hibernation state control device according to the second embodiment of the present invention.
  • FIG. 10 is an explanatory diagram of a c-state of a CPU using SMT of a hibernation state control device according to a third embodiment of the present invention.
  • FIG. 10 is a diagram illustrating the operation of a hibernation state control device according to a third embodiment of the present invention.
  • FIG. 10 is a flowchart of a pause time determination process in the operation of a pause state control device according to a third embodiment of the present invention.
  • FIG. 11 is an explanatory diagram illustrating the operation of a pause time determination process of a pause state control device according to a third embodiment of the present invention.
  • 10 is a flowchart of a pause instruction process in the operation of a pause state control device according to a third embodiment of the present invention.
  • 10A and 10B are diagrams illustrating a c-state determination method of a hibernation state control device according to a third embodiment of the present invention.
  • 10A and 10B are diagrams illustrating a c-state designation method of a hibernation state control device according to a third embodiment of the present invention.
  • FIG. 10 is a diagram illustrating the operation of a hibernation state control device according to a fourth embodiment of the present invention.
  • FIG. 13 is a diagram illustrating an example of a table of an idle state power DB of a hibernation state control device according to a fourth embodiment of the present invention.
  • 10 is a flowchart of a pause time determination process in the operation of a pause state control device according to a fourth embodiment of the present invention.
  • FIG. 11 is an explanatory diagram illustrating the operation of a pause time determination process of a pause state control device according to a fourth embodiment of the present invention.
  • 10 is a flowchart of an idle state determination process in the operation of a hibernation state control device according to a fourth embodiment of the present invention.
  • FIG. 10 is a flowchart of a pause instruction process in the operation of a pause state control device according to a fourth embodiment of the present invention.
  • FIG. 11 is an explanatory diagram of a c-state of a CPU using SMT of a hibernation state control device according to a fifth embodiment of the present invention.
  • FIG. 11 is an explanatory diagram of a c-state of a CPU using SMT of a hibernation state control device according to a fifth embodiment of the present invention.
  • FIG. 11 is a diagram illustrating the operation of a hibernation state control device according to a fifth embodiment of the present invention.
  • 13 is a flowchart of a core allocation determination process in the operation of a sleep state control device according to a fifth embodiment of the present invention.
  • FIG. 13 is a diagram illustrating an example of the operation of a core allocation unit by executing a core allocation determination process of a hibernation control device according to a fifth embodiment of the present invention.
  • FIG. 2 is a hardware configuration diagram of a server according to an embodiment of the present invention.
  • FIG. 10 is a table showing an example of the state of the C-state. This is a table showing an example of the maximum time required to transition to a certain state (RESIDENCY) and the time required to recover (WAKE-UP LATENCY).
  • FIG. 10 is a diagram illustrating an outline of the logic of a menu governor. This is an image diagram of the c-state transition of the CPU core used for calculation. This is an image diagram of the c-state transition of the CPU core used for calculation.
  • FIG. 1 is a diagram illustrating types of c-states in SMT technology.
  • FIG. 1 is a diagram illustrating the problem (1) in the c-state of a CPU using SMT.
  • FIG. 10 is a diagram illustrating the problem (2) in the c-state of a CPU using SMT.
  • (First embodiment) 1 is a schematic diagram of a hibernation control device according to a first embodiment of the present invention.
  • the present invention is applied to a hibernation control device that saves power by transitioning a physical core to a deep core c-state.
  • the present invention can also be applied to a hibernation control device that saves power by transitioning a CPU to a deep package c-state.
  • a server having a hibernation control device 100 includes HW (hardware) 10, an OS/driver 20, and an application (APL) 30.
  • the hardware 10 includes a CPU 11 configured to include a core.
  • the CPU 11 is a processor that can transition to a power saving state to reduce its own processing capability.
  • the OS/driver 20 includes a CPU idle driver 21 , a scheduler 22 , a core allocation unit 23 , and a CPU utilization rate acquisition unit 24 .
  • the hibernation control device 100 is provided in a data processing system that uses simultaneous multithreading of the CPU to logically increase the number of CPU cores and assigns data processing threads 101 (hereinafter, in the description of functions and operations, referred to as data processing threads Dn as appropriate) to the logical cores to execute data processing in parallel.
  • the hibernation control device 100 is located on the APL 30 and has a hibernation thread control unit 110, a timer unit 120, a hibernation time determination unit 130, a processing time measurement unit 140, a processing time DB 150, an idle state power DB 160, an idle state determination unit 170, a utilization rate DB 180, a core allocation determination unit 190, a data processing thread 101 (data processing thread Dn), and a hibernation thread 102 (hereinafter, referred to as hibernation thread In as appropriate in the description of functions and operations).
  • a data processing thread 101 (data processing thread Dn) is a processing unit instruction that is assigned to a logical core and executes data processing within an application.
  • data processing thread Dn has a sleep instruction function that, upon completion of its own processing, calls sleep thread In and yields its processing.
  • Data processing thread Dn sets a sleep time SPm for physical core M corresponding to logical core N in timer unit 120 (step S32 in Figure 7, described below).
  • Data processing thread Dn issues a sleep instruction to sleep thread In corresponding to logical core N, specifying sleep state Cm, and sets itself from the running state to the standby state (step S33 in Figure 7, described below).
  • the dormant thread 102 (dormant thread In) operates at a higher priority than the data processing threads Dn.
  • the inactive thread In receives an instruction from the inactive thread control unit 110 and executes a command to inactivate a logical core, thereby inactivating the logical core.
  • the implementation image is that the sleeping thread In calls the function epoll_wait(), which puts the thread into sleep mode until a timer or event occurs.
  • the inactive thread In receives a sleep instruction from the data processing thread Dn (step S21 in FIG. 5, which will be described later).
  • the inactive thread In Upon receiving the sleep instruction from the inactive thread control unit 110, the inactive thread In enters an execution state with higher priority than the data processing thread Dn, and preempts (seizes) CPU time from the data processing thread Dn.
  • the inactive thread In issues a pause command to transition to the paused state notified by the inactive thread control unit 110 (step S21 in FIG. 5, described later).
  • the inactive thread In is called when a wake-up command is issued from the timer unit 120 (step S22 in FIG. 5, described later). Thereafter, the inactive thread In changes itself from an executable state to a standby state, and yields the CPU usage time to the data processing thread Dn (step S23 in FIG. 5, described later).
  • the inactive thread In receives a sleep instruction from the data processing thread Dn (step S41 in Figure 8, described later).
  • the data processing thread Dn has terminated and therefore no preemption of CPU time occurs.
  • the inactive thread In issues a sleep instruction to transition to the sleep state notified by the data processing thread Dn (step S42 in Figure 8, described later).
  • the inactive thread In is invoked when a wake-up instruction is issued from the timer unit 120, and changes itself from a ready state to a standby state, yielding CPU time to the data processing thread Dn (step S43 in Figure 8, described later).
  • the sleep thread control unit 110 instructs the sleep thread In on the timing of executing the sleep command and the sleep period.
  • the sleep thread control unit 110 uses the sleep thread In, which operates at a higher priority than the data processing thread Dn, to specify the execution timing of the sleep instruction and the sleep duration.
  • the sleep thread control unit 110 executes the sleep thread In, which is an instruction that forces logical cores corresponding to the same physical core to sleep at the same timing and for the same duration, thereby causing all logical cores on the same physical core to sleep.
  • the sleep thread control unit 110 uses multiple sleep threads In, thereby causing "all logical cores on the same physical core” to sleep.
  • the paused thread control unit 110 forces logical cores corresponding to the same physical core to pause at the same timing and for the same duration.
  • the paused thread control unit 110 in the first embodiment (see FIG. 3 below)
  • the idle thread control unit 110 issues an instruction to idle thread In corresponding to logical core N to specify the idle state Cm (step S13 in FIG. 4 described later).
  • the idle thread control unit 110 sets the idle time SPm of physical core M corresponding to logical core N in the timer unit 120 (step S14 in FIG. 4 described later).
  • the idle thread control unit 110 issues a scheduling instruction to the scheduler 22 to prevent data processing threads from being started in any logical core on physical core M for a period SPm from the current time (step S54 in FIG. 12, described later).
  • the idle thread control unit 110 issues a sleep instruction to the idle thread In corresponding to logical core N by specifying a sleep state Cm (step S55 in FIG. 12, described later).
  • the idle thread control unit 110 sets the sleep time SPm of the physical core M corresponding to logical core N in the timer unit 120 (step S56 in FIG. 12, described later).
  • the inactive thread control unit 110 issues an inactive instruction to the inactive thread In corresponding to the logical core N, specifying the inactive state Cm (step S83 in FIG. 18 described later).
  • timer unit 120 After the sleep time of the physical core M has elapsed, the timer unit 120 issues a wake-up instruction to the sleep thread In on the logical core corresponding to the physical core.
  • Timer unit 120 in the first embodiment and other embodiments In the first embodiment, after the sleep time SPm of the physical core M has elapsed, the timer unit 120 issues a wake-up instruction to the sleep thread In on the logical core N corresponding to the physical core M (step S15 in FIG. 4 described below, and step S34 in FIG. 7 described below).
  • Timer unit 120 in the second embodiment (see FIG. 11 below) In the second embodiment, after the pause time SPm of the physical core M has elapsed, the timer unit 120 issues a wake-up instruction to the sleep thread In on the logical core N corresponding to the physical core M (step S57 in FIG. 12 described later).
  • Timer unit 120 in the third embodiment (see FIG. 15 below)
  • the timer unit 120 issues a wake-up instruction to the sleep thread In on the logical core N corresponding to the physical core M (step S85 in FIG. 18 described later).
  • pause time determination unit 130 determines the pause timing and pause time for the physical core based on the processing deadline and the past performance of the processing time.
  • the sleep time determination unit 130 measures the processing completion time of the logical core with the longest processing time among the logical cores on the same physical core, and sets the forced sleep start timing to coincide with the processing completion time of that logical core, and the sleep time specified as the processing deadline minus the processing completion time. It predicts the available sleep time based on past processing time results, and determines the forced sleep start timing and sleep time.
  • the pause time determination unit 130 in the third embodiment references the processing time DB 150 and obtains the processing time DLn of the data processing thread on the logical core N (step S71 in FIG. 16 described later).
  • the pause time determination unit 130 calculates the allowable pause time TLn in the corresponding pause cycle by multiplying the processing time DLn by a safety factor SF (step S72 in FIG. 16 described later).
  • the pause time determination unit 130 compares the allowable pause times TLn of the logical cores N included in the same physical core M and determines the longest TLn as the pause time TPm of the physical core M (step S73 in FIG. 16 described later).
  • the pause time determination unit 130 sets the pause time SPm of the physical core M corresponding to the logical core N in the timer unit 120 (step S84 in Figure 18, described below).
  • the processing time measurement unit 140 measures the processing time taken by the data processing thread Dn to execute data processing.
  • the processing time DB 150 accumulates processing time data from the processing time measurement unit 140 and stores processing time DLn for the pause time determination unit 130 to obtain the processing time DLn of the data processing thread on the logical core N.
  • the idle state power DB 160 stores the idle states (C0 continuous power amount, C1 wake-up power amount, C1 transition power amount, C1 continuous power amount, C2, etc.) for each pause time so that the idle state determination unit 170 can obtain the power amount of each idle state corresponding to the pause period SPm (see Figure 22 below).
  • the idle state determination unit 170 determines the core c-state to which the physical core should be transitioned based on the forced sleep start timing and sleep time determined by the pause time determination unit 130, transitions each logical core included in the physical core to the corresponding c-state, and wakes them up in advance before the processing deadline, taking into account the wake-up time from the core c-state.
  • the idle state determination unit 170 acquires the sleep period SPm from the sleep time determination unit 130 (step S101 in FIG. 25 ).
  • the idle state determination unit 170 references the idle state power DB 160 (FIG. 22 ) to acquire the power amount of each idle state corresponding to the sleep period SPm (step S102 in FIG. 25 ).
  • the idle state determination unit 170 determines the idle state Cm of the physical core M with the smallest power amount from among the acquired idle states, and notifies the sleep thread control unit 110 of the idle state Cm of the physical core M (step S103 in FIG. 25 ).
  • the utilization rate DB 180 stores CPU utilization rates used by the core allocation determination unit 190 to calculate the amount of processing for each processing type, including the CPU utilization rate.
  • the core allocation determination unit 190 calculates the processing volume for each processing type, including CPU usage, and determines that processes whose processing volume falls within a predetermined range are similar processing types, and places the processes of that processing type on logical cores on the same physical core.
  • the core allocation determination unit 190 in the fifth embodiment (see FIG. 29 below)
  • the core allocation determination unit 190 refers to the utilization rate DB 180 and acquires the CPU utilization rate RLn of the logical core N (step S121 in FIG. 30, which will be described later).
  • the core allocation determination unit 190 rearranges the logical cores N in descending order of CPU utilization rate RLn to determine a new logical core order N' (step S122 in FIG. 30, described later).
  • the core allocation determination unit 190 notifies the core allocation unit 23 of the logical core order N' (step S123 in FIG. 30, described later).
  • the core allocation determination unit 190 corrects the logical core orders in the utilization rate DB 180 and the processing time DB 150 based on the logical core order N' (step S124 in FIG. 30, described later).
  • the scheduler 22 controls the timing of data processing. Specifically, the scheduler 22 schedules the timing of data processing threads on logical cores in accordance with the sleep periods determined for each physical core by the sleep thread control unit 110, thereby synchronizing the sleep timings of all logical cores on the physical core.
  • the present invention transitions the physical core to a deeper core c-state by forcing logical cores on the same physical core to sleep at the same timing and for the same length of time by issuing mwait commands from a kernel thread, and by dropping each logical core to the same deep c-state.
  • the present invention transitions the CPU to a deep package c-state by putting logical cores on the same CPU socket to sleep at the same timing and for the same amount of time, and by dropping each logical core to the same deep c-state.
  • Fig. 2 is a diagram for explaining the basic concept of the present invention, and is a diagram for comparison with Fig. 39 and Fig. 40 of the prior art. 2 shows an example of the present invention where "logical cores on the same physical core are forced to sleep at the same timing for the same duration, and each logical core is forced to drop to the same deep c-state, thereby transitioning the physical core to a deeper core c-state.”
  • logical cores on the same CPU socket are forced to sleep at the same timing for the same duration, and each logical core is forced to drop to the same deep c-state, thereby transitioning the CPU to a deeper package c-state.”
  • logical core #0 and logical core #4 on the same physical core #0 are forced to sleep at the same timing and for the same length of time (symbol b in Figure 2) by issuing mwait by the kernel thread, etc.
  • forced sleep (white arrow a in FIG. 2) is used to shift and align the timing at which logical core #0 and logical core #4 become idle, creating time for physical core #0 to sleep (symbol b in FIG. 2).
  • the c-states of logical core #0 and logical core #4 are aligned with consideration of the core c-state (dotted box c in FIG. 2).
  • logical core #0 and logical core #4 are dropped to the same deep c-state C6, causing physical core #0 to transition to the deep core c-state: CC6.
  • FIG. 3 is a diagram illustrating the basic operation of the hibernation control device 100.
  • the same components as those in FIG. 1 are assigned the same reference numerals.
  • the relevant functional units are represented by blocks and signal lines enclosed in bold frames (the same notation method will be used hereinafter).
  • the hibernation control device 100 that performs basic operations uses a hibernation thread control unit 110, a timer unit 120, a hibernation thread 102 (hibernation thread In), a CPU idle driver 21, and a CPU 11.
  • the pause thread control unit 110 uses the pause thread In, which operates at a higher priority than the data processing thread Dn, to instruct the timing of execution of a pause instruction and the pause period.
  • the pause thread In then executes an instruction to pause a logical core, pausing the logical core.
  • the pause thread control unit 110 instructs the pause thread In as to the timing of execution of the pause instruction and the pause period. In this way, the pause thread control unit 110 executes the pause thread In, which is an instruction to force logical cores corresponding to the same physical core to pause at the same timing and for the same duration, thereby pausing all logical cores on the same physical core.
  • the hibernation control device 100 operates with a higher priority than the data processing threads Dn.
  • FIG. 4 is a flowchart of a pause instruction process in the basic operation of the pause state control device 100 of FIG.
  • the sleep thread control unit 110 determines whether or not the sleep period T has elapsed since the previous time. If the sleep period T has not elapsed since the previous time (S11: No), the sleep thread control unit 110 waits for a certain period of time in step S12 and returns to step S11.
  • step S13 the sleep thread control unit 110 issues a sleep instruction to the sleep thread In corresponding to the logical core N by specifying the sleep state Cm.
  • the sleep state is specified by, for example, an administrator.
  • step S14 the sleep thread control unit 110 sets the sleep time SPm of the physical core M for the logical core N in the timer unit 120.
  • step S15 after the sleep time SPm of physical core M has elapsed, the timer unit 120 issues a wake-up instruction to the sleep thread In on the logical core N corresponding to physical core M.
  • step S16 the paused thread control unit 110 determines whether the pause is to continue. If the pause is to continue (S16: Yes), the process returns to step S11. If the pause is not to continue (S16: No), the process ends.
  • FIG. 5 is a flowchart of a hibernation execution process in the basic operation of the hibernation state control device 100 of FIG.
  • the inactive thread In receives a sleep instruction from the inactive thread control unit 110 in step S21, it enters an execution state with higher priority than the data processing thread Dn and preempts (preempts) the CPU usage time from the data processing thread Dn.
  • step S22 the inactive thread In issues a pause command to transition to the pause state notified by the inactive thread control unit 110.
  • step S23 the inactive thread In is called when a wake-up instruction is issued from the timer unit 120. Thereafter, the inactive thread In changes itself from an executable state to a standby state, yields the CPU usage time to the data processing thread Dn, and ends the processing of this flow.
  • FIG. 6 is a diagram illustrating another form of the basic operation of the hibernation control device 100.
  • the same components as those in FIG. 1 are denoted by the same reference numerals.
  • another form of hibernation control device 100 uses a hibernation thread control unit 110, a timer unit 120, a data processing thread 101 (data processing thread Dn), a hibernation thread 102 (hibernation thread In), a CPU idle driver 21, and a CPU 11.
  • Another form of the dormant state control device 100 modifies the data processing thread Dn so that when the data processing thread Dn completes its own processing, it calls the dormant thread In and hands over the processing.
  • the dormant thread In calls the epoll_wait() function, which puts the thread into sleep mode until a timer or event occurs.
  • Data processing thread Dn has a pause instruction function that calls sleep thread In upon completing its own processing and yields the processing.
  • sleep thread In receives a pause instruction from data processing thread Dn, it changes itself from an executable state to a standby state and yields CPU usage time to data processing thread Dn.
  • FIG. 7 is a flowchart of a pause instruction process in another mode of the basic operation of the pause state control device 100 of FIG.
  • the inactive thread In determines whether the data processing of the data processing thread Dn has been completed. If the data processing of the data processing thread Dn has not been completed (S31: No), the process returns to step S31. If the data processing of the data processing thread Dn is completed (S31: Yes), the data processing thread Dn sets the pause time SPm of the physical core M corresponding to the logical core N in the timer unit 120 in step S32.
  • step S33 data processing thread Dn issues a pause instruction to the pause thread In corresponding to logical core N, specifying the pause state Cm. Data processing thread Dn then changes itself from the running state to the standby state.
  • step S34 after the sleep time SPm of physical core M has elapsed, the timer unit 120 issues a wake-up instruction to the sleep thread In on the logical core N corresponding to physical core M.
  • step S35 the inactive thread In determines whether the inactive state continues. If the inactive state continues (S35: Yes), the process returns to step S31. If the inactive state does not continue (S35: No), the process ends.
  • FIG. 8 is a flowchart of a hibernation execution process in another mode of the basic operation of the hibernation state control device 100 of FIG.
  • the sleeping thread In receives a sleeping instruction from the data processing thread Dn. Since the data processing thread Dn has finished, no preemption of CPU time occurs.
  • step S42 the inactive thread In issues a pause command to transition to the pause state notified by the data processing thread Dn.
  • step S43 the inactive thread In is called when a wake-up instruction is issued from the timer unit 120.
  • the inactive thread In then changes itself from an executable state to a standby state, yields CPU usage time to the data processing thread Dn, and terminates the processing of this flow.
  • Second Embodiment 9 and 10 are diagrams illustrating a second embodiment of the present invention.
  • Fig. 9 is an explanatory diagram of the c-state of a CPU using SMT according to the first embodiment.
  • Fig. 10 is an explanatory diagram of the c-state of a CPU using SMT according to the second embodiment.
  • SMT simultaneous multithreading
  • logical cores corresponding to the same physical core are forced to pause for the same duration at the same timing from an external source (such as a kernel thread), thereby reducing CPU power consumption.
  • one possible method is to control the timing of data processing using a scheduler 22 (see Figure 11 below) to synchronize the timing of pauses.
  • the scheduler 22 controls the operation timing of applications on logical cores and synchronizes the sleep timing of all logical cores on the same physical core. Specifically, the scheduler 22 schedules the timing of data processing thread Dn on the logical core in accordance with the sleep period determined for each physical core, and puts all logical cores on the physical core into a sleep state, thereby transitioning the physical core to a deep core c-state.
  • logical core #0 and logical core #4 on the same physical core #0 are forced to sleep at the same time by issuing an mwait command by the kernel thread, etc.
  • forced sleep creates time for physical core #0 to sleep.
  • the scheduler 22 delays the start of data processing (in the example of Figure 10, the scheduler 22 delays the start of process A of logical core #0 to prevent process A from being interrupted), creating time for physical core #0 to sleep.
  • the hibernation state control device 100 of the second embodiment uses a hibernation thread control unit 110, a timer unit 120, a scheduler 22, a data processing thread 101 (data processing thread Dn), a hibernation thread 102 (hibernation thread In), a CPU idle driver 21, and a CPU 11.
  • the scheduler 22 schedules the timing of the data processing thread on the logical core in accordance with the hibernation period determined for each physical core by the hibernation thread control unit 110, delaying the start of data processing to create time for the physical core to sleep. By putting all logical cores on the physical core into a hibernation state, the physical core is transitioned to a deep core c-state.
  • FIG. 12 is a flowchart of a hibernation instruction process in the operation of the hibernation state control device 100 of FIG.
  • step S51 the sleep thread control unit 110 determines whether or not the sleep period T has elapsed since the previous time. If the sleep period T has not elapsed since the previous time (S51: No), the sleep thread control unit 110 waits for a certain period of time in step S52 and returns to step S51. If the sleep period T has passed since the previous time (S51: Yes), the sleep thread control unit 110 waits for all logical cores on the physical core M to complete processing in step S53. In step S54, the sleep thread control unit 110 issues a scheduling instruction to the scheduler 22 so as not to start data processing threads in any logical core on the physical core M for a period SPm from the current time.
  • step S55 the inactive thread control unit 110 issues an instruction to the inactive thread In corresponding to the logical core N to inactively set the inactive state Cm.
  • step S56 the sleep thread control unit 110 sets the sleep time SPm of the physical core M corresponding to the logical core N in the timer unit 120.
  • step S57 the timer unit 120 issues a wake-up instruction to the sleeping thread In on the logical core N corresponding to the physical core M after the sleep time SPm of the physical core M has elapsed.
  • step S58 the sleeping thread control unit 110 issues a scheduling instruction to the scheduler 22 to allow all logical cores on the physical core M to start data processing threads.
  • step S59 the paused thread control unit 110 determines whether the pause is to continue. If the pause is to continue (S59: Yes), the process returns to step S51. If the pause is not to continue (S59: No), the process ends.
  • FIG. 13 is a flowchart of a hibernation execution process in another mode of the basic operation of the hibernation state control device 100 of FIG.
  • the inactive thread In receives a sleep instruction from the inactive thread control unit 110. Since the data processing thread Dn has finished, the CPU usage time is not preempted (preempted).
  • the inactive thread In issues a pause command to transition to the pause state notified by the inactive thread control unit 110.
  • step S63 the inactive thread In is called when a wake-up instruction is issued from the timer unit 120.
  • the inactive thread In then changes itself from an executable state to a standby state, yields CPU usage time to the data processing thread Dn, and terminates the processing of this flow.
  • the available sleep time is predicted from the past processing time results, and the forced sleep start timing and sleep time are determined.
  • the sleep start timing refers to measuring the processing completion time of the logical core with the longest processing time among the logical cores on the same physical core, and adjusting it to the processing completion time of that logical core.
  • the sleep time refers to specifying the length obtained by subtracting the processing completion time from the processing deadline.
  • FIG. 14 is an explanatory diagram of the c-state of a CPU using SMT according to the third embodiment of the present invention.
  • the processing start time t1 shown in Figure 14 is the processing start time of logical core #0 and logical core #4 on the same physical core #0
  • the processing completion time t2 is the forced sleep start timing
  • the processing deadline t3 is the deadline by which the processing of logical core #0 and logical core #4 must be completed.
  • the forced sleep indicated by the white arrow h in Figure 14 is issued at the sleep start timing, which is the time when processing on all logical cores is completed (symbol i in Figure 14).
  • the sleep time indicated by the arrow j in Figure 14 is the time (t3 - t2) obtained by subtracting the processing completion time t2 from the processing deadline t3.
  • This forced sleep start timing and sleep time can be determined by predicting the available sleep time based on past processing time results.
  • the hibernation state control device 100 of the third embodiment uses a hibernation thread control unit 110, a timer unit 120, a hibernation time determination unit 130, a processing time measurement unit 140, a processing time DB 150, a utilization rate DB 180, a data processing thread 101 (data processing thread Dn), a hibernation thread 102 (hibernation thread In), a CPU idle driver 21, a CPU 11, and a CPU utilization rate acquisition unit 24.
  • the sleep state control device 100 predicts the available sleep time based on past processing time performance, in accordance with the sleep period determined for each physical core, and determines the timing to start forced sleep and the sleep time.
  • the timing to put the physical core to sleep and the maximum sleep time can be determined, effectively transitioning the physical core to a deeper core c-state.
  • Fig. 16 is a flowchart of the pause time determination process in the operation of the pause state control device 100 of Fig. 11.
  • Fig. 17 is an explanatory diagram of the operation of the pause time determination process of Fig. 16.
  • the pause time determination unit 130 refers to the processing time DB 150 and acquires the processing time DLn of the data processing thread on the logical core N.
  • a safety factor SF the symbol k enclosed by a dashed line in FIG. 17
  • the allowable pause time TLm provided by the administrator is used, but in the first and second embodiments, as in the third embodiment, the pause time may also be determined by executing the pause time determination flow ( Figure 16).
  • FIG. 18 is a flowchart of the hibernation instruction process in the operation of the hibernation state control device 100 of FIG.
  • step S81 the sleep thread control unit 110 determines whether TPm has elapsed since the start of processing on the physical core M. If TPm has not elapsed since the start of processing on the physical core M (S81: No), the sleep thread control unit 110 waits for a certain period of time in step S82 and returns to step S81. If TPm has elapsed since the start of processing on physical core M (S81: Yes), in step S83, the sleep thread control unit 110 issues a sleep instruction to the sleep thread In corresponding to logical core N, specifying the sleep state Cm.
  • step S84 the pause time determination unit 130 sets the pause time SPm of the physical core M corresponding to the logical core N in the timer unit 120.
  • step S85 the timer unit 120 issues a wake-up instruction to the sleeping thread In on the logical core N corresponding to the physical core M after the sleep time SPm of the physical core M has elapsed.
  • step S86 the paused thread control unit 110 determines whether the pause is to continue. If the pause is to continue (S86: Yes), the process returns to step S81. If the pause is not to continue (S86: No), the process ends.
  • the hibernation execution flow is similar to the flowchart of the hibernation execution process of the hibernation state control device 100 in FIG. 3, and therefore a description thereof will be omitted.
  • the processing timing schedule of the data processing thread by the scheduler 22 (FIG. 1) is not essential, and as in the first embodiment, preemption is performed by forced sleep without the involvement of the scheduler 22.
  • the third embodiment can determine the timing to put the physical core to sleep and the maximum sleep time when data arrives periodically, but does not include a method for determining the depth of the c-state or a method for controlling the c-state.
  • the core c-state to which the physical core should transition is determined based on the sleep start timing and sleep time determined in the third embodiment, and each logical core included in the physical core is transitioned to the corresponding c-state.
  • the wake-up time from the c-state is taken into account, and the logical cores are woken up in advance before the processing deadline.
  • the fourth embodiment adds a ⁇ c-state determination method> and a ⁇ c-state specification method> to the third embodiment's method of predicting the available sleep time from past processing time results and determining the forced sleep start timing and sleep time.
  • the ⁇ c-state determination method> and ⁇ c-state specification method> will be explained below in order.
  • the c-state determination method determines the c-state that minimizes the amount of power consumed during the transition time, duration, and wake-up time.
  • the amount of power consumed during each of the above times for each c-state can be measured in advance and used for the determination.
  • Figure 19 explains the c-state determination method, with the horizontal axis representing time and the vertical axis representing the c-state depth.
  • the upper diagram of Figure 19 shows the c-state determination method when the c-states are C0 and C1
  • the lower diagram of Figure 19 shows the c-state determination method when the c-states are C0 and C6.
  • the power consumption (J: joules) is measured from the processing completion time t2 of the forced sleep (symbol k in the upper diagram of Figure 19) to the processing deadline t3 for returning to c-state C0 (arrow p in the upper diagram of Figure 19).
  • the pre-measurement result is 10J for C1.
  • the C1 duration (symbol n in the upper diagram of Figure 19) is long, and the C1 wake-up time (symbol o in the upper diagram of Figure 19) due to pre-wake-up (symbol m in the upper diagram of Figure 19) is also short, but the power saving effect is small.
  • the power consumption (J) is measured from the time t2 when the forced sleep (symbol k in the lower diagram of FIG. 19 ) is completed to the processing deadline t3 for returning to c-state C0 (indicated by arrow p in the upper diagram of FIG. 19 ).
  • the pre-measurement result for C6 is 5J.
  • the C6 duration (symbol n in the lower diagram of FIG. 19) is short, and the C6 wake-up time (symbol o in the lower diagram of FIG. 19) due to the pre-wake-up (symbol m in the lower diagram of FIG. 19) is very long, but transitioning to C6 results in the most power savings.
  • a c-state is determined that minimizes the amount of power consumption during the transition time to the c-state, the duration, and the wake-up time shown in FIG.
  • FIG. 20 is a diagram for explaining a c-state designation method.
  • the forced sleep thread 200 shown in FIG. 20 is a program of a hibernation control method executed on the application (APL) 30 by the CPU 11 (FIG. 1) of the hibernation control device 100 of the first to fourth embodiments.
  • a server having a hibernation control device 100 includes a driver/hardware in the HW (hardware) 10 (FIG. 1) and a kernel in the OS/driver 20 (FIG. 1).
  • the kernel includes an existing task scheduler 210, a sysfs 211, a cpuidle governor 212, and a cpuidle framework 201.
  • the driver/hardware includes a cpuidle driver (ACPI/intel_idle) 202.
  • the forced sleep thread 200 specifies the return time for the CPUidle framework, or (2) the forced sleep thread 200 specifies the return time for the sysfs 211 and CPUidle governor 212.
  • the c-state specification method is as follows: the forced sleep thread 200 issues a cpuidle_idle_call (specifying the return time) to the cpuidle framework 201, which then sets a cpuidle_enter (specifying the c-state) to the cpuidle driver (ACPI/intel_idle) 202, which then controls the cpuidle.
  • the c-state specification method is that the forced sleep thread 200 specifies the recovery time to the sysfs 211, and the sysfs 211 specifies the recovery time to the cpuidle framework 201 via sysfs.
  • the hibernation state control device 100 of the fourth embodiment uses a hibernation thread control unit 110, a timer unit 120, a hibernation time determination unit 130, an idle state power DB 160, an idle state determination unit 170, a hibernation thread 102 (hibernation thread In), a CPU idle driver 21, a CPU 11, and a CPU utilization rate acquisition unit 24.
  • the hibernation control device 100 of the fourth embodiment determines the core c-state to which the corresponding physical core should transition based on the sleep start timing and sleep time determined in the third embodiment, and transitions each logical core included in the physical core to the corresponding c-state. It also wakes up the logical cores in advance before the processing deadline, taking into account the wake-up time from the c-state.
  • FIG. 22 is a diagram showing an example of a table in the idle state power DB 160.
  • the idle state power DB 160 stores the idle state (C0 continuous energy, C1 wake-up energy, C1 transition energy, C1 continuous energy, C2...) for each pause time.
  • the C0 continuous energy is "0.2 mJ”
  • the C1 wake-up energy is "0.05 mJ”
  • the C1 transition energy is "0.1 mJ”
  • the C1 continuous energy is "0.1 mJ.”
  • the idle state determination unit 170 can obtain the energy amounts for each idle state corresponding to the pause period SPm by referencing this idle state power DB 160. Details of the idle state determination flow will be described later with reference to FIG. 25 .
  • Fig. 23 is a flowchart of the pause time determination process in the operation of the pause state control device 100 of Fig. 21.
  • Fig. 24 is an explanatory diagram of the operation of the pause time determination process of Fig. 23.
  • the pause time determination unit 130 refers to the processing time DB 150 and acquires the processing time DLn of the data processing thread on the logical core N.
  • a safety factor SF the symbol t enclosed by a dashed line in FIG. 24
  • FIG. 25 is a flowchart of the idle state determination process in the operation of the hibernation state control device 100 of FIG.
  • the idle state determination unit 170 acquires the sleep period SPm from the sleep time determination unit 130 .
  • the idle state determination unit 170 refers to the idle state power DB 160 (FIG. 22) to obtain the amount of power in each idle state corresponding to the pause period SPm.
  • step S103 the idle state determination unit 170 determines the idle state Cm of the physical core M to be the idle state with the smallest amount of power from the acquired idle states.
  • the idle state determination unit 170 notifies the sleep thread control unit 110 of the idle state Cm of the physical core M, and then ends the processing of this flow.
  • FIG. 26 is a flowchart of the hibernation instruction process in the operation of the hibernation state control device 100 of FIG.
  • step S111 the sleep thread control unit 110 determines whether TPm has elapsed since the start of processing on the physical core M. If TPm has not elapsed since the start of processing on the physical core M (S111: No), the sleep thread control unit 110 waits for a certain period of time in step S112 and returns to step S111. If TPm has elapsed since the start of processing on physical core M (S111: Yes), in step S113, the sleep thread control unit 110 issues a sleep instruction to the sleep thread In corresponding to logical core N, specifying the sleep state Cm.
  • step S114 the rest time determination unit 130 determines the rest time taking into account the wake-up time Wm corresponding to Cm.
  • step S116 the timer unit 120 issues a wake-up instruction to the sleeping thread In on the logical core N corresponding to the physical core M after the sleep time SPm' of the physical core M has elapsed.
  • step S117 the paused thread control unit 110 determines whether the pause is to continue. If the pause is to continue (S117: Yes), the process returns to step S111. If the pause is not to continue (S117: No), the process ends.
  • FIG. 27 is an explanatory diagram of the c-state of a CPU using SMT according to the first embodiment.
  • Fig. 28 is an explanatory diagram of the c-state of a CPU using SMT according to the fifth embodiment.
  • SMT simultaneous multithreading
  • logical cores corresponding to the same physical core are forced to pause for the same duration at the same timing from an external source (such as a kernel thread), thereby reducing CPU power consumption.
  • the first embodiment allows forced sleep for a certain period of time. However, since the available sleep time differs depending on the type of processing, if you try to sleep for a period that does not affect all processing, the available sleep time may be reduced to match the type of processing with the highest processing volume. 27, for logical core #0 and logical core #4 of physical core #0, the processing amount of process A of logical core #0 is different from the processing amount of process B of logical core #4 (the processing amount of process B of logical core #4 is larger), so the allowable sleep time of physical core #0 is limited to the processing amount of process B.
  • the processing amount of process A of logical core #1 is different from the processing amount of process B of logical core #5 (the processing amount of process B of logical core #5 is larger), so the allowable sleep time of physical core #1 is limited to the processing amount of process B.
  • the hibernation control device 100 (Fig. 29) of the fifth embodiment calculates the processing volume for each processing type from CPU usage rates and other factors, determines that processes with processing volumes within a predetermined range are similar processing types, and allocates the processing of that processing type to logical cores on the same physical core. This extends the time that the physical core can sleep (period w in Fig. 28), thereby saving power.
  • the fifth embodiment of the pause state control device 100 includes a pause thread control unit 110, a timer unit 120, a pause time determination unit 130, a processing time measurement unit 140, a processing time DB 150, a utilization rate DB 180, a core allocation determination unit 190, a data processing thread 101 (data processing thread Dn), and a pause thread 102 (pause thread In).
  • the fifth embodiment of the pause state control device 100 also includes a core allocation unit 23 and a CPU utilization rate acquisition unit 24 of the OS/driver 20.
  • FIG. 30 is a flowchart of the core allocation determination process in the operation of the hibernation control device 100 of FIG.
  • the core allocation determination unit 190 refers to the utilization rate DB 180 and acquires the CPU utilization rate RLn of the logical core N.
  • the core allocation determination unit 190 rearranges the logical cores N in descending order of CPU utilization rate RLn to determine a new logical core order N'.
  • step S123 the core allocation determination unit 190 notifies the core allocation unit 23 of the logical core order N′.
  • step S124 the core allocation determination unit 190 corrects the logical core orders in the utilization rate DB 180 and the processing time DB 150 based on the logical core order N', and then ends the processing of this flow.
  • FIG. 31 is a diagram illustrating an example of the operation of the core allocation unit 23 by executing the core allocation determination process of FIG.
  • the logical core order N for physical core #0 is logical core #0, followed by logical core #4.
  • the CPU utilization rate RLn is 20% for logical core #0 and 60% for logical core #4.
  • the logical core order N for physical core #1 is logical core #1, followed by logical core #5.
  • the CPU utilization rate RLn is 10% for logical core #1 and 70% for logical core #5.
  • the CPU utilization rates RLn are, in descending order, logical core #5 of physical core #1 (70%), logical core #4 of physical core #0 (60%), logical core #0 of physical core #0 (20%), and logical core #1 of physical core #1 (10%).
  • the core allocation unit 23 ( Figure 31) transfers the data processing thread running on logical core N to logical core N' based on the relationship between logical core order N and logical core order N'.
  • the core allocation unit 23 rearranges the data processing threads running on logical core N in descending order of CPU utilization rate RLn.
  • the core allocation unit 23 moves the data processing thread of logical core #5 to logical core #0 (see arrow x1), but does not move the data processing thread of logical core #4 (see arrow x2).
  • the core allocation unit 23 also moves the data processing thread of logical core #0 to logical core #1 (see arrow x3), and moves the data processing thread of logical core #1 to logical core #5 (see arrow x4).
  • the hibernation state control device 100 (FIG. 1) according to each of the above embodiments is realized by a computer 900 having a configuration as shown in FIG. 32, for example.
  • FIG. 32 is a hardware configuration diagram showing the computer 900.
  • the computer 900 includes a CPU 901, a ROM 902, a RAM 903, a HDD 904, a communication interface 906, an input/output interface 905, and a media interface 907. Note that in Fig. 32, the interface is abbreviated as "I/F".
  • the CPU 32 operates based on programs stored in the ROM 902 or HDD 904, and embodies each part of the hibernation control device 100 ( Figure 1).
  • the ROM 902 stores a boot program executed by the CPU 32 when the computer 900 starts up, as well as programs that depend on the computer 900's hardware.
  • the CPU 32 controls an input device 910 such as a mouse or keyboard, and an output device 911 such as a display, via the input/output interface 905.
  • the CPU 32 acquires data from the input device 910 via the input/output interface 905, and outputs generated data to the output device 911.
  • a GPU Graphics Processing Unit
  • a processor may also be used as a processor in addition to the CPU 32.
  • the HDD 904 stores programs executed by the CPU 32 and data used by those programs.
  • the communication interface 906 receives data from other devices via a communication network (e.g., network 922) and outputs the data to the CPU 32, and also transmits data generated by the CPU 32 to other devices via the communication network.
  • a communication network e.g., network 922
  • the media interface 907 reads the program or data stored on the recording medium 912 and outputs it to the CPU 32 via the RAM 903.
  • the CPU 32 loads the program related to the target processing from the recording medium 912 onto the RAM 903 via the media interface 907, and executes the loaded program.
  • the recording medium 912 is an optical recording medium such as a DVD (Digital Versatile Disc) or a PD (Phase Change Rewritable Disk), a magneto-optical recording medium such as an MO (Magneto Optical Disk), a magnetic recording medium, a conductive memory tape medium, or a semiconductor memory, etc.
  • the computer 900 functions as the hibernation control device 100 ( Figure 1) configured as one device according to this embodiment
  • the CPU 32 of the hibernation control device 100 realizes the functions of the hibernation control device 100 by executing a program loaded onto the RAM 903.
  • the HDD 904 stores data in the RAM 903.
  • the CPU 32 reads and executes a program related to the target processing from the recording medium 912.
  • the CPU 32 may read a program related to the target processing from another device via a communication network (NW 922).
  • the sleep state control device 100 is a sleep state control device for a data processing system that uses simultaneous multithreading of the CPU to logically increase the number of CPU cores and assigns data processing threads Dn (data processing threads 101) to the logical cores to execute data processing in parallel, and is equipped with a sleep thread control unit 110 that instructs the execution timing and sleep period of a sleep instruction using sleep thread In (sleep thread 102) that operates with a higher priority than data processing thread Dn, and the sleep thread control unit 110 executes a sleep thread that is an instruction that forces logical cores corresponding to the same physical core to be paused at the same timing and for the same duration, thereby pausing all logical cores on the same physical core.
  • sleep thread control unit 110 that is an instruction that forces logical cores corresponding to the same physical core to be paused at the same timing and for the same duration, thereby pausing all logical cores on the same physical core.
  • the sleep state control device 100 has the sleep thread control unit 110 use sleep thread In, which operates with a higher priority than data processing thread Dn, to instruct the execution timing of the sleep command and the sleep period. Sleep thread In then executes an instruction to sleep a logical core, putting the logical core to sleep. The sleep thread control unit 110 instructs sleep thread In on the execution timing of the sleep command and the sleep period. As a result, the sleep thread control unit 110 executes sleep thread In, which is an instruction to force logical cores corresponding to the same physical core to sleep at the same timing and for the same duration, thereby putting all logical cores on the same physical core to sleep.
  • each logical core enters sleep at the same time, allowing the physical core to transition to a deep sleep state and achieving power savings (requirement 1 is met). Furthermore, the sleep period is set within a range that does not affect performance by referring to CPU usage and application processing time, so processing throughput is not reduced (requirement 2 is met).
  • logical cores on the same physical core can be forced to sleep at the same timing for the same amount of time, and each logical core can be dropped into the same deep c-state, thereby transitioning the physical core to a deeper core c-state (see core c-state (CCx) in Figure 38).
  • data processing thread Dn has a pause instruction function that calls pause thread In upon completing its own processing and yields the processing; upon receiving a pause instruction from data processing thread Dn, pause thread In changes itself from an executable state to a standby state and yields CPU usage time to data processing thread Dn.
  • the dormant thread In may call the function epoll_wait(), which puts the thread into sleep until a timer or event occurs.
  • This alternative configuration also allows logical cores on the same physical core to be forced to sleep at the same timing for the same amount of time, and each logical core to drop into the same deep c-state, transitioning the physical core to a deeper core c-state. Therefore, as with the dormant state control device 100 of the first embodiment ( Figure 1), it is possible to effectively transition the physical core to a deeper core c-state, thereby saving power.
  • the hibernation control device 100 ( Figure 11) is equipped with a scheduler 22 that controls the timing of data processing.
  • the scheduler 22 schedules the timing of data processing threads on logical cores in accordance with the hibernation periods determined for each physical core by the hibernation thread control unit 110, thereby synchronizing the hibernation timing of all logical cores on the physical core.
  • the hibernation control device 100 (Fig. 15) is characterized by the inclusion of a pause time determination unit 130 that determines the pause timing and pause time for the physical core based on the processing deadline and past processing time results when an application on a logical core processes data that arrives periodically.
  • the hibernation time determination unit 130 measures the processing completion time of the logical core with the longest processing time among the logical cores on the same physical core, and sets the forced sleep start timing to match the processing completion time of that logical core, and the sleep time specified as the processing deadline minus the processing completion time, and is characterized by predicting the available sleep time from past processing time results and determining the forced sleep start timing and sleep time.
  • the hibernation control device 100 (Figs. 1 and 3) is characterized by including an idle state determination unit 170 that determines the core c-state to which a physical core should transition based on the forced sleep start timing and sleep time determined by the hibernation time determination unit 130, transitions each logical core included in that physical core to the corresponding c-state, and wakes up the core in advance before the processing deadline, taking into account the wake-up time from the core c-state.
  • the hibernation control device 100 (Figs. 1 and 3) is characterized by including a core allocation determination unit 190 that calculates the processing volume for each processing type, including CPU usage, determines that processes with processing volumes within a predetermined range are similar processing types, and allocates processes of that processing type to logical cores on the same physical core.
  • a core allocation determination unit 190 that calculates the processing volume for each processing type, including CPU usage, determines that processes with processing volumes within a predetermined range are similar processing types, and allocates processes of that processing type to logical cores on the same physical core.
  • the above-mentioned configurations, functions, processing units, processing means, etc. may be realized in hardware, for example by designing them as integrated circuits.
  • the above-mentioned configurations, functions, etc. may be realized by software that allows a processor to interpret and execute programs that realize each function.
  • Information on the programs, tables, files, etc. that realize each function can be stored in memory, recording devices such as hard disks and SSDs (Solid State Drives), or recording media such as IC (Integrated Circuit) cards, SD (Secure Digital) cards, and optical discs.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Power Sources (AREA)

Abstract

休止状態制御装置(100)は、CPUの同時マルチスレッディングを用いて、論理的にCPUコアを増加させ、論理コアにデータ処理スレッドDnを割当ててデータ処理を並列実行するデータ処理システムの休止状態制御装置であって、データ処理スレッドDnよりも高優先度で動作する休止スレッドInを用いて、休止命令の実行タイミングおよび休止期間を指示する休止スレッド制御部(110)を備え、休止スレッド制御部(110)は、同一の物理コアに対応する論理コアに対して同じタイミングでかつ、同じ時間幅の休止を強制させる命令である休止スレッドInを実行し、同一物理コア上の論理コアを全て休止させる。

Description

休止状態制御装置、休止状態制御方法およびプログラム
 本発明は、休止状態制御装置、休止状態制御方法およびプログラムに関する。
 LPI(Low Power Idle)ハードウェア制御ついて述べる。
 CPUには、ハードウェア制御によるCPUのアイドル状態を制御する機能があり、LPIハードウェア制御機能と呼ばれる。LPIハードウェア制御機能は、CPUidleやC-stateと呼称されることも多く、以下、LPIハードウェア制御機能のアイドル状態を説明する。
 アイドル状態にて、CPUは、CPU負荷が少なくなると、CPUの回路の一部の電源をOFFにすることで、省電力化を試行する(非特許文献1)。
 図33は、CPUのアイドル状態の一例を表にして示す図である。なお、CPUハードウェアに依って状態定義は異なるため、図33はあくまでも参考例である。
 図33に示すように、CPUのアイドル状態には、グレードC0~C6があり、CPUの負荷がない時間が長くなるにつれ、深いアイドル状態へ遷移する。深いアイドル状態の方がCPU消費電力は小さくなるが、一方で、深いアイドル状態になるほど、復帰までに要する時間が延びるため、低遅延の観点で課題となる場合がある。
 アイドル状態は、CPUハードウェアに依って状態定義が異なる。例えば、C4やC5が無い機種、C1の次がC1Eというステートである機種等のバリエーションがある。
 ステートが深くなるにつれ省電力効果は大きくなるが、それだけ、アイドル状態から復帰に要する時間も大きくなる。
 また、どの深さまでCPUのアイドル状態が遷移するかは、CPUのハードウェア制御になり、CPU製品依存となる。つまり、OSのカーネルなどからは制御できない場合が多い。
 図34は、ステートまでに遷移する時間(RESIDENCY)と、復帰に要する時間(WAKE-UP LATENCY)の最大値の一例を表にして示す図である。図34は、Intel Xeon CPU E5-26X0 v4(「Intel」および「Intel Xeon」は、登録商標)におけるC-state情報を表わしている。
[CPUアイドルガバナ]
 Linux kernel4(「Linux」は登録商標)は、CPUアイドル状態 (C-state)を管理するため、2種類のCPUアイドルガバナを用意している。
 CPUアイドルガバナには、周期処理有りシステム向けのラダーガバナと、周期処理無しシステム向けのメニューガバナの種別がある。ラダーガバナは、最初は最も浅いアイドル状態遷移のみを許容し、周期処理までの期間にタスクが無い場合に、段階的に深いアイドル状態へ遷移していく。ただし、周期処理が無いと、浅いアイドル状態のままとなるため、周期処理ベースである必要がある。また、メニューガバナは、ヒューリスティックなアプローチでアイドル期間とアイドル状態を推定する。例えば、メニューガバナは、直近8回のアイドル期間から、次のアイドル期間を推定し、アイドル期間に適するアイドル状態へ遷移させる。これにより、メニューガバナは、直接深いアイドル状態へ遷移させることが可能である。
 周期処理無しシステムで使用されるメニューガバナは、直近のアイドル期間の実績から、次のアイドル期間に適するアイドル状態の深さを推定する方式である。メニューガバナは、アイドル時間が規則的なワークロードについては効果を得られるが、不規則なワークロードでの効果は限定的となる。
 図35は、メニューガバナのロジック概要を説明する図である。
 図35に示すように、メニューガバナは、直近のアイドル時間を記録する(ステップS30)。そして、メニューガバナは、次のアイドル時間を推定する(ステップS31)。例えば、ステップS30で記録したアイドル時間をもとに、偏差が小さい場合は平均値を次のアイドル時間として採用する。メニューガバナは、次のアイドル時間の推定をもとに、適するアイドル状態の深さを推定する(ステップS32)。例えば、次のアイドル時間の推定値がアイドル状態からの復帰時間と同等であれば、アイドル状態が深すぎると判断し、浅いアイドル状態へ遷移させる。
 上記、2種類のラダーガバナ、メニューガバナのうち、いずれのガバナについても、新たなタスクが到着した際に、アイドル状態から事前起床を命令し、復帰させて準備をさせておく機構は有していない。このため、深いアイドル状態に遷移している状態でのタスク割り当て時には、復帰時間分の遅延時間が発生する問題がある。
 図36および図37は、演算に使用するCPUコアのC-state遷移イメージ図である。横軸は経過時間を示し、縦軸はアイドル状態のグレードC0~C6を示す。図36は、タスクなし時間が短い場合を示し、図37は、タスクなし時間が長い場合を示す。
 図36に示す期間Pは、CPUが或るタスク処理を行っている期間である。期間Pは、このタスク処理が終了しタスクがない期間を示す。このとき、CPUは、C1状態を経てC2状態に遷移している。
 時刻tで新たなタスクが発生する。期間PはCPUがC2状態からC0状態に復帰するまでの遅延期間である。CPUがC0状態に遷移したのち、期間Pにて、時刻tで発生したタスクが実行される。
 同様に、図37に示す期間Pは、CPUがタスク処理を行っている期間である。期間Pは、該当タスク処理が終了しタスクがない時間を示す。このとき、CPUは、C1状態を経てC5状態まで段階的に遷移している。
 時刻tで新たなタスクが発生する。期間Pは、このタスク発生から新たなタスク処理を開始するまでの期間であり、このときCPUはC5状態からC0状態に復帰するまでの遅延期間である。その後、期間Pにて、時刻tで発生したタスクが実行される。
 図36に示すように、タスクが発生した時刻tにてCPUコアが浅いアイドル状態にあり、タスク発生後、復帰までの期間Pが短い。しかし、図37に示すように、タスクが発生した時刻tにてCPUコアが深いアイドル状態にあると、復帰までの期間Pは図36に示す例よりも長くなる。つまり、CPUコアが深いアイドル状態まで落ちると、復帰するまでに長い期間を要し、リアルタイム性が損なわれる。
 上記したような復帰までの遅延期間が延びてしまうことは、例えば一例として、無線アクセスシステムの(BBU:Base Band Unit)のようにリアルタイム性が最優先されるシステムでは、看過できない問題である。
 このため、基地局にあっては、アイドル状態への遷移を無効にする、若しくは、アイドル状態の遷移を、C1状態等の限られた深さに限定する設定を投入する対応が採られる。すなわち、省電力性を犠牲にし、リアルタイム性を指向するチューニングが行われる場合がある。
 従来の基地局にあっては、深いアイドル状態まで落ちたら復帰するまで待つしかなかった。このため、省電力性を犠牲にし、深いところまでは落とさない対策が採られていた。
 なお、本発明は、vRAN(virtual Radio Access Network)に限定されるものではなく、無線アクセスシステムにおけるBBUはあくまで一例である。
[SMT技術]
 汎用サーバ上で、CPUの同時マルチスレッディング(SMT:Simultaneous Multi Threading)を活用して論理的にCPUコアを増加させ、データ処理を並列実行するシステムがある。CPUは、同時マルチスレッディング(SMT)機能を有し、1つの物理コアを複数の論理コアに分離して動作することが可能である。例えば、Intel Hyper Threading等のSMTは、CPUのマイクロ命令の演算器を論理コア間で共有させ、演算器の稼働率を上げる。また、論理コアの休止状態に応じて、物理コアの休止状態が変化する。
[c-state]
 CPUは、論理コア単位のc-stateのほかに、物理コア単位とパッケージ(ソケット)単位のc-stateが存在する。
 図38は、SMT技術におけるc-stateの種別を説明する図である。
 図38左図に示すように、パッケージ(CPUソケット)50は、2つの物理コア51を備え、物理コア51は、コアごとに2つのスレッドを実行する論理コア52を有する。
 図38右図は、図38左図のパッケージ(CPUソケット)50、物理コア51、論理コア52にそれぞれ対応するパッケージc-state(PCx)、コアc-state (CCx)、c-state (Cx)の省電力効果および性能影響を示すイメージ図である。図38右図に示すように、省電力効果および性能影響はいずれも、パッケージc-state (PCx)が最も大きく、コアc-state (CCx)、c-state (Cx)の順に小さくなる。
 全ての論理コアが一定のc-state(Cx)に落ちない限り、物理コアのコアc-state (CCx)は落ちない。パッケージc-state (PCx)でも同様であり、全ての物理コアのコアc-state (CCx)が落ちない限り、パッケージc-state (PCx)は落ちない。
 また、c-state制御の単位が大きくなるにつれ省電力効果は高まるが、同時に起床時間などの性能へのインパクトも大きくなる。
国際公開第2024/013831号
Energy-Efficient Platforms - Considerations for Application Software and Services,Intel,[online],[令和6年3月1日検索],インターネット〈URL:https://www.intel.com/content/dam/doc/white-paper/energy-efficient-platforms-2011-white-paper.pd〉
 従来の同時マルチスレッディング(SMT)を用いるCPUでは、下記(1)(2)の課題がある。
 図39は、図38左図のSMTを用いるCPUのc-stateにおける課題(1)を説明する図である。なお、図39の「物理#0」は、図面表記のスペースの関係で「物理コア#0」を表わし、「論理#0」「論理#4」は、「論理コア#0」「論理コア#4」を表わす(以下、該当する各図において同様の表記方法を採る)。
 図39の場合、「論理コア#0」のスレッドは、処理Aを実行し、その後「論理コア#0」のc-stateは、グレードの最も低いC6(図33)に落ちる。一方、「論理コア#4」は、C6から起き上がり(sleep復帰し) 、「論理コア#4」のスレッドは、処理Bを実行する。図39の符号a1とa2に示すように、「論理コア#0」「論理コア#4」がアイドルになるタイミングがバラバラなため、「物理コア#0」がsleepできない(図39の物理コアc-state:CC0)。
 同時SMTを採用するCPUでは、物理コア上の全論理コアの処理がない状態になって初めて物理コアをアイドル状態に落とすことができる。このため、各論理コアがアイドル状態になるタイミングがバラバラなため、物理コアを効果的にsleep(深いコアc-stateへ遷移)させることができないため余分な電力消費がされるという課題がある。
 図40は、図38左図のSMTを用いるCPUのc-stateにおける課題(2)を説明する図である。
 図40の場合、「論理コア#0」は、浅いc-stateのC1(図33)にあり、その後sleep復帰して「論理コア#0」のスレッドは、処理Aを実行する(図40の符号b1)。また、「論理コア#4」は、最も深いc-stateのC6(図33)にあり、その後sleep復帰して「論理コア#4」のスレッドは、処理Bを実行する(図40の符号b2)。
 ここで、物理コアは、論理コアのうち浅いc-stateに合わされるが、論理コアのc-stateの深さはカーネルとHW(ハードウェア)制御にゆだねられる。このため、両方の論理コアの処理がない場合でも物理コアを深いc-stateに落とせるとは限らないため、余分な電力消費がされる可能性があるという課題がある。図40の符号c1とc2に示すように、両方の論理コアの処理がなく、片方の「論理コア#0」が浅いc-stateのC1である場合、「物理コア#0」を深いコアc-stateにできない(図40の物理コアc-state:CC1のままである)。
 このような背景を鑑みて本発明がなされたのであり、本発明は、物理コアを効果的により深いコアc-stateへ遷移させて、省電力化を図ることを課題とする。
 前記した課題を解決するため、CPUの同時マルチスレッディングを用いて、論理的にCPUコアを増加させ、論理コアにデータ処理スレッドを割当ててデータ処理を並列実行するデータ処理システムの休止状態制御装置であって、前記データ処理スレッドよりも高優先度で動作する休止スレッドを用いて、休止命令の実行タイミングおよび休止期間を指示する休止スレッド制御部を備え、前記休止スレッド制御部は、同一の物理コアに対応する論理コアに対して同じタイミングでかつ、同じ時間幅の休止を強制させる命令である前記休止スレッドを実行し、同一物理コア上の前記論理コアを全て休止させることを特徴とする休止状態制御装置とした。
 本発明によれば、物理コアを効果的により深いコアc-stateへ遷移させて、省電力化を図ることができる。
本発明の第1の実施形態に係る休止状態制御装置の概略構成図である。 本発明の基本的な考え方を説明する図である。 本発明の第1の実施形態に係る休止状態制御装置の基本動作を説明する図である。 本発明の第1の実施形態に係る休止状態制御装置の基本動作における休止指示処理のフローチャートである。 本発明の第1の実施形態に係る休止状態制御装置の基本動作における休止実行処理のフローチャートである。 本発明の第1の実施形態に係る休止状態制御装置の基本動作の別形態を説明する図である。 本発明の第1の実施形態に係る休止状態制御装置の基本動作の別形態における休止指示処理のフローチャートである。 本発明の第1の実施形態に係る休止状態制御装置の基本動作の別形態における休止実行処理のフローチャートである。 本発明の第2の実施形態に係る休止状態制御装置のSMTを用いるCPUのc-stateにおける説明図である。 本発明の第2の実施形態に係る休止状態制御装置のSMTを用いるCPUのc-stateにおける説明図である。 本発明の第2の実施形態の休止状態制御装置の動作を説明する図である。 本発明の第2の実施形態に係る休止状態制御装置の動作における休止指示処理のフローチャートである。 本発明の第2の実施形態に係る休止状態制御装置の基本動作の別形態における休止実行処理のフローチャートである。 本発明の第3の実施形態に係る休止状態制御装置のSMTを用いるCPUのc-stateにおける説明図である。 本発明の第3の実施形態に係る休止状態制御装置の動作を説明する図である。 本発明の第3の実施形態に係る休止状態制御装置の動作における休止時間決定処理のフローチャートである。 本発明の第3の実施形態に係る休止状態制御装置の休止時間決定処理の動作説明図である。 本発明の第3の実施形態に係る休止状態制御装置の動作における休止指示処理のフローチャートである。 本発明の第3の実施形態に係る休止状態制御装置のc-state決定方法を説明する図である。 本発明の第3の実施形態に係る休止状態制御装置のc-state指定方法を説明する図である。 本発明の第4の実施形態に係る休止状態制御装置の動作を説明する図である。 本発明の第4の実施形態に係る休止状態制御装置のアイドル状態電力DBのテーブル例を示す図である。 本発明の第4の実施形態に係る休止状態制御装置の動作における休止時間決定処理のフローチャートである。 本発明の第4の実施形態に係る休止状態制御装置の休止時間決定処理の動作説明図である。 本発明の第4の実施形態に係る休止状態制御装置の動作におけるアイドル状態決定処理のフローチャートである。 本発明の第4の実施形態に係る休止状態制御装置の動作における休止指示処理のフローチャートである。 本発明の第5の実施形態に係る休止状態制御装置のSMTを用いるCPUのc-stateにおける説明図である。 本発明の第5の実施形態に係る休止状態制御装置のSMTを用いるCPUのc-stateにおける説明図である。 本発明の第5の実施形態に係る休止状態制御装置の動作を説明する図である。 本発明の第5の実施形態に係る休止状態制御装置の動作におけるコア割当決定処理のフローチャートである。 本発明の第5の実施形態に係る休止状態制御装置のコア割当決定処理を実行することによる、コア割当部の動作例を示す図である。 本発明の実施形態に係るサーバのハードウェア構成図である。 C-stateの状態の一例を表にして示す図である。 ステートまでに遷移する時間(RESIDENCY)と、復帰に要する時間(WAKE-UP LATENCY)の最大値の一例を表にして示す図である。 メニューガバナのロジック概要を説明する図である。 演算に使用するCPUコアのc-state遷移イメージ図である。 演算に使用するCPUコアのc-state遷移イメージ図である。 SMT技術におけるc-stateの種別を説明する図である。 SMTを用いるCPUのc-stateにおける課題(1)を説明する図である。 SMTを用いるCPUのc-stateにおける課題(2)を説明する図である。
 以下、図面を参照して本発明を実施するための形態(以下、「本実施形態」という)におけるデータ処理システム等について説明する。
(第1の実施形態)
 図1は、本発明の第1の実施形態に係る休止状態制御装置の概略構成図である。以下、各実施形態では、物理コアを深いコアc-stateに遷移させることで省電力化を図る休止状態制御装置に適用した例である。CPUを深いパッケージc-stateに遷移させることで省電力化を図る休止状態制御装置にも同様に適用可能である。
 図1に示すように、休止状態制御装置100を有するサーバは、HW(ハードウェア)10と、OS/ドライバ20と、アプリケーション(APL)30と、を備える。
 ハードウェア10は、コアを含んで構成されるCPU11を備えている。CPU11は、省電力状態に遷移して自身の処理能力を縮退可能なプロセッサである。
 OS/ドライバ20は、CPUアイドルドライバ21と、スケジューラ22と、コア割当部23と、CPU使用率取得部24と、を備える。
 休止状態制御装置100は、CPUの同時マルチスレッディングを用いて、論理的にCPUコアを増加させ、論理コアにデータ処理スレッド101(以下、機能および動作の説明において、適宜、データ処理スレッドDnという)を割当ててデータ処理を並列実行するデータ処理システムに備えられる。
 休止状態制御装置100は、APL30上に配置され、休止スレッド制御部110と、タイマ部120と、休止時間決定部130と、処理時間計測部140と、処理時間DB150と、アイドル状態電力DB160と、アイドル状態決定部170と、使用率DB180と、コア割当決定部190と、データ処理スレッド101(データ処理スレッドDn)と、休止スレッド102(以下、機能および動作の説明において、適宜、休止スレッドInという)と、を有する。
 <データ処理スレッドDn>
 データ処理スレッド101(データ処理スレッドDn)は、論理コアに割当てられてアプリケーション内のデータ処理を実行する処理単位の命令である。
・第1の実施形態の別形態(後記図6乃至図8)
 第1の実施形態の別形態では、データ処理スレッドDnは、自身の処理を完了させたタイミングで自ら休止スレッドInを呼び出し、処理を明け渡す休止指示機能を有する。データ処理スレッドDnは、タイマ部120に、論理コアNに対応する物理コアMの休止時間SPmを設定する(後記図7のステップS32)。データ処理スレッドDnは、論理コアNに対応する休止スレッドInに、休止状態Cmを指定して休止指示を出し、自身を実行状態から待機状態に設定する(後記図7のステップS33)。
 <休止スレッドIn>
 休止スレッド102(休止スレッドIn)は、データ処理スレッドDnよりも高優先度で動作する。
 休止スレッドInは、休止スレッド制御部110からの指示を受けて論理コアを休止させる命令を実行し、論理コアを休止させる。
 実装イメージとしては、休止スレッドInは、タイマやイベント発生までsleepさせる関数epoll_wait()を呼び出す。
・第1の実施形態(後記図3)における休止スレッドIn
 第1の実施形態では、休止スレッドInは、データ処理スレッドDnから休止指示を受け取る(後記図5のステップS21)。休止スレッドInは、休止スレッド制御部110から休止指示を受け取ると、データ処理スレッドDnよりも高優先度な実行状態となり、データ処理スレッドDnからCPU使用時間を奪取(プリエンプト)する。
 休止スレッドInは、休止スレッド制御部110から通知のあった休止状態に遷移するように休止命令を発行する(後記図5のステップS21)。休止スレッドInは、タイマ部120から起床指示が出た際に呼び出される(後記図5のステップS22)。その後、休止スレッドInは、自らを実行可能状態から待機状態に設定し、データ処理スレッドDnにCPU使用時間を明け渡す(後記図5のステップS23)。
・第1の実施形態の別形態における休止スレッドIn
 第1の実施形態では、休止スレッドInは、データ処理スレッドDnから休止指示を受け取る(後記図8のステップS41)。別形態では、第1の実施形態と異なり、データ処理スレッドDnは終了しているため、CPU使用時間の奪取(プリエンプト)は発生しない。休止スレッドInは、データ処理スレッドDnから通知のあった休止状態に遷移するように休止命令を発行する(後記図8のステップS42)。休止スレッドInは、タイマ部120から起床指示が出た際に呼び出され、自らを実行可能状態から待機状態に設定し、データ処理スレッドDnにCPU使用時間を明け渡す(後記図8のステップS43)。
 <休止スレッド制御部110>
 休止スレッド制御部110は、休止スレッドInに対し、休止命令の実行タイミングおよび休止期間を指示する。
 休止スレッド制御部110は、データ処理スレッドDnよりも高優先度で動作する休止スレッドInを用いて、休止命令の実行タイミングおよび休止期間を指示する。詳細には、休止スレッド制御部110は、同一の物理コアに対応する論理コアに対して同じタイミングでかつ、同じ時間幅の休止を強制させる命令である休止スレッドInを実行し、同一物理コア上の論理コアを全て休止させる。すなわち、休止スレッド制御部110は、複数の休止スレッドInを用いて、結果的に「同一物理コア上の全ての論理コア」を休止させる。
 休止スレッド制御部110は、同一の物理コアに対応する論理コアに対して同じタイミングでかつ、同じ時間幅の休止を強制させる。
・第1の実施形態(後記図3)における休止スレッド制御部110
 第1の実施形態では、休止スレッド制御部110は、論理コアNに対応する休止スレッドInに、休止状態Cmを指定して休止指示を出す(後記図4のステップS13)。休止スレッド制御部110は、タイマ部120に、論理コアNに対応する物理コアMの休止時間SPmを設定する(後記図4のステップS14)。
・第2の実施形態(後記図11)における休止スレッド制御部110
 第2の実施形態では、休止スレッド制御部110は、スケジューラ22に、現時点からSPmの期間は物理コアM上のすべての論理コアにおいてデータ処理スレッドを開始しないようにスケジュール指示を出す(後記図12のステップS54)。休止スレッド制御部110は、論理コアNに対応する休止スレッドInに、休止状態Cmを指定して休止指示を出す(後記図12のステップS55)。休止スレッド制御部110は、タイマ部120に、論理コアNに対応する物理コアMの休止時間SPmを設定する(後記図12のステップS56)。
・第3の実施形態(後記図15)における休止スレッド制御部110
 第3の実施形態では、休止スレッド制御部110は、論理コアNに対応する休止スレッドInに、休止状態Cmを指定して休止指示を出す(後記図18のステップS83)。
 <タイマ部120>
 タイマ部120は、物理コアMの休止時間経過後、物理コアに対応する論理コア上の休止スレッドInに対して、起床指示を出す。
・第1の実施形態および別形態におけるタイマ部120
 第1の実施形態では、タイマ部120は、物理コアMの休止時間SPm経過後、物理コアMに対応する論理コアN上の休止スレッドInに対して、起床指示を出す(後記図4のステップS15、後記図7のステップS34)。
・第2の実施形態(後記図11)におけるタイマ部120
 第2の実施形態では、タイマ部120は、物理コアMの休止時間SPm経過後、物理コアMに対応する論理コアN上の休止スレッドInに対して、起床指示を出す(後記図12のステップS57)。
・第3の実施形態(後記図15)におけるタイマ部120
 第3の実施形態では、タイマ部120は、物理コアMの休止時間SPm経過後、物理コアMに対応する論理コアN上の休止スレッドInに対して、起床指示を出す(後記図18のステップS85)。
 <休止時間決定部130>
 休止時間決定部130は、論理コア上のアプリケーションが定期的に到着するデータを処理する場合に、処理期限と過去の処理時間の実績をもとに、物理コアにおける休止タイミングおよび休止時間を決定する。
 休止時間決定部130は、同一物理コア上の論理コアのうち、処理時間の長い論理コア上の処理完了時刻を計測し、当該論理コアの処理完了時刻に合わせる強制sleep開始タイミングと、処理期限から処理完了時刻を引いた長さに指定するsleep時間と、を有し、過去の処理時間実績からsleep可能な時間を予測し、強制sleep開始タイミングおよびsleep時間を決定する。
・第3の実施形態(後記図15)における休止時間決定部130
 第3の実施形態では、休止時間決定部130は、処理時間DB150を参照し、論理コアN上のデータ処理スレッドの処理時間DLnを取得する(後記図16のステップS71)。休止時間決定部130は、処理時間DLnに安全係数SFをかけることで該当休止周期における休止可能時間TLnを計算する(後記図16のステップS72)。休止時間決定部130は、同一物理コアMに含まれる論理コアNの休止可能時間TLnを比較し、最も大きなTLnを物理コアMの休止時間TPmとして決定する(後記図16のステップS73)。
 また、休止時間決定部130は、タイマ部120に、論理コアNに対応する物理コアMの休止時間SPmを設定する(後記図18のステップS84)。
・第4の実施形態(後記図21)における休止時間決定部130
 第4の実施形態では、休止時間決定部130は、同一物理コアMに含まれる論理コアNの休止可能時間TLnを比較し、最も大きなTLnを物理コアMの休止時間TPmとして決定し、休止期間SPm=T-TPmを休止スレッド制御部110とアイドル状態決定部170に通知する(後記図23のステップS93)。
 <処理時間計測部140>
 処理時間計測部140は、データ処理スレッドDnがデータ処理を実行する際の処理時間を計測する。
 <処理時間DB150>
 処理時間DB150は、処理時間計測部140からの処理時間データを蓄積し、休止時間決定部130が論理コアN上のデータ処理スレッドの処理時間DLnを取得するための処理時間DLnを記憶する。
 <アイドル状態電力DB160>
 アイドル状態電力DB160は、アイドル状態決定部170が休止期間SPmに対応する各アイドル状態の電力量を取得するための、休止時間ごとの、アイドル状態(C0継続電力量、C1起床電力量、C1遷移電力量、C1継続電力量、C2…)を記憶する(後記図22)。
 <アイドル状態決定部170>
 アイドル状態決定部170は、休止時間決定部130が決定した強制sleep開始タイミングとsleep時間をもとに、物理コアを遷移すべきコアc-stateを決定し、当該物理コアに含まれる各論理コアを対応するc-stateに遷移させるとともに、コアc-stateからの起床時間を考慮して処理期限前に事前起床させる。
・第4の実施形態(後記図21)におけるアイドル状態決定部170
 第4の実施形態では、アイドル状態決定部170は、休止時間決定部130から休止期間SPmを取得する(後記図25のステップS101)。アイドル状態決定部170は、アイドル状態電力DB160(後記図22)を参照し、休止期間SPmに対応する各アイドル状態の電力量を取得する(後記図25のステップS102)。アイドル状態決定部170は、取得したアイドル状態の電力量の中から、最も電力量の小さいものを物理コアMのアイドル状態Cmとして決定し、物理コアMのアイドル状態Cmを休止スレッド制御部110に通知する(後記図25のステップS103)。
 <使用率DB180>
 使用率DB180は、コア割当決定部190がCPU使用率を含む処理種別ごとの処理量を算出するためのCPU使用率を記憶する。
 <コア割当決定部190>
 コア割当決定部190は、CPU使用率を含む処理種別ごとの処理量を算出し、処理量の大きさが所定範囲にある処理同士は類似する処理種別と判断して、当該処理種別の処理を同一物理コア上の論理コアに配置する。
・第5の実施形態(後記図29)におけるコア割当決定部190
 第5の実施形態では、ステップS121でコア割当決定部190は、使用率DB180を参照し、論理コアNのCPU使用率RLnを取得する(後記図30のステップS121)。
 ステップS122でコア割当決定部190は、CPU使用率RLnの大きい順に論理コアNを並べ替えて新しい論理コア順序N’を決定する(後記図30のステップS122)。コア割当決定部190は、論理コア順序N’をコア割当部23に通知する(後記図30のステップS123)。コア割当決定部190は、論理コア順序N’に基づき、使用率DB180と処理時間DB150の論理コア順序を修正する(後記図30のステップS124)。
 <スケジューラ22>
 スケジューラ22は、データ処理のタイミングを制御する。具体的には、スケジューラ22は、休止スレッド制御部110が物理コアごとに決定した休止期間に合わせ、論理コア上のデータ処理スレッドのタイミングをスケジュールし、物理コア上のすべての論理コアの休止タイミングを合わせる。
 以下、上述のように構成された休止状態制御装置100の動作を説明する。
[基本的な考え方]
 本発明は、カーネルスレッドによるmwait発行等により、同一物理コア上の論理コアを同じタイミング、および同じ時間だけ強制的にsleepさせ、かつ各論理コアを同じ深さのc-stateに落とすことで、物理コアを深いコアc-stateに遷移させる。
 また、本発明は、同一CPUソケット上の論理コアを同じタイミング、および同じ時間だけsleepさせ、かつ各論理コアを同じ深さのc-stateに落とすことで、CPUを深いパッケージc-stateに遷移させる。
 図2は、本発明の基本的な考え方を説明する図である。図2は、従来技術の図39および図40と対比する図である。
 図2は、本発明の「同一物理コア上の論理コアを同じタイミング、および同じ時間だけ強制的にsleepさせ、かつ各論理コアを同じ深さのc-stateに落とすことで、物理コアを深いコアc-stateに遷移させる」場合を例に採る。図示は省略するが、「同一CPUソケット上の論理コアを同じタイミング、および同じ時間だけsleepさせ、かつ各論理コアを同じ深さのc-stateに落とすことで、CPUを深いパッケージc-stateに遷移させる」場合も同様である。
 図2の白抜き矢印aに示すように、カーネルスレッドによるmwait発行等により、同一物理コア#0上の論理コア#0,論理コア#4を同じタイミング、および同じ時間(図2の符号b)だけ強制的にsleepさせる。
 本実施形態では、強制sleep(図2の白抜き矢印a)により論理コア#0,論理コア#4がアイドルになるタイミングをずらして揃え、物理コア#0がsleepする時間を作る(図2の符号b)。
 また、本実施形態では、コアc-stateを意識して論理コア#0,論理コア#4のc-stateを揃える(図2の破線囲みc)。ここでは、論理コア#0,論理コア#4を同じ深さのc-stateのC6に落とすことで、物理コア#0を深いコアc-state:CC6に遷移させる。
[基本動作]
 休止状態制御装置100の基本動作を説明する。
 図3は、休止状態制御装置100の基本動作を説明する図である。図1と同一構成部分には同一符号を付している。図3において、該当する機能部については、太枠で囲んだブロックおよび信号線で表記する(以下、同様の表記方法を採る)。
 図3の太枠ブロックに示すように、基本動作を実行する休止状態制御装置100は、休止スレッド制御部110と、タイマ部120と、休止スレッド102(休止スレッドIn)と、CPUアイドルドライバ21と、CPU11と、を用いる。
 休止状態制御装置100は、休止スレッド制御部110が、データ処理スレッドDnよりも高優先度で動作する休止スレッドInを用いて、休止命令の実行タイミングおよび休止期間を指示する。そして、休止スレッドInが、論理コアを休止させる命令を実行し、論理コアを休止させる。休止スレッド制御部110が休止スレッドInに対し、休止命令の実行タイミングや休止期間を指示する。このように、休止スレッド制御部110は、同一の物理コアに対応する論理コアに対して同じタイミングでかつ、同じ時間幅の休止を強制させる命令である休止スレッドInを実行し、同一物理コア上の論理コアを全て休止させる。
 休止状態制御装置100は、データ処理スレッドDnよりも高優先度で動作する。
 <休止指示フロー>
 図4は、図3の休止状態制御装置100の基本動作における休止指示処理のフローチャートである。
 ステップS11で休止スレッド制御部110は、前回から休止周期T経ったか否かを判別する。前回から休止周期T経っていない場合(S11:No)、ステップS12で一定時間待機して、ステップS11に戻る。
 前回から休止周期T経っている場合(S11:Yes)、ステップS13で休止スレッド制御部110は、論理コアNに対応する休止スレッドInに、休止状態Cmを指定して休止指示を出す。休止状態は、例えば管理者が休止状態を指定する。
 ステップS14で休止スレッド制御部110は、タイマ部120に、論理コアNに対する物理コアMの休止時間SPmを設定する。
 ステップS15でタイマ部120は、物理コアMの休止時間SPm経過後、物理コアMに対応する論理コアN上の休止スレッドInに対して、起床指示を出す。
 ステップS16で休止スレッド制御部110は、休止継続か否かを判別し、休止継続の場合(S16:Yes)は、ステップS11に戻り、休止継続でない場合(S16:No)は、本フローの処理を終了する。
 <休止実行フロー>
 図5は、図3の休止状態制御装置100の基本動作における休止実行処理のフローチャートである。
 ステップS21で休止スレッドInは、休止スレッド制御部110から休止指示を受け取ると、データ処理スレッドDnよりも高優先度な実行状態となり、データ処理スレッドDnからCPU使用時間を奪取(プリエンプト)する。
 ステップS22で休止スレッドInは、休止スレッド制御部110から通知のあった休止状態に遷移するように休止命令を発行する。
 ステップS23で休止スレッドInは、タイマ部120から起床指示が出た際に呼び出される。その後、休止スレッドInは、自らを実行可能状態から待機状態に設定し、データ処理スレッドDnにCPU使用時間を明け渡して本フローの処理を終了する。
[基本動作の別形態]
 休止状態制御装置100の基本動作の別形態を説明する。
 図6は、休止状態制御装置100の基本動作の別形態を説明する図である。図1と同一構成部分には同一符号を付している。
 図6の太枠ブロックに示すように、別形態の休止状態制御装置100は、休止スレッド制御部110と、タイマ部120と、データ処理スレッド101(データ処理スレッドDn)と、休止スレッド102(休止スレッドIn)と、CPUアイドルドライバ21と、CPU11と、を用いる。
 別形態の休止状態制御装置100は、データ処理スレッドDnを改造して、データ処理スレッドDnが自身の処理を完了させたタイミングで自ら休止スレッドInを呼び出し、処理を明け渡す。実装イメージとしては、休止スレッドInは、タイマやイベント発生までsleepさせる関数epoll_wait()を呼び出す。
 データ処理スレッドDnは、自身の処理を完了させたタイミングで自ら休止スレッドInを呼び出し、処理を明け渡す休止指示機能を有し、休止スレッドInは、データ処理スレッドDnから休止指示を受け取ると、自らを実行可能状態から待機状態に設定し、データ処理スレッドDnにCPU使用時間を明け渡す。
 <休止指示フロー>
 図7は、図3の休止状態制御装置100の基本動作の別形態における休止指示処理のフローチャートである。
 ステップS31で休止スレッドInは、データ処理スレッドDnのデータ処理が完了したか否かを判別する。データ処理スレッドDnのデータ処理が完了していない場合(S31:No)、ステップS31に戻る。
 データ処理スレッドDnのデータ処理が完了した場合(S31:Yes)、ステップS32でデータ処理スレッドDnは、タイマ部120に、論理コアNに対応する物理コアMの休止時間SPmを設定する。
 ステップS33でデータ処理スレッドDnは、論理コアNに対応する休止スレッドInに、休止状態Cmを指定して休止指示を出す。その後、データ処理スレッドDnは、自身を実行状態から待機状態に設定する。
 ステップS34でタイマ部120は、物理コアMの休止時間SPm経過後、物理コアMに対応する論理コアN上の休止スレッドInに対して、起床指示を出す。
 ステップS35で休止スレッドInは、休止継続か否かを判別し、休止継続の場合(S35:Yes)は、ステップS31に戻り、休止継続でない場合(S35:N)は、本フローの処理を終了する。
 <休止実行フロー>
 図8は、図6の休止状態制御装置100の基本動作の別形態における休止実行処理のフローチャートである。
 ステップS41で休止スレッドInは、データ処理スレッドDnから休止指示を受け取る。データ処理スレッドDnは終了しているため、CPU使用時間の奪取(プリエンプト)は発生しない。
 ステップS42で休止スレッドInは、データ処理スレッドDnから通知のあった休止状態に遷移するように休止命令を発行する。
 ステップS43で休止スレッドInは、タイマ部120から起床指示が出た際に呼び出される。その後、休止スレッドInは、自らを実行可能状態から待機状態に設定し、データ処理スレッドDnにCPU使用時間を明け渡して本フローの処理を終了する。
(第2の実施形態)
 図9および図10は、本発明の第2の実施形態を説明する図である。図9は、第1の実施形態のSMTを用いるCPUのc-stateにおける説明図である。図10は、第2の実施形態のSMTを用いるCPUのc-stateにおける説明図である。
 第1の実施形態は、CPUが同時マルチスレッディング(SMT)を有効化している際、同一の物理コアに対応する論理コアに対して外部(カーネルスレッド等)から同じタイミングで同じ時間幅の休止を強制させることで、CPUの電力を削減する。
 しかし、第1の実施形態では、すでに実行中のデータ処理がある場合にはそれを一時停止して強制的に休止状態に入ってしまうため、余計な起床時間やスレッド切り替えによる性能影響がある。例えば、図9の白抜き矢印aに示すように、第1の実施形態では、カーネルスレッドによるmwait発行等により、強制sleepを行う。その後、図9の白抜き矢印eに示すように、起床・スレッド切り替えを行う。ただし、処理途中(図9の符号dに示す処理Aの途中)でも強制的にsleepさせるため、性能影響を及ぼす可能性がある。
 そこで、データ処理のタイミングをスケジューラ22(後記図11)により制御して休止のタイミングを合わせる方法が考えられる。
 第2の実施形態では、スケジューラ22により論理コア上のアプリの動作タイミングを制御し、同一物理コア上のすべての論理コアの休止タイミングを合わせる。具体的には、物理コアごとに決定した休止期間に合わせ、スケジューラ22が論理コア上のデータ処理スレッドDnのタイミングをスケジュールし、物理コア上のすべての論理コアを休止状態にすることで、物理コアを深いコアc-stateに遷移させる。
 図10の白抜き矢印aに示すように、カーネルスレッドによるmwait発行等により、同一物理コア#0上の論理コア#0,論理コア#4を同じタイミングで強制的にsleepさせる。第2の実施形態では、第1の実施形態と同様に、強制sleep(図10の白抜き矢印a)により、物理コア#0がsleepする時間を作る。
 第2の実施形態では、図10の白抜き矢印fに示すように、スケジューラ22がデータ処理の開始を遅らせて(図10の例では、スケジューラ22が論理コア#0の処理Aの開始を遅らせて処理Aが分断されないようにして)物理コア#0がsleepする時間を作る。
 図11は、本発明の第2の実施形態の休止状態制御装置100の動作を説明する図である。図1と同一構成部分には同一符号を付している。
 図11の太枠ブロックに示すように、第2の実施形態の休止状態制御装置100は、休止スレッド制御部110と、タイマ部120と、スケジューラ22と、データ処理スレッド101(データ処理スレッドDn)と、休止スレッド102(休止スレッドIn)と、CPUアイドルドライバ21と、CPU11と、を用いる。
 第2の実施形態の休止状態制御装置100は、休止スレッド制御部110が、物理コアごとに決定した休止期間に合わせ、スケジューラ22が論理コア上のデータ処理スレッドのタイミングをスケジュールし、データ処理の開始を遅らせて物理コアがsleepする時間を作る。物理コア上のすべての論理コアが休止状態にすることで、物理コアを深いコアc-stateに遷移させる。
 <休止指示フロー>
 図12は、図11の休止状態制御装置100の動作における休止指示処理のフローチャートである。
 ステップS51で休止スレッド制御部110は、前回から休止周期T経ったか否かを判別する。前回から休止周期T経っていない場合(S51:No)、ステップS52で一定時間待機してステップS51に戻る。
 前回から休止周期T経っている場合(S51:Yes)、ステップS53で休止スレッド制御部110は、物理コアM上のすべての論理コアの処理完了を待つ。
 ステップS54で休止スレッド制御部110は、スケジューラ22に、現時点からSPmの期間は物理コアM上のすべての論理コアにおいてデータ処理スレッドを開始しないようにスケジュール指示を出す。
 ステップS55で休止スレッド制御部110は、論理コアNに対応する休止スレッドInに、休止状態Cmを指定して休止指示を出す。
 ステップS56で休止スレッド制御部110は、タイマ部120に、論理コアNに対応する物理コアMの休止時間SPmを設定する。
 ステップS57でタイマ部120は、物理コアMの休止時間SPm経過後、物理コアMに対応する論理コアN上の休止スレッドInに対して、起床指示を出す。
 ステップS58で休止スレッド制御部110は、スケジューラ22に、物理コアM上のすべての論理コアにおけるデータ処理スレッド開始を解禁するようにスケジュール指示を出す。
 ステップS59で休止スレッド制御部110は、休止継続か否かを判別し、休止継続の場合(S59:Yes)は、ステップS51に戻り、休止継続でない場合(S59:No)は、本フローの処理を終了する。
 <休止実行フロー>
 図13は、図11の休止状態制御装置100の基本動作の別形態における休止実行処理のフローチャートである。
 ステップS61で休止スレッドInは、休止スレッド制御部110から休止指示を受け取る。データ処理スレッドDnは終了しているため、CPU使用時間の奪取(プリエンプト)は発生しない。
 ステップS62で休止スレッドInは、休止スレッド制御部110から通知のあった休止状態に遷移するように休止命令を発行する。
 ステップS63で休止スレッドInは、タイマ部120から起床指示が出た際に呼び出される。その後、休止スレッドInは、自らを実行可能状態から待機状態に設定し、データ処理スレッドDnにCPU使用時間を明け渡して本フローの処理を終了する。
(第3の実施形態)
 第1の実施形態は、どのタイミングでどれくらいの時間を強制的にsleepさせればよいか決定できない。しかし、定期的にデータが到着して一定の処理期限内に処理を完了させる場合(音声・映像のデータ変換処理やRAN処理等)は、過去の実績からどのタイミングならsleepできるか推定が可能である。
 そこで、第3の実施形態では、過去の処理時間実績からsleep可能な時間を予測し、強制sleep開始タイミングとsleep時間を決定する。
 ここで、sleep開始タイミングとは、同一物理コア上の論理コアのうち、処理時間の長い論理コア上の処理完了時刻を計測し、当該論理コアの処理完了時刻に合わせることをいう。また、sleep時間とは、処理期限から処理完了時刻を引いた長さに指定することをいう。
 図14は、本発明の第3の実施形態のSMTを用いるCPUのc-stateにおける説明図である。
 図14に示す処理開始時刻t1は、同一物理コア#0上の論理コア#0,論理コア#4の処理開始時刻、処理完了時刻t2は、強制sleep開始タイミング、処理期限t3は、論理コア#0,論理コア#4の処理が完了しなければならない期限である。
 図14の白抜き矢印hに示す強制sleepは、全論理コア上の処理完了時刻であるSleep開始タイミングで発行される(図14の符号i)。図14の矢印jに示すsleep時間は、処理期限t3から処理完了時刻t2を引いた時間(t3-t2)となる。この強制sleep開始タイミングとsleep時間は、過去の処理時間実績からsleep可能な時間を予測して決定することができる。
 図15は、本発明の第3の実施形態の休止状態制御装置100の動作を説明する図である。図1と同一構成部分には同一符号を付している。
 図15の太枠ブロックに示すように、第3の実施形態の休止状態制御装置100は、休止スレッド制御部110と、タイマ部120と、休止時間決定部130と、処理時間計測部140と、処理時間DB150と、使用率DB180と、データ処理スレッド101(データ処理スレッドDn)と、休止スレッド102(休止スレッドIn)と、CPUアイドルドライバ21と、CPU11と、CPU使用率取得部24と、を用いる。
 第3の実施形態の休止状態制御装置100は、休止スレッド制御部110が、物理コアごとに決定した休止期間に合わせ、過去の処理時間実績からsleep可能な時間を予測し、強制sleep開始タイミングとsleep時間を決定する。物理コアをsleepするタイミングと最大のsleep時間が決定でき、物理コアを効果的により深いコアc-stateへ遷移させる。
 <休止時間決定フロー>
 図16は、図11の休止状態制御装置100の動作における休止時間決定処理のフローチャートである。図17は、図16の休止時間決定処理の動作説明図である。
 ステップS71で休止時間決定部130は、処理時間DB150を参照し、論理コアN上のデータ処理スレッドの処理時間DLnを取得する。
 ステップS72で休止時間決定部130は、処理時間DLnに安全係数SF(図17の破線丸囲み符号k)をかけることで該当休止周期における休止可能時間TLnを計算する(TLn=DLn×SF)。
 ステップS73で休止時間決定部130は、同一物理コアMに含まれる論理コアNの休止可能時間TLnを比較し、最も大きなTLnを物理コアMの休止時間TPmとして決定する。そして、休止時間決定部130は、休止期間SPm=T-TPmを休止スレッド制御部110に通知して本フローの処理を終了する。
 なお、第1および第2の実施形態では、管理者から与えた休止可能時間TLmを用いているが、第1および第2の実施形態においても、第3の実施形態と同様に、休止時間決定フロー(図16)を実行して、休止時間を決定してもよい。
 <休止指示フロー>
 図18は、図15の休止状態制御装置100の動作における休止指示処理のフローチャートである。
 ステップS81で休止スレッド制御部110は、物理コアMの処理開始からTPm経ったか否かを判別する。物理コアMの処理開始からTPm経っていない場合(S81:No)、ステップS82で一定時間待機してステップS81に戻る。
 物理コアMの処理開始からTPm経った場合(S81:Yes)、ステップS83で休止スレッド制御部110は、論理コアNに対応する休止スレッドInに、休止状態Cmを指定して休止指示を出す。
 ステップS84で休止時間決定部130は、タイマ部120に、論理コアNに対応する物理コアMの休止時間SPmを設定する。
 ステップS85でタイマ部120は、物理コアMの休止時間SPm経過後、物理コアMに対応する論理コアN上の休止スレッドInに対して、起床指示を出す。
 ステップS86で休止スレッド制御部110は、休止継続か否かを判別し、休止継続の場合(S86:Yes)は、ステップS81に戻り、休止継続でない場合(S86:No)は、本フローの処理を終了する。
 <休止実行フロー>
 休止実行フローは、図3の休止状態制御装置100の休止実行処理のフローチャートと同様であるため説明を省略する。
 なお、第3の実施形態以降の実施形態おいて、スケジューラ22(図1)によるデータ処理スレッドの処理タイミングスケジュールは必須ではなく、第1の実施形態と同様、スケジューラ22の関与なく強制スリープによりプリエンプトさせる。ただし、第2の実施形態で記載したスケジューラ22を用いることも可能である。第3の実施形態以降の各実施形態に、第2の実施形態を組み合わせることで、第2の実施形態の効果(処理途中の強制sleepを避ける効果)を併せて得ることかできる。
(第4の実施形態)
 第3の実施形態は、定期的にデータが到着するケースにおいて、物理コアをsleepするタイミングと最大のsleep時間とを決定できる。しかし、c-stateの深さの決定方法や、c-state制御の方法は含まれていない。
 第4の実施形態では、第3の実施形態で決定したsleep開始タイミングとsleep時間から、該当物理コアを遷移すべきコアc-stateを決定し、物理コアに含まれる各論理コアを対応するc-stateに遷移させる。また、c-stateからの起床時間を考慮して処理期限前に事前起床させる。
 第4の実施形態は、第3の実施形態の過去の処理時間実績からsleep可能な時間を予測し、強制sleep開始タイミングとsleep時間を決定する方法に加え、<c-state決定方法>と<c-state指定方法>を導入する。以下、<c-state決定方法>、<c-state指定方法>を順に説明する。
 <c-state決定方法>
 c-state決定方法について述べる。
 c-state決定方法は、c-stateへの遷移時間、継続時間、起床時間の間の消費電力量が最も小さくなるc-stateを決定する。事前にc-stateごとに上記各時間で発生する消費電力量を計測しておき、判断に利用してもよい。
 図19は、c-state決定方法を説明する図であり、横軸は時間、縦軸はc-stateの深さを示している。図19上図は、c-stateがC0とC1の場合のc-state決定方法を示し、図19下図は、c-stateがC0とC6の場合のc-state決定方法を示す。
 まず、図19上図に示すように、第1乃至第3の実施形態の休止状態制御によって、強制sleepが実行されると(図19上図の符号k)、短い遷移(図19上図の符号l)後、C1継続時間となる(図19上図の符号n)。CPUidleガバナによって事前起床が指示(図19上図の符号m)されると、短い遷移後、C1起床時間(図19上図の符号o)を経てc-stateがC0に復帰する。強制sleep(図19上図の符号k)の処理完了時刻t2からc-stateC0復帰の処理期限t3までの期間(図19上図の矢印p)の消費電力量(J:joule)を測定する。事前測定結果では、C1の場合:10Jである。図19上図に示す浅いc-stateC1では、C1継続時間(図19上図の符号n)が長く、事前起床(図19上図の符号m)によるC1起床時間(図19上図の符号o)も短いが、省電力効果は小さい。
 次に、図19下図に示すように、第1乃至第3の実施形態の休止状態制御によって、強制sleepが実行されると(図19下図の符号k)、少し長い遷移(図19下図の符号l)後、C6継続時間となる(図19下図の符号n)。CPUidleガバナによって事前起床が指示(図19下図の符号m)されると、長い遷移後、C6起床時間(図19下図の符号o)を経てc-stateがC0に復帰する。強制sleep(図19下図の符号k)の処理完了時刻t2からc-stateC0復帰の処理期限t3までの期間(図19上図の矢印pに表記)の消費電力量(J)を測定する。事前測定結果では、C6の場合:5Jである。図19下図に示す深いc-stateC6では、C6継続時間(図19下図の符号n)が短く、事前起床(図19下図の符号m)によるC6起床時間(図19下図の符号o)は非常に長いが、C6に遷移すると最も省電力となる。
 第4の実施形態は、図19に示すc-stateへの遷移時間、継続時間、起床時間の間の消費電力量が最も小さくなるc-stateを決定する。
 <c-state指定方法>
 c-state指定方法について述べる。
 c-state指定方法は、強制sleepスレッドがCPUidle frameworkに対して復帰時間を指定する方法や、sysfs・CPUidleガバナに対して復帰時間を指定する方法がある。
 図20は、c-state指定方法を説明する図である。
 図20に示す強制sleepスレッド200は、アプリケーション(APL)30上で第1乃至第4の実施形態の休止状態制御装置100のCPU11(図1)が実行する休止状態制御方法のプログラムである。
 休止状態制御装置100を有するサーバは、HW(ハードウェア)10(図1)にderiver/hardwareを備え、OS/ドライバ20(図1)にkernelを備える。Kernelは、既存のタスクスケジューラ210と、sysfs211と、cpuidle governor212と、cpuidle framework201と、を有する。deriver/hardwareは、cpuidle driver(ACPI/intel_idle)202を有する。
 c-state指定方法は、強制sleepスレッド200が、(1)CPUidle frameworkに対して復帰時間を指定する方法と、(2)sysfs211およびpuidle governor212に対して復帰時間を指定する方法とがある。
 (1)c-state指定方法は、強制sleepスレッド200がcpuidle framework201に対し、cpuidle_idle_call(復帰時間指定)を発行し、これを受けてcpuidle framework201が、cpuidle driver(ACPI/intel_idle)202に、cpuidle_enter(c-state指定)を設定し、cpuidle driver(ACPI/intel_idle)202がcpuidleを制御する。
 (2)c-state指定方法は、強制sleepスレッド200がsysfs211に対し、復帰時間を指定し、sysfs211が、cpuidle framework201に対し、sysfs経由で復帰時間を指定する。
 図21は、本発明の第4の実施形態の休止状態制御装置100の動作を説明する図である。図1と同一構成部分には同一符号を付している。
 図21の太枠ブロックに示すように、第4の実施形態の休止状態制御装置100は、休止スレッド制御部110と、タイマ部120と、休止時間決定部130と、アイドル状態電力DB160と、アイドル状態決定部170と、休止スレッド102(休止スレッドIn)と、CPUアイドルドライバ21と、CPU11と、CPU使用率取得部24と、を用いる。
 第4の実施形態の休止状態制御装置100は、第3の実施形態で決定したsleep開始タイミングとsleep時間から、該当物理コアを遷移すべきコアc-stateを決定し、物理コアに含まれる各論理コアを対応するc-stateに遷移させる。また、c-stateからの起床時間を考慮して処理期限前に事前起床させる。
 図22は、アイドル状態電力DB160のテーブル例を示す図である。
 図22に示すように、アイドル状態電力DB160は、休止時間ごとの、アイドル状態(C0継続電力量、C1起床電力量、C1遷移電力量、C1継続電力量、C2…)を記憶する。例えば、休止時間(0-100us)の場合、C0継続電力量「0.2mJ」、C1起床電力量「0.05mJ」、C1遷移電力量「0.1mJ」、C1継続電力量「0.1mJ」である。アイドル状態決定部170は、このアイドル状態電力DB160を参照することで、休止期間SPmに対応する各アイドル状態の電力量を取得することができる。アイドル状態決定フローの詳細については、図25により後記する。
 <休止時間決定フロー>
 図23は、図21の休止状態制御装置100の動作における休止時間決定処理のフローチャートである。図24は、図23の休止時間決定処理の動作説明図である。
 ステップS91で休止時間決定部130は、処理時間DB150を参照し、論理コアN上のデータ処理スレッドの処理時間DLnを取得する。
 ステップS92で休止時間決定部130は、処理時間DLnに安全係数SF(図24の破線丸囲み符号t)をかけることで該当休止周期における休止可能時間TLnを計算する(TLn=DLn×SF)。
 ステップS93で休止時間決定部130は、同一物理コアMに含まれる論理コアNの休止可能時間TLnを比較し、最も大きなTLnを物理コアMの休止時間TPmとして決定する。そして、休止時間決定部130は、休止期間SPm=T-TPmを休止スレッド制御部110とアイドル状態決定部170に通知して本フローの処理を終了する。
 <アイドル状態決定フロー>
 図25は、図21の休止状態制御装置100の動作におけるアイドル状態決定処理のフローチャートである。
 ステップS101でアイドル状態決定部170は、休止時間決定部130から休止期間SPmを取得する。
 ステップS102でアイドル状態決定部170は、アイドル状態電力DB160(図22)を参照し、休止期間SPmに対応する各アイドル状態の電力量を取得する。例えば、休止期間SPmに対応する各アイドル状態の電力量(C0=0.2mJ,C1=0.25mJ,…)を取得する。
 ステップS103でアイドル状態決定部170は、取得したアイドル状態の電力量の中から、最も電力量の小さいものを物理コアMのアイドル状態Cmとして決定する。アイドル状態決定部170は、物理コアMのアイドル状態Cmを休止スレッド制御部110に通知して本フローの処理を終了する。
 <休止指示フロー>
 図26は、図21の休止状態制御装置100の動作における休止指示処理のフローチャートである。
 ステップS111で休止スレッド制御部110は、物理コアMの処理開始からTPm経ったか否かを判別する。物理コアMの処理開始からTPm経っていない場合(S111:No)、ステップS112で一定時間待機してステップS111に戻る。
 物理コアMの処理開始からTPm経った場合(S111:Yes)、ステップS113で休止スレッド制御部110は、論理コアNに対応する休止スレッドInに、休止状態Cmを指定して休止指示を出す。
 ステップS114で休止時間決定部130は、Cmに対応する起床時間Wmを考慮した休止時間を決定する。
 ステップS115で休止時間決定部130は、タイマ部120に、論理コアNに対応する物理コアMの休止時間SPm’を設定する(SPm’= SPm-Wm)。
 ステップS116でタイマ部120は、物理コアMの休止時間SPm'経過後、物理コアMに対応する論理コアN上の休止スレッドInに対して、起床指示を出す。
 ステップS117で休止スレッド制御部110は、休止継続か否かを判別し、休止継続の場合(S117:Yes)は、ステップS111に戻り、休止継続でない場合(S117:No)は、本フローの処理を終了する。
(第5の実施形態)
 図27および図28は、本発明の第5の実施形態を説明する図である。図27は、第1の実施形態のSMTを用いるCPUのc-stateにおける説明図である。図28は、第5の実施形態のSMTを用いるCPUのc-stateにおける説明図である。
 第1の実施形態は、CPUが同時マルチスレッディング(SMT)を有効化している際、同一の物理コアに対応する論理コアに対して外部(カーネルスレッド等)から同じタイミングで同じ時間幅の休止を強制させることで、CPUの電力を削減する。
 第1の実施形態により、一定の期間の強制sleepは可能である。しかし、処理種別によってsleepできる時間が異なるため、すべての処理に影響を与えない期間のsleepしようとすると、処理量の多い処理種別に合わせてsleep可能時間が減ってしまうことが考えられる。
 例えば、図27の符号v1とv2に示すように、物理コア#0の論理コア#0と論理コア#4では、論理コア#0の処理Aと論理コア#4の処理Bとは処理量が異なる(論理コア#4の処理Bの処理量が多い)ので、物理コア#0におけるsleep可能時間は、処理量の多い処理Bに制限されてしまう。同様に、物理コア#1の論理コア#1と論理コア#5では、論理コア#1の処理Aと論理コア#5の処理Bとは処理量が異なる(論理コア#5の処理Bの処理量が多い)ので、物理コア#1におけるsleep可能時間は、処理量の多い処理Bに制限されてしまう。
 第5の実施形態では、処理種別が類似するアプリケーションを同一物理コアにアサインする。具体的には、第5の実施形態の休止状態制御装置100(図29)は、CPU使用率などから処理種別ごとの処理量を算出し、処理量の大きさが所定範囲にある処理同士は類似する処理種別と判断して、当該処理種別の処理を同一物理コア上の論理コアに配置する。これにより、物理コアのsleepできる時間を延ばし(図28の期間w)、省電力化する。
 図29は、本発明の第5の実施形態の休止状態制御装置100の動作を説明する図である。図1と同一構成部分には同一符号を付している。
 図29の太枠ブロックに示すように、第5の実施形態の休止状態制御装置100は、休止スレッド制御部110と、タイマ部120と、休止時間決定部130と、処理時間計測部140と、処理時間DB150と、使用率DB180と、コア割当決定部190と、データ処理スレッド101(データ処理スレッドDn)と、休止スレッド102(休止スレッドIn)と、を用いる。また、第5の実施形態の休止状態制御装置100は、OS/ドライバ20のコア割当部23と、CPU使用率取得部24と、を用いる。
 <コア割当決定フロー>
 図30は、図29の休止状態制御装置100の動作におけるコア割当決定処理のフローチャートである。
 ステップS121でコア割当決定部190は、使用率DB180を参照し、論理コアNのCPU使用率RLnを取得する。
 ステップS122でコア割当決定部190は、CPU使用率RLnの大きい順に論理コアNを並べ替えて新しい論理コア順序N’を決定する。
 ステップS123でコア割当決定部190は、論理コア順序N’をコア割当部23に通知する。
 ステップS124でコア割当決定部190は、論理コア順序N’に基づき、使用率DB180と処理時間DB150の論理コア順序を修正して本フローの処理を終了する。
 <コア割当部23の動作例>
 図31は、図30のコア割当決定処理を実行することによる、コア割当部23の動作例を示す図である。
 図31では、物理コア#0の論理コア順序Nは、論理コア#0、論理コア#4の順である。そしてCPU使用率RLnは、論理コア#0が20%、論理コア#4が60%となっている。また、物理コア#1の論理コア順序Nは、論理コア#1、論理コア#5の順である。そしてCPU使用率RLnは、論理コア#1が10%、論理コア#5が70%となっている。したがって、CPU使用率RLnは、高い順に、物理コア#1の論理コア#5(70%)、物理コア#0の論理コア#4(60%)、物理コア#0の論理コア#0(20%)、物理コア#1の論理コア#1(10%)となる。
 コア割当部23(図31)は、論理コア順序Nと論理コア順序N’の関係から、論理コアNに乗っているデータ処理スレッドを論理コアN’に移し替える。図31の場合、コア割当部23は、CPU使用率RLnが高い順に論理コアNに乗っているデータ処理スレッドを並べ替える。新しい論理コア順序N’では、コア割当部23は、論理コア#5のデータ処理スレッドを論理コア#0に移動し(矢印x1参照)、論理コア#4のデータ処理スレッドは移動しない(矢印x2参照)。また、コア割当部23は、論理コア#0のデータ処理スレッドを論理コア#1に移動し(矢印x3参照)、論理コア#1のデータ処理スレッドを論理コア#5に移動する(矢印x4参照)。
[ハードウェア構成]
 上記各実施形態に係る休止状態制御装置100(図1)は、例えば図32に示すような構成のコンピュータ900によって実現される。
 図32は、コンピュータ900を示すハードウェア構成図である。
 コンピュータ900は、CPU901、ROM902、RAM903、HDD904、通信インタフェース906、入出力インタフェース905、およびメディアインタフェース907を有する。なお、図32ではインタフェースのことを“I/F”と記載している。
 CPU32は、ROM902またはHDD904に格納されたプログラムに基づいて動作し、休止状態制御装置100(図1)の各部を具現化する。ROM902は、コンピュータ900の起動時にCPU32によって実行されるブートプログラムや、コンピュータ900のハードウェアに依存するプログラム等を格納する。
 CPU32は、入出力インタフェース905を介して、マウスやキーボード等の入力装置910、および、ディスプレイ等の出力装置911を制御する。CPU32は、入出力インタフェース905を介して、入力装置910からデータを取得するともに、生成したデータを出力装置911へ出力する。なお、プロセッサとしてCPU32とともに、GPU(Graphics Processing Unit)等を用いてもよい。
 HDD904は、CPU32により実行されるプログラムおよび当該プログラムによって使用されるデータ等を記憶する。通信インタフェース906は、通信網(例えば、ネットワーク922)を介して他の装置からデータを受信してCPU32へ出力し、また、CPU32が生成したデータを、通信網を介して他の装置へ送信する。
 メディアインタフェース907は、記録媒体912に格納されたプログラムまたはデータを読み取り、RAM903を介してCPU32へ出力する。CPU32は、目的の処理に係るプログラムを、メディアインタフェース907を介して記録媒体912からRAM903上にロードし、ロードしたプログラムを実行する。記録媒体912は、DVD(Digital Versatile Disc)、PD(Phase change rewritable Disk)等の光学記録媒体、MO(Magneto Optical disk)等の光磁気記録媒体、磁気記録媒体、導体メモリテープ媒体又は半導体メモリ等である。
 例えば、コンピュータ900が本実施形態に係る一装置として構成される休止状態制御装置100(図1)として機能する場合、休止状態制御装置100のCPU32は、RAM903上にロードされたプログラムを実行することにより休止状態制御装置100の機能を実現する。また、HDD904には、RAM903内のデータが記憶される。CPU32は、目的の処理に係るプログラムを記録媒体912から読み取って実行する。この他、CPU32は、他の装置から通信網(NW922)を介して目的の処理に係るプログラムを読み込んでもよい。
[効果]
 以上説明したように、休止状態制御装置100(図1、図3)は、CPUの同時マルチスレッディングを用いて、論理的にCPUコアを増加させ、論理コアにデータ処理スレッドDn(データ処理スレッド101)を割当ててデータ処理を並列実行するデータ処理システムの休止状態制御装置であって、データ処理スレッドDnよりも高優先度で動作する休止スレッドIn(休止スレッド102)を用いて、休止命令の実行タイミングおよび休止期間を指示する休止スレッド制御部110を備え、休止スレッド制御部110は、同一の物理コアに対応する論理コアに対して同じタイミングでかつ、同じ時間幅の休止を強制させる命令である休止スレッドを実行し、同一物理コア上の論理コアを全て休止させることを特徴とする。
 このようにすることにより、休止状態制御装置100は、休止スレッド制御部110が、データ処理スレッドDnよりも高優先度で動作する休止スレッドInを用いて、休止命令の実行タイミングおよび休止期間を指示する。そして、休止スレッドInが、論理コアを休止させる命令を実行し、論理コアを休止させる。休止スレッド制御部110が休止スレッドInに対し、休止命令の実行タイミングや休止期間を指示する。これにより、休止スレッド制御部110は、同一の物理コアに対応する論理コアに対して同じタイミングでかつ、同じ時間幅の休止を強制させる命令である休止スレッドInを実行し、同一物理コア上の論理コアを全て休止させる。その結果、各論理コアが同じタイミングで休止状態に入ることで、物理コアが深い休止状態に遷移し、省電力化することができる(要件1を満たす)。また、CPU使用率やアプリの処理時間を参照して性能影響を与えない範囲で休止期間を設定するので、処理のスループットを下げない(要件2を満たす)。
 特に、カーネルスレッドによるmwait発行等により、同一物理コア上の論理コアを同じタイミングで、同じ時間だけ強制的にsleepさせ、かつ各論理コアを同じ深さのc-stateに落とすことで、物理コアを深いコアc-stateに遷移させることができる(図38のコアc-state (CCx)参照)。
 また、同様の方法で、同一CPUソケット上の論理コアを同じタイミングで、同じ時間だけsleepさせ、かつ各論理コアを同じ深さのc-stateに落とすことで、CPUを深いパッケージc-stateに遷移させることができる(図38のパッケージc-state (PCx)参照)。
 休止状態制御装置100(図6)において、データ処理スレッドDnは、自身の処理を完了させたタイミングで自ら休止スレッドInを呼び出し、処理を明け渡す休止指示機能を有し、休止スレッドInは、データ処理スレッドDnから休止指示を受け取ると、自らを実行可能状態から待機状態に設定し、データ処理スレッドDnにCPU使用時間を明け渡すことを特徴とする。
 また、休止スレッドInは、タイマやイベント発生までsleepさせる関数epoll_wait()を呼び出す態様を採ってもよい。この別形態によっても同一物理コア上の論理コアを同じタイミングで、同じ時間だけ強制的にsleepさせ、かつ各論理コアを同じ深さのc-stateに落とすことができ、物理コアを深いコアc-stateに遷移させることができる。したがって、第1の実施形態の休止状態制御装置100(図1)の場合と同様に、物理コアを効果的により深いコアc-stateへ遷移させて、省電力化を図ることができる。
 休止状態制御装置100(図11)において、データ処理のタイミングを制御するスケジューラ22を備え、スケジューラ22は、休止スレッド制御部110が物理コアごとに決定した休止期間に合わせ、論理コア上のデータ処理スレッドのタイミングをスケジュールし、物理コア上のすべての論理コアの休止タイミングを合わせることを特徴とする。
 このようにすることにより、処理途中の強制sleepを避けることができ、余計な起床時間やスレッド切り替えによる性能影響を未然に防ぐことができる。
 休止状態制御装置100(図15)において、論理コア上のアプリケーションが定期的に到着するデータを処理する場合に、処理期限と過去の処理時間の実績をもとに、物理コアにおける休止タイミングおよび休止時間を決定する休止時間決定部130を備えることを特徴とする。
 このようにすることにより、どのタイミングでどれくらいの時間を強制的にsleepさせればよいかを決定することができ、物理コアを効果的により深いコアc-stateへ遷移させて、さらに電力化を図ることができる。
 休止状態制御装置100(図21)において、休止時間決定部130は、同一物理コア上の論理コアのうち、処理時間の長い論理コア上の処理完了時刻を計測し、当該論理コアの処理完了時刻に合わせる強制sleep開始タイミングと、処理期限から処理完了時刻を引いた長さに指定するsleep時間と、を有し、過去の処理時間実績からsleep可能な時間を予測し、強制sleep開始タイミングおよびsleep時間を決定することを特徴とする。
 このようにすることにより、定期的にデータが到着するケースにおいて物理コアをsleepするタイミングと最大のsleep時間が決定でき、物理コアを効果的により深いコアc-stateへ遷移させて、より一層省電力化を図ることができる。
 休止状態制御装置100(図1、図3)において、休止時間決定部130が決定した強制sleep開始タイミングとsleep時間をもとに、物理コアを遷移すべきコアc-stateを決定し、当該物理コアに含まれる各論理コアを対応するc-stateに遷移させるとともに、コアc-stateからの起床時間を考慮して処理期限前に事前起床させるアイドル状態決定部170を備えることを特徴とする。
 このようにすることにより、定期的にデータが到着するケースにおいて物理コアをsleepするタイミングと最大のsleep時間が決定できることに加え、c-stateの深さの決定方法やc-state制御の方法を最適化することができ、物理コアを効果的により深いコアc-stateへ遷移させて、より一層省電力化を図ることができる。
 休止状態制御装置100(図1、図3)において、CPU使用率を含む処理種別ごとの処理量を算出し、処理量の大きさが所定範囲にある処理同士は類似する処理種別と判断して、当該処理種別の処理を同一物理コア上の論理コアに配置するコア割当決定部190を備えることを特徴とする。
 このようにすることにより、類似する処理種別の処理を同一物理コア上の論理コアに配置することで、物理コアのsleepできる時間を延ばし、より一層省電力化することができる。
 なお、上記各実施形態において説明した各処理のうち、自動的に行われるものとして説明した処理の全部又は一部を手動的に行うこともでき、あるいは、手動的に行われるものとして説明した処理の全部又は一部を公知の方法で自動的に行うこともできる。この他、上述文書中や図面中に示した処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて任意に変更することができる。
 また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部又は一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的又は物理的に分散・統合して構成することができる。
 また、上記の各構成、機能、処理部、処理手段等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、上記の各構成、機能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行するためのソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリや、ハードディスク、SSD(Solid State Drive)等の記録装置、または、IC(Integrated Circuit)カード、SD(Secure Digital)カード、光ディスク等の記録媒体に保持することができる。
 10 HW(ハードウェア)
 11 CPU
 20 OS/ドライバ
 21 CPUアイドルドライバ
 22 スケジューラ
 23 コア割当部
 24 CPU使用率取得部
 30 アプリケーション(APL)
 100 休止状態制御装置
 101 データ処理スレッドDn
 102 休止スレッドIn
 110 休止スレッド制御部
 120 タイマ部
 130 休止時間決定部
 140 処理時間計測部
 150 処理時間DB
 160 アイドル状態電力DB
 170 アイドル状態決定部
 180 使用率DB
 190 コア割当決定部

Claims (8)

  1.  CPUの同時マルチスレッディングを用いて、論理的にCPUコアを増加させ、論理コアにデータ処理スレッドを割当ててデータ処理を並列実行するデータ処理システムの休止状態制御装置であって、
     前記データ処理スレッドよりも高優先度で動作する休止スレッドを用いて、休止命令の実行タイミングおよび休止期間を指示する休止スレッド制御部を備え、
     前記休止スレッド制御部は、同一の物理コアに対応する論理コアに対して同じタイミングでかつ、同じ時間幅の休止を強制させる命令である前記休止スレッドを実行し、同一物理コア上の前記論理コアを全て休止させる
     ことを特徴とする休止状態制御装置。
  2.  データ処理のタイミングを制御するスケジューラを備え、
     前記スケジューラは、前記休止スレッド制御部が物理コアごとに決定した休止期間に合わせ、前記論理コア上のデータ処理スレッドのタイミングをスケジュールし、前記物理コア上のすべての前記論理コアの休止タイミングを合わせる
     ことを特徴とする請求項1に記載の休止状態制御装置。
  3.  前記論理コア上のアプリケーションが定期的に到着するデータを処理する場合に、処理期限と過去の処理時間の実績をもとに、前記物理コアにおける休止タイミングおよび休止時間を決定する休止時間決定部を備える
     ことを特徴とする請求項1に記載の休止状態制御装置。
  4.  前記休止時間決定部は、
     同一物理コア上の前記論理コアのうち、処理時間の長い論理コア上の処理完了時刻を計測し、当該論理コアの処理完了時刻に合わせる強制sleep開始タイミングと、前記処理期限から前記処理完了時刻を引いた長さに指定するsleep時間と、を有し、
     過去の処理時間実績からsleep可能な時間を予測し、前記強制sleep開始タイミングおよび前記sleep時間を決定する
     ことを特徴とする請求項3に記載の休止状態制御装置。
  5.  前記休止時間決定部が決定した前記強制sleep開始タイミングと前記sleep時間をもとに、前記物理コアを遷移すべきコアc-stateを決定し、当該物理コアに含まれる各論理コアを対応するc-stateに遷移させるとともに、前記コアc-stateからの起床時間を考慮して処理期限前に事前起床させるアイドル状態決定部を備える
     ことを特徴とする請求項4に記載の休止状態制御装置。
  6.  CPU使用率を含む処理種別ごとの処理量を算出し、処理量の大きさが所定範囲にある処理同士は類似する処理種別と判断して、当該処理種別の処理を同一物理コア上の論理コアに配置するコア割当決定部を備える
     ことを特徴とする請求項1に記載の休止状態制御装置。
  7.  CPUの同時マルチスレッディングを用いて、論理的にCPUコアを増加させ、論理コアにデータ処理スレッドを割当ててデータ処理を並列実行するデータ処理システムの休止状態制御装置の休止状態制御方法であって、
     前記休止状態制御装置は、
     前記データ処理スレッドよりも高優先度で動作する休止スレッドを用いて、休止命令の実行タイミングおよび休止期間を指示する休止スレッド制御部と、を有し、
     前記休止スレッド制御部は、同一の物理コアに対応する論理コアに対して同じタイミングでかつ、同じ時間幅の休止を強制させる命令である前記休止スレッドを実行し、同一物理コア上の前記論理コアを全て休止させる
     ことを特徴とする休止状態制御方法。
  8.  コンピュータを、請求項1乃至6のいずれか一項に記載の休止状態制御装置として機能させるためのプログラム。
PCT/JP2024/014714 2024-04-11 2024-04-11 休止状態制御装置、休止状態制御方法およびプログラム Pending WO2025215802A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2024/014714 WO2025215802A1 (ja) 2024-04-11 2024-04-11 休止状態制御装置、休止状態制御方法およびプログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2024/014714 WO2025215802A1 (ja) 2024-04-11 2024-04-11 休止状態制御装置、休止状態制御方法およびプログラム

Publications (1)

Publication Number Publication Date
WO2025215802A1 true WO2025215802A1 (ja) 2025-10-16

Family

ID=97350517

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2024/014714 Pending WO2025215802A1 (ja) 2024-04-11 2024-04-11 休止状態制御装置、休止状態制御方法およびプログラム

Country Status (1)

Country Link
WO (1) WO2025215802A1 (ja)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001255981A (ja) * 2000-03-10 2001-09-21 Toshiba Corp コンピュータシステム、このコンピュータシステムに用いられる入力装置、コンピュータ、省電力制御方法及び記録媒体
JP2001521219A (ja) * 1997-10-23 2001-11-06 インターナショナル・ビジネス・マシーンズ・コーポレーション マルチスレッド式プロセッサでのスレッド優先順位の変更
WO2008155806A1 (ja) * 2007-06-20 2008-12-24 Fujitsu Limited バリア同期方法、装置、及びマルチコアプロセッサ
JP2011505752A (ja) * 2007-11-29 2011-02-24 エイ10 ネットワークス インコーポレイテッド 分散多重処理セキュリティゲートウエイのためのシステム及び方法
JP2012141864A (ja) * 2011-01-05 2012-07-26 Hitachi Ltd Smtプロセッサにおけるプロセッサ使用率の算出方法
JP2014225242A (ja) * 2013-03-15 2014-12-04 インテル・コーポレーション 異種システムをブートし、コアの対称的なビューを表示する方法
JP2015210813A (ja) * 2014-04-24 2015-11-24 富士通株式会社 同期方法

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001521219A (ja) * 1997-10-23 2001-11-06 インターナショナル・ビジネス・マシーンズ・コーポレーション マルチスレッド式プロセッサでのスレッド優先順位の変更
JP2001255981A (ja) * 2000-03-10 2001-09-21 Toshiba Corp コンピュータシステム、このコンピュータシステムに用いられる入力装置、コンピュータ、省電力制御方法及び記録媒体
WO2008155806A1 (ja) * 2007-06-20 2008-12-24 Fujitsu Limited バリア同期方法、装置、及びマルチコアプロセッサ
JP2011505752A (ja) * 2007-11-29 2011-02-24 エイ10 ネットワークス インコーポレイテッド 分散多重処理セキュリティゲートウエイのためのシステム及び方法
JP2012141864A (ja) * 2011-01-05 2012-07-26 Hitachi Ltd Smtプロセッサにおけるプロセッサ使用率の算出方法
JP2014225242A (ja) * 2013-03-15 2014-12-04 インテル・コーポレーション 異種システムをブートし、コアの対称的なビューを表示する方法
JP2015210813A (ja) * 2014-04-24 2015-11-24 富士通株式会社 同期方法

Similar Documents

Publication Publication Date Title
JP5885920B2 (ja) 仮想cpuベースの、周波数、及び電圧制御
JP6060445B2 (ja) レイテンシガイダンスに基づくプラットフォームのパワーマネジメント
US6986068B2 (en) Arithmetic processing system and arithmetic processing control method, task management system and task management method
US20130074085A1 (en) System and method for controlling central processing unit power with guaranteed transient deadlines
JP5312478B2 (ja) データ・プロセッサのパフォーマンス予測
EP2550576B1 (en) Reducing power consumption by masking a process from a processor performance management system
US9128705B2 (en) System and method for controlling central processing unit power with reduced frequency oscillations
CN109906437B (zh) 基于线程重要性的处理器核停止和频率选择
CN107533479B (zh) 功率知晓调度和功率管理器
US8744831B2 (en) Simulation apparatus, simulation method and recording medium for recording simulation program
CN104969142A (zh) 用于以有保证的瞬态最后期限来控制中央处理单元功率的系统和方法
JP4553307B2 (ja) 情報処理装置、制御方法、及びプログラム
JP2005527906A (ja) 分離式電源管理状態を提供する方法および装置
WO2000077599A1 (en) Information processing system, information processing method, method and apparatus for task assignment, and medium storing program
CN104756043B (zh) 用于以有保证的瞬态最后期限来控制中央处理单元功率的系统和方法
Kim et al. An event-driven power management scheme for mobile consumer electronics
WO2024166168A1 (ja) CPU idle機能制御装置、サーバ内演算システム、CPU idle機能制御方法およびプログラム
CN119522407A (zh) 任务调度装置、计算系统、任务调度方法以及程序
JP6928263B2 (ja) 情報処理装置、計算機制御方法、および計算機制御プログラム
Feller et al. State of the art of power saving in clusters and results from the EDF case study
CN118860119A (zh) 一种处理器的控制方法、装置及电子设备
KR101087429B1 (ko) 전력 관리 방법 및 장치
US12632287B2 (en) Dynamic interrupt steering and processor unit idle state demotion
KR101075949B1 (ko) 모바일 내장형 시스템을 위한 전력 관리 시스템 및 그 방법
CN118819270A (zh) 一种信息处理方法、装置、设备及可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24934991

Country of ref document: EP

Kind code of ref document: A1