Idle state estimation by scheduler
AssigneeRed Hat, Inc.
InventorMichael S. Tsirkin
Life of this patent
Estimating the term…
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.
Claims14
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.
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.
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.
Dependencies are inferred from the claim text.