History log of /haiku/src/system/kernel/scheduler/power_saving.cpp
Revision Date Author Comments
# 1bba129c 08-Apr-2014 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Let ThreadData::ShouldRebalance() choose the actual core

Currently, ThreadData::ShouldRebalance() (and mode specific functions
it calls) only decides whether to migrate thread to another core or not.
However, in most cases it actually needs to find the best candidate for
new core so it could as well return that information.


# 1700e825 05-Mar-2014 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Always protect gCore[High]LoadHeap with spinlock

Should fix #10628. If there is a race condition with a writer getting
minimum or maximum from double ended heap may incorrectly result NULL.
Which is not expected in the most of the thread migration logic. Apart
from that, because of the race condition heap state may be observed as
inconsistent thus failing assertions.
ended heap


# 093c2202 16-Jan-2014 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Improve latencies


# a2634874 08-Jan-2014 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Estimate the load thread is able to produce

Previous implementation based on the actual load of each core and share
each thread has in that load turned up to be very problematic when
balancing load on very heavily loaded systems (i.e. more threads
consuming all available CPU time than there is logical CPUs).

The new approach is to estimate how much load would a thread produce
if it had all CPU time only for itself. Summing such load estimations
of each thread assigned to a given core we get a rank that contains
much more information than just simple actual core load.


# 9c465cc8 07-Jan-2014 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Improve recognition of CPU bound threads


# c37c2aa4 06-Jan-2014 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Improve should_rebalance


# 2d52abbd 30-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Inherit penalty and core from creator thread


# ef8e55a1 28-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Use single ended heap for CPU heap


# 96dcc73b 26-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Add scheduler profiler

A bit hackish implementation of a profiler for the scheduler.
SCHEDULER_ENTER_FUNCTION at the begining of each function aren't nice and
usage of __PRETTY_FUNCTION__ isn't any better (both gcc and clang support
it though), but it was quick to implement and doesn't lose information
on inlined functions. It's just a tool, not an integral part of the kernal
anyway.


# b24ea642 23-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Encapsulate ThreadData fields


# a08b40d4 23-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Encapsulate CPUEntry fields


# e1e7235c 23-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Encapsulate CoreEntry fields


# 60e198f2 22-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Encapsulate PackageEntry fields

Apart from the refactoring this commit takes the opportunity and removes
unnecessary read locks when choosing a package and a core from idle lists.
The data structures are accessed in a thread safe way and it does not really
matter whether the obtained data becomes outdated just when we release the
lock or during our search for the appropriate package/core.


# d287274d 05-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Code refactoring


# 07218997 28-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Allow mode to specify time slice length


# f9ee217a 28-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Migrate threads less often in power saving mode


# 87115715 26-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Protect package data with rw_spinlock


# 13a89839 24-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Fix power saving mode and other minor improvements


# 1a7eb502 21-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Calculate correct load on SMT processors


# 65741c8b 21-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Improve locking


# 683b9bbf 20-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Improve power saving mode, part 2

Consequences of committing & pushing too quickly...


# ecfd4449 20-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Improve power saving mode

* Remove possibility to temporarily disable small task packing.
* When small task packing target gets overloaded continue packing
threads on another core, but avoid migrating the already packed
ones.

Scheduler still tends to needlessly migrate threads to another cores
when under heavier load, but it is now much better than before.


# c4ac37a3 20-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Try to pack IRQs in power saving mode


# 9c2e74da 20-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Move mode specific logic to separate files


# 1bba129c56656a5c140fc8d1202ae1cac761d49b 08-Apr-2014 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Let ThreadData::ShouldRebalance() choose the actual core

Currently, ThreadData::ShouldRebalance() (and mode specific functions
it calls) only decides whether to migrate thread to another core or not.
However, in most cases it actually needs to find the best candidate for
new core so it could as well return that information.


# 1700e825b1249917f478aca067bf7b84c3642fa3 05-Mar-2014 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Always protect gCore[High]LoadHeap with spinlock

Should fix #10628. If there is a race condition with a writer getting
minimum or maximum from double ended heap may incorrectly result NULL.
Which is not expected in the most of the thread migration logic. Apart
from that, because of the race condition heap state may be observed as
inconsistent thus failing assertions.
ended heap


# 093c2202675b2ef2c9a76dec558fe6ed4a5e6f17 16-Jan-2014 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Improve latencies


# a2634874ed5e33a36fe83c272614e2042fafde1d 08-Jan-2014 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Estimate the load thread is able to produce

Previous implementation based on the actual load of each core and share
each thread has in that load turned up to be very problematic when
balancing load on very heavily loaded systems (i.e. more threads
consuming all available CPU time than there is logical CPUs).

The new approach is to estimate how much load would a thread produce
if it had all CPU time only for itself. Summing such load estimations
of each thread assigned to a given core we get a rank that contains
much more information than just simple actual core load.


# 9c465cc83bbd40732475db43bd870221b99bdbb7 07-Jan-2014 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Improve recognition of CPU bound threads


# c37c2aa45fd02af0fa4941751bdabf5cbcc664d6 06-Jan-2014 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Improve should_rebalance


# 2d52abbd5d279c622982b8cae1f38d51bf73c2d2 30-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Inherit penalty and core from creator thread


# ef8e55a1d09185c714afac7b5d00f28064af3428 28-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Use single ended heap for CPU heap


# 96dcc73b39cc68a59c276a35690f8af1886214ef 26-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Add scheduler profiler

A bit hackish implementation of a profiler for the scheduler.
SCHEDULER_ENTER_FUNCTION at the begining of each function aren't nice and
usage of __PRETTY_FUNCTION__ isn't any better (both gcc and clang support
it though), but it was quick to implement and doesn't lose information
on inlined functions. It's just a tool, not an integral part of the kernal
anyway.


# b24ea642d759ad6e6b30007cb112b3cdfad35204 23-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Encapsulate ThreadData fields


# a08b40d4087b35c586959dc7da44035171d4cf15 23-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Encapsulate CPUEntry fields


# e1e7235c60d942d4fd58ac7caedf4a9715efcc7a 23-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Encapsulate CoreEntry fields


# 60e198f2cbf2e26b584370c0d32c37cb3dce556c 22-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Encapsulate PackageEntry fields

Apart from the refactoring this commit takes the opportunity and removes
unnecessary read locks when choosing a package and a core from idle lists.
The data structures are accessed in a thread safe way and it does not really
matter whether the obtained data becomes outdated just when we release the
lock or during our search for the appropriate package/core.


# d287274dcec634da4973a1b92c97dd14d7c5ecd0 05-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Code refactoring


# 072189970913d3cce35c34b4307b5e58b0f241b5 28-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Allow mode to specify time slice length


# f9ee217ad6c59122fefd39a445c99f2c0fb2af1e 28-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Migrate threads less often in power saving mode


# 87115715b40c394b08de08b6709863eb257b020d 26-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Protect package data with rw_spinlock


# 13a89839fc09fea7d328568ddb76d8369ce2839d 24-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Fix power saving mode and other minor improvements


# 1a7eb50254e1cee8160de17253aa6972c3d960cf 21-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Calculate correct load on SMT processors


# 65741c8b56b2fc74e8e1cd419b92f799e75f556d 21-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Improve locking


# 683b9bbf07cd85105ca1ab9e926f140d6e78b7fc 20-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Improve power saving mode, part 2

Consequences of committing & pushing too quickly...


# ecfd44493554c78001bbe001d35637b7eab0ffb6 20-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Improve power saving mode

* Remove possibility to temporarily disable small task packing.
* When small task packing target gets overloaded continue packing
threads on another core, but avoid migrating the already packed
ones.

Scheduler still tends to needlessly migrate threads to another cores
when under heavier load, but it is now much better than before.


# c4ac37a35e449a07393867fed7278f377cca8dbf 20-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Try to pack IRQs in power saving mode


# 9c2e74da043b32ecd64a0ec4f4917f83ac6cc10f 20-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

scheduler: Move mode specific logic to separate files