History log of /haiku/src/system/kernel/cpu.cpp
Revision Date Author Comments
# 408a7e27 17-Mar-2023 X512 <danger_mail@list.ru>

kernel: implement clear_caches for riscv64

Change-Id: I28296725ce22b47e94481abf794b92cf4ffd98a5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6217
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 057fe191 01-Sep-2021 Augustin Cavalier <waddlesplash@gmail.com>

kernel: Break thread-related AutoLockers into a separate header.

Including thread.h brings a massive array of things with it from
the kernel thread arch headers, team and thread definitions,
hash tables, linked lists, Referenceable, etc. that the vast majority
of AutoLock.h consumers neither want nor need.

So, put these in a separate header, and adjust all consumers of these
lockers to include the new file.

This change exposes the fact that a lot of files were inadvertently
making use of headers included indirectly through thread.h. Those
will be fixed in the next commit.


# e632208b 10-Sep-2020 Jérôme Duval <jerome.duval@gmail.com>

kernel/scheduler: enable cpu load tracking after boot

when the cpufreq module is loaded, we let the scheduler update its policy.
Improve assert report
CoreEntry::GetLoad() could return more than kMaxLoad.

Change-Id: I127f9b3e8062b5996872aae30b4021b9904fa179
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3216
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 22fdfc44 10-Sep-2020 Jérôme Duval <jerome.duval@gmail.com>

kernel/cpu: add cpu_frequency()

implement on x86 with APERFMPERF.

Change-Id: Ia484854c76dee76c5447983de15800a25d791d39
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3213
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 05901d89 04-Jul-2019 Augustin Cavalier <waddlesplash@gmail.com>

kernel/cpu: Only root can enable or disable CPUs.


# 718d7149 10-Feb-2018 Jérôme Duval <jerome.duval@gmail.com>

white space cleanup


# b258298c 19-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Protect cpu_ent::active_time with sequential lock

atomic_{get, set}64() are problematic on architectures without 64 bit
compare and swap.
Also, using sequential lock instead of atomic access ensures that
any reads from cpu_ent::active_time won't require any writes to shared
memory.


# 1b06228f 17-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Propagate scheduler modes to cpu{freq, idle} modules


# 4fcbac58 17-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Make get_cpu_topology() return a pointer to const

The client code is not supposed to change the topology info.
It would be also nice if cpu_topology_node::children was an array of
pointers to const but that would require several const_casts in the
topology tree generation code so it's probably not worth it.


# 3e0e3be7 06-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

boot, kernel: Replace MAX_BOOT_CPUS with SMP_MAX_CPUS


# 7db89e8d 25-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Rework cpuidle module

* Create new interface for cpuidle modules (similar to the cpufreq
interface)
* Generic cpuidle module is no longer needed
* Fix and update Intel C-State module


# 1e8ed555 24-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

cpufreq: Rank modules and choose the best one


# 03f7d3d1 24-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Restore logical processor disabling


# d897a478 17-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Allow reassigning IRQs to logical processors


# 22d82482 29-Oct-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Add support and interface for cpufreq modules


# d6efe8ee 23-Oct-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Update cpu_ent::active_time atomically


# 343c4896 20-Oct-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Create CPU topology tree


# cf863a50 16-Oct-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Decide whether to use simple or affine scheduler

Simple scheduler is used when we do not have to worry about cache affinity
(i.e. single core with or without SMT, multicore with all cache levels
shared).

When we replace gSchedulerLock with more fine grained locking affine
scheduler should also be chosen when logical CPU count is high (regardless
of cache).


# 24df6592 11-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged signals-merge branch into trunk with the following changes:
* Reorganized the kernel locking related to threads and teams.
* We now discriminate correctly between process and thread signals. Signal
handlers have been moved to teams. Fixes #5679.
* Implemented real-time signal support, including signal queuing, SA_SIGINFO
support, sigqueue(), sigwaitinfo(), sigtimedwait(), waitid(), and the addition
of the real-time signal range. Closes #1935 and #2695.
* Gave SIGBUS a separate signal number. Fixes #6704.
* Implemented <time.h> clock and timer support, and fixed/completed alarm() and
[set]itimer(). Closes #5682.
* Implemented support for thread cancellation. Closes #5686.
* Moved send_signal() from <signal.h> to <OS.h>. Fixes #7554.
* Lots over smaller more or less related changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42116 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd185b41 01-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

*.c -> *.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34417 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b258298c70249e60ea7c65c60bd5ee1250609921 19-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Protect cpu_ent::active_time with sequential lock

atomic_{get, set}64() are problematic on architectures without 64 bit
compare and swap.
Also, using sequential lock instead of atomic access ensures that
any reads from cpu_ent::active_time won't require any writes to shared
memory.


# 1b06228f136128b8094c8a7d954815e29775cfe4 17-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Propagate scheduler modes to cpu{freq, idle} modules


# 4fcbac58de122ff3313cb0bfe9115314d28bf219 17-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Make get_cpu_topology() return a pointer to const

The client code is not supposed to change the topology info.
It would be also nice if cpu_topology_node::children was an array of
pointers to const but that would require several const_casts in the
topology tree generation code so it's probably not worth it.


# 3e0e3be7604ed12ab61b58789c44bc6d7333f48b 06-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

boot, kernel: Replace MAX_BOOT_CPUS with SMP_MAX_CPUS


# 7db89e8dc395db73368479fd9817b2b67899f3f6 25-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Rework cpuidle module

* Create new interface for cpuidle modules (similar to the cpufreq
interface)
* Generic cpuidle module is no longer needed
* Fix and update Intel C-State module


# 1e8ed5558dd69d1fbbd1578a2c5b2bfa321a5e35 24-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

cpufreq: Rank modules and choose the best one


# 03f7d3d1db10c0a467bea944fb3230ee70c6e015 24-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Restore logical processor disabling


# d897a478d7c01054aad29b23f7f545073c797530 17-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Allow reassigning IRQs to logical processors


# 22d824826747c96e7649b84ab5c837dfff27cf97 29-Oct-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Add support and interface for cpufreq modules


# d6efe8ee75c6efaf53c479c028f8e158e385ff2c 23-Oct-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Update cpu_ent::active_time atomically


# 343c4896892733387f1e1b1ed01f151107e7da5f 20-Oct-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Create CPU topology tree


# cf863a50401af89883ea314ccf54e16badd9439e 16-Oct-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Decide whether to use simple or affine scheduler

Simple scheduler is used when we do not have to worry about cache affinity
(i.e. single core with or without SMT, multicore with all cache levels
shared).

When we replace gSchedulerLock with more fine grained locking affine
scheduler should also be chosen when logical CPU count is high (regardless
of cache).


# 24df65921befcd0ad0c5c7866118f922da61cb96 11-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged signals-merge branch into trunk with the following changes:
* Reorganized the kernel locking related to threads and teams.
* We now discriminate correctly between process and thread signals. Signal
handlers have been moved to teams. Fixes #5679.
* Implemented real-time signal support, including signal queuing, SA_SIGINFO
support, sigqueue(), sigwaitinfo(), sigtimedwait(), waitid(), and the addition
of the real-time signal range. Closes #1935 and #2695.
* Gave SIGBUS a separate signal number. Fixes #6704.
* Implemented <time.h> clock and timer support, and fixed/completed alarm() and
[set]itimer(). Closes #5682.
* Implemented support for thread cancellation. Closes #5686.
* Moved send_signal() from <signal.h> to <OS.h>. Fixes #7554.
* Lots over smaller more or less related changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42116 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd185b4117e06c1674c4d214abc3917acedc560d 01-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

*.c -> *.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34417 a95241bf-73f2-0310-859d-f6bbb57e9c96