Pawel Dziepak
cb66faef24
scheduler: Work around GCC2 limitations in function inlining
...
GCC2 won't inline a function if it is used before its definition.
2014-01-06 01:22:53 +01:00
Pawel Dziepak
81e04d7b97
kernel: Remove cpu_info::load
...
This field forces kernel to track each CPU load all the time. It is not
a problem with the current scheduler on a multicore systems, but on
single core machnies or with any other future scheduler this field may
become just an unnecessary burden. It isn't difficult for an application
to compute CPU load by itself when it needs it.
2014-01-03 19:44:57 +01:00
Pawel Dziepak
135bb9c959
kernel: Do not attempt to interrupt a thread that is not waiting
2013-12-31 03:53:56 +01:00
Pawel Dziepak
15a7f2046a
kernel: Return CPU load in cpu_info
2013-12-29 22:47:06 +01:00
Pawel Dziepak
e46f284adc
kernel/util: MinMaxHeap: Fix unused variable warnings
2013-12-29 22:47:05 +01:00
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
ad6b9a1df8
scheduler: Use sequential locks instead of atomic 64 bit access
2013-12-20 02:18:44 +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
bcfdf88186
apps, kernel: Remove B_MAX_CPU_COUNT
2013-12-06 21:57:58 +01:00
Pawel Dziepak
fd96cf08a7
libroot: Remove _SC_NPROCESSORS_MAX and _SC_CPUID_MAX
...
_SC_NPROCESSORS_MAX and _SC_CPUID_MAX appear to be supported only by
Solaris. There isn't much point in exposing such values to the userland
anyway.
2013-12-06 21:54:07 +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
e736a456ba
kernel: Forbid implicit casts between spinlock and int32
2013-11-29 03:36:31 +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
1e8ed5558d
cpufreq: Rank modules and choose the best one
2013-11-25 00:08:13 +01:00
Pawel Dziepak
03f7d3d1db
kernel: Restore logical processor disabling
2013-11-24 22:51:07 +01:00
Pawel Dziepak
a04b7d9f96
power: Remove old cpufreq interface
2013-11-22 05:30:14 +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
7e1c4534df
libroot: Add adaptive mutex implementation
2013-11-08 03:37:30 +01:00