IP Library Granted Patent US 11,455,024
Granted Patent B2
US 11,455,024 · App. 16/380,816 · Granted Sep 27, 2022

Idle state estimation by scheduler

Inventor: Michael S. Tsirkin (Lexington, MA)
Assignee: Red Hat, Inc.
G06F1/329G06F1/3228
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,455,024
App. No.
16/380,816
Granted
Sep 27, 2022
Kind
B2
Abstract

Systems and methods for improving idle time estimation by a process scheduler are disclosed. An example method comprises calculating, by a process scheduler operating in a kernel space of a computing system, an estimated idle time for a processing core, responsive to detecting a transition of the processing core from an idle state to an active state, recording, an actual idle time of the processing core, and making the estimated idle time and the actual idle time available to a user space process.

Claims (38)

1. A method comprising:

calculating, by a process scheduler operating in a kernel space of a computing system, an estimated idle time for a processing core based on a time degrading average of a plurality of previous actual idle times recorded;

responsive to detecting a transition of the processing core from an idle state to an active state, recording an actual idle time of the processing core;

communicating the estimated idle time and the actual idle time to a user space process;

receiving, from the user space process, an idle time estimation adjustment; and

calculating, in view of the idle time estimation adjustment, a second estimated idle time for the processing core by combining the idle estimation adjustment with an idle time value produced by the process scheduler.

2. The method of claim 1 , wherein the estimated idle time reflects an average idle time measured over a defined period of time.

3. The method of claim 1 , wherein the idle state is an ACPI idle state.

4. The method of claim 1 , wherein communicating the estimated idle time and the actual idle time to the user space process is performed in response to receiving a system call requesting the estimated idle time and the actual idle time.

5. The method of claim 1 , wherein communicating the estimated idle time and the actual idle time to the user space process comprises writing the estimated idle time and the actual idle time to a performance counter, wherein a performance counter monitor is to collect the estimated idle time and the actual idle time from the performance counter and store the estimated idle time and the actual idle time in memory accessible by the user space process.

6. A system comprising:

a memory; and

a processing device operatively coupled to the memory, the processing device to:

calculate, by a process scheduler operating in a kernel space of a computing system, a first estimated idle time for a processing core based on a first time degrading average of a plurality of previous actual idle times recorded;

responsive to detecting a first transition of the processing core from a first idle state to an active state, record, a first actual idle time of the processing core;

calculate, by the process scheduler, a second estimated idle time for a processing core;

responsive to detecting a second transition of the processing core from a second idle state to an active state, record, a second actual idle time of the processing core;

communicate the first and second estimated idle times and the first and second actual idle times to a user space process;

receive, from the user process, an idle time estimation adjustment; and

calculate, in view of the idle time estimation adjustment, a third estimated idle time for the processing core by combining the idle time estimation adjustment with a value produced by an idle time estimating function.

7. The system of claim 6 , wherein the idle time estimating function comprises a time degrading average of a plurality of previous actual idle times recorded over a defined period of time.

8. The system of claim 6 , further comprising:

calculate a first difference between the first estimated idle time and the first actual idle time;

calculate a second difference between the second estimated idle time and the second actual idle time; and

record, by the process scheduler, the first and second differences of the estimated idle times and the actual idle times.

9. The system of claim 6 , wherein making the first and second estimated idle times and the first and second actual idle times available to the user space process is in response to receiving a system call requesting access to the estimated idle times and the actual idle times.

10. The system of claim 6 , wherein the idle state is an ACPI idle state.

11. A non-transitory machine-readable storage medium including instructions that, when accessed by a processing device, cause the processing device to:

calculate, by a process scheduler operating in a kernel space of a computing system, an estimated idle time for a processing core;

responsive to detecting a transition of the processing core from an idle state to an active state, record, an actual idle time of the processing core;

calculate a first average of the estimated idle time and a plurality of previously estimated idle times within a defined period of time;

calculate a second average of the actual idle time and a plurality of previously recorded actual idle times within the defined period of time;

communicate the estimated idle time, the actual idle time, the first average and the second average to a user space process;

receive, from the user space process, an idle time adjustment; and

calculate, in view of the idle time estimation adjustment, a third estimated idle time for the processing core by combining the idle time estimation adjustment with a value produced by an idle time estimating function.

12. The non-transitory machine-readable storage medium of claim 11 , wherein the idle time estimating function comprises a time degrading average of a plurality of previous actual idle times recorded over a defined period of time.

13. The non-transitory machine-readable storage medium of claim 11 , wherein making the estimated idle time, the actual idle time, the first average and the second average available to the user space process is in response to receiving a system call requesting access to the estimated idle time, the actual idle time, the first average and the second average.

14. The non-transitory machine-readable storage medium of claim 11 , wherein the idle state is an ACPI idle state.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 10, 2019
From: TSIRKIN, MICHAEL S.
To: RED HAT, INC.
Reel/Frame 048851/0547 →
Continuity (1)
Related Publication 20200326766A1 · Oct 15, 2020