Pawel Dziepak
a47974dd06
scheduler: Use heap to determine highest priority thread
2013-12-29 19:24:01 +01:00
Pawel Dziepak
3309bf33c7
kernel/util: Make MinMaxHeap::Peek*() const
2013-12-23 03:52:13 +01:00
Pawel Dziepak
b89b5d3826
x86: Make arch/smp.h a C++ only header
2013-12-20 22:05:26 +01:00
Pawel Dziepak
b258298c70
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.
2013-12-20 01:31:32 +01:00
Pawel Dziepak
6639514437
x86[_64]: Support assigning MSI IRQs to arbitrary CPU
2013-12-20 01:07:08 +01:00
Pawel Dziepak
e3d001ff02
x86: Implement multicast ICIs
2013-12-19 19:35:44 +01:00
Pawel Dziepak
1b06228f13
kernel: Propagate scheduler modes to cpu{freq, idle} modules
2013-12-17 23:26:37 +01:00
Pawel Dziepak
4fcbac58de
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.
2013-12-17 22:08:18 +01:00
Pawel Dziepak
735f67481f
x86: Debugger can now use dr3
2013-12-17 04:31:29 +01:00
Pawel Dziepak
a5b070f1fa
x86: Store pointer to the current thread in gs:0
...
Apparently, reading from dr3 is slower than reading from memory
with cache hit.
Also, depending on hypervisor configuration, accessing dr3 may cause
a VM exit (and, at least on kvm, it does), what makes it much slower
than a memory access even when there is a cache miss.
2013-12-17 04:08:51 +01:00
Pawel Dziepak
611376fef7
x86: Let each CPU have its own GDT
2013-12-17 03:57:20 +01:00
Pawel Dziepak
7b9668170c
kernel, boot: Increase CPU limit to 64
2013-12-16 05:00:02 +01:00
Pawel Dziepak
d02aaee17e
kernel, libroot: Add more memory info in system_info
...
system_info now contains all information previously available only
through __get_system_info_etc(B_MEMORY_INFO, ...).
2013-12-16 04:53:46 +01:00
Pawel Dziepak
1bc7045fdf
kernel, libroot: Introduce new API for obtaining system info
2013-12-16 03:58:43 +01:00
Pawel Dziepak
3e0e3be760
boot, kernel: Replace MAX_BOOT_CPUS with SMP_MAX_CPUS
2013-12-06 19:43:08 +01:00
Pawel Dziepak
f0fe981769
kernel: Fix gcc2 build
2013-12-06 03:31:20 +01:00
Pawel Dziepak
2b04d8ab31
x86/paging: Use CPUSet instead of cpu_mask_t
2013-12-06 03:27:48 +01:00
Pawel Dziepak
7629d527c5
kernel: Use CPUSet in ICI code instead of cpu_mask_t
2013-12-06 03:08:39 +01:00
Pawel Dziepak
730882d615
kernel: Remove RunQueueLink.h
2013-12-05 23:28:42 +01:00
Pawel Dziepak
52b442a687
kernel: smp_cpu_rendezvous(): Use counter instead of bitmap
2013-12-05 23:10:04 +01:00
Pawel Dziepak
d287274dce
scheduler: Code refactoring
2013-12-05 22:47:30 +01:00
Pawel Dziepak
2b7ea4cddf
kernel: Remove Thread::next_state
2013-11-29 19:31:10 +01:00
Pawel Dziepak
673f08a995
kernel: Make thread_block_locked() private
2013-11-29 05:30:50 +01:00
Pawel Dziepak
7f8cf14b71
scheduler, kernel/util: Fix style issues
2013-11-29 04:51:38 +01:00
Pawel Dziepak
3514fd77f7
kernel: Reduce lock contention when processing ICIs
2013-11-29 03:36:44 +01:00
Pawel Dziepak
286b341a40
kernel: Merge two occurences of thread resume code
2013-11-28 14:03:57 +01:00
Pawel Dziepak
7db89e8dc3
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
2013-11-25 23:50:27 +01:00
Pawel Dziepak
0e94a12f8e
kernel: Make CACHE_LINE_ALIGN visible in the whole kernel
2013-11-25 00:35:15 +01:00
Pawel Dziepak
03f7d3d1db
kernel: Restore logical processor disabling
2013-11-24 22:51:07 +01:00
Pawel Dziepak
14e36af649
kernel[/util]: Fix debug builds
2013-11-21 03:24:54 +01:00
Pawel Dziepak
024541a4c8
kernel: Improve rw_spinlock implementation
...
* Add more debug checks
* Reduce the number of executed instructions that lock the bus.
2013-11-21 02:25:03 +01:00
Pawel Dziepak
308f594e2a
kernel, libroot: Make scheduler modes interface public
2013-11-20 23:32:40 +01:00
Pawel Dziepak
9c2e74da04
scheduler: Move mode specific logic to separate files
2013-11-20 09:46:59 +01:00
Pawel Dziepak
d897a478d7
kernel: Allow reassigning IRQs to logical processors
2013-11-18 04:55:25 +01:00
Pawel Dziepak
955c7edec2
kernel: Measure time spent in interrupt handlers
2013-11-18 01:50:37 +01:00
Pawel Dziepak
6a164daad4
kernel: Track load produced by interrupt handlers
2013-11-18 01:17:44 +01:00
Pawel Dziepak
288a2664a2
scheduler: Remove sSchedulerInternalLock
...
* pin idle threads to their specific CPUs
* allow scheduler to implement SMP_MSG_RESCHEDULE handler
* scheduler_set_thread_priority() reworked
* at reschedule: enqueue old thread after dequeueing the new one
2013-11-13 05:31:58 +01:00
Pawel Dziepak
829f836324
scheduler: Minor cleanup
2013-11-12 04:42:12 +01:00
Pawel Dziepak
03fb2d8868
kernel: Remove gSchedulerLock
...
* Thread::scheduler_lock protects thread state, priority, etc.
* sThreadCreationLock protects thread creation and removal and list of
threads in team.
* Team::signal_lock and Team::time_lock protect list of threads in team
as well.
* Scheduler uses its own internal locking.
2013-11-08 02:41:26 +01:00
Pawel Dziepak
72addc62e0
kernel: Introduce Thread::time_lock and Team::time_lock
2013-11-07 22:16:36 +01:00
Pawel Dziepak
3519eb334a
kernel: Change Thread::team_lock to rw_spinlock
2013-11-07 04:20:59 +01:00
Pawel Dziepak
defee266db
kernel: Add read write spinlock implementation
2013-11-07 04:20:32 +01:00
Pawel Dziepak
d3e5752b11
scheduler: Performance mode is actually low latency mode
2013-11-07 01:50:20 +01:00
Pawel Dziepak
83983eaf38
kernel: Remove Thread::alarm
2013-11-07 01:40:02 +01:00
Pawel Dziepak
aa4aca0264
kernel: Protect signal data with Team::signal_lock
2013-11-07 01:32:48 +01:00
Pawel Dziepak
73ad2473e7
Remove remaining unnecessary 'volatile' qualifiers
2013-11-06 00:03:07 +01:00
Pawel Dziepak
273f2f38cd
kernel: Improve spinlock implementation
...
atomic_or() and atomic_and() are not supported by x86 are need to be
emulated using CAS. Use atomic_get_and_set() and atomic_set() instead.
2013-11-05 22:47:18 +01:00
Pawel Dziepak
077c84eb27
kernel: atomic_*() functions rework
...
* No need for the atomically changed variables to be declared as
volatile.
* Drop support for atomically getting and setting unaligned data.
* Introduce atomic_get_and_set[64]() which works the same as
atomic_set[64]() used to. atomic_set[64]() does not return the
previous value anymore.
2013-11-05 22:32:59 +01:00
Pawel Dziepak
f4b088a992
kernel: Protect UserTimers with sUserTimerLock
2013-11-05 05:36:05 +01:00
Pawel Dziepak
4824f7630b
kernel: Add sequential lock implementation
2013-11-05 04:16:13 +01:00