Pawel Dziepak
ede552ab25
scheduler: Keep thread effective priority cached
2013-12-23 22:06:33 +01:00
Pawel Dziepak
b24ea642d7
scheduler: Encapsulate ThreadData fields
2013-12-23 21:32:21 +01:00
Pawel Dziepak
a08b40d408
scheduler: Encapsulate CPUEntry fields
2013-12-23 20:15:16 +01:00
Pawel Dziepak
e1e7235c60
scheduler: Encapsulate CoreEntry fields
2013-12-23 18:27:10 +01:00
Pawel Dziepak
3309bf33c7
kernel/util: Make MinMaxHeap::Peek*() const
2013-12-23 03:52:13 +01:00
Pawel Dziepak
5a69ffc01e
scheduler: Remove RunQueue::PeekSecondMaximum()
2013-12-23 03:51:02 +01:00
Pawel Dziepak
60e198f2cb
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.
2013-12-23 00:56:44 +01:00
Pawel Dziepak
cf21c40b50
x86: Fix style
...
Thanks Axel.
2013-12-23 00:09:03 +01:00
Pawel Dziepak
b89b5d3826
x86: Make arch/smp.h a C++ only header
2013-12-20 22:05:26 +01:00
Pawel Dziepak
9116eec24c
scheduler: Allow calling UpdatePriority() for disabled CPU
2013-12-20 05:40:59 +01:00
Pawel Dziepak
b4552fcf9b
x86: Remove debug message
2013-12-20 05:40:59 +01:00
Pawel Dziepak
73363f8dde
kernel/vm: Fix unsigned/signed comparison warning
2013-12-20 05:40:59 +01:00
Pawel Dziepak
c08ed2db65
scheduler: Try to keep thread on the same logical CPU
...
Some SMT implementations (e.g. recent AMD microarchitectures) have
separate L1d cache for each SMT thread (which AMD decides to call "cores").
This means that we shouldn't move threads to another logical processor too
often even if it belongs to the same core. We aren't very strict about
this as it would complicate load balancing, but we try to reduce unnecessary
migrations.
2013-12-20 03:36:01 +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
caf1b0dffb
intel_cstates: Computing C-state requires constant time step
2013-12-19 20:47:22 +01:00
Pawel Dziepak
3add52e8ba
kernel: Fix topology node count being decreased twice per node
2013-12-19 20:24:34 +01:00
Pawel Dziepak
e3d001ff02
x86: Implement multicast ICIs
2013-12-19 19:35:44 +01:00
Pawel Dziepak
5a7289d720
scheduler: Fix unassigning threads from core being disabled
2013-12-18 00:03:56 +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
b2504f3b56
drivers/graphics: Remove log_{coll, dump}
...
log_coll.c and log_dump.{c, h} don't appear to be used by anything.
2013-12-13 02:44:29 +01:00
Pawel Dziepak
e397276460
apps/BSnow: Do not use cpu_clock_speed
2013-12-13 02:38:35 +01:00
Pawel Dziepak
25feff2c29
ProcessController: Explicitly check thread priority
2013-12-12 21:46:48 +01:00
Pawel Dziepak
8cf2f36c37
libroot: Fix Hoard when the CPU count is not a power of two
2013-12-12 21:14:25 +01:00
Pawel Dziepak
82727571c3
libroot: Fix uninitialized counter in mutex_lock()
2013-12-12 04:00:56 +01:00
Pawel Dziepak
53aac05ee5
libroot: Add prototypes for __{get,set}_scheduler_mode
2013-12-12 03:56:33 +01:00
Pawel Dziepak
39f6ced055
bin/top: Remove busy_wait_time
2013-12-12 03:18:47 +01:00
Pawel Dziepak
4c125ccacd
kits/media: CPU clock speed may vary significantly
2013-12-12 03:00:18 +01:00
Pawel Dziepak
fa15750925
kernel/cpu: Do not use get_system_info() to identify CPU
2013-12-12 02:53:18 +01:00
Pawel Dziepak
02749e2429
x86/paging: Do not use array placement new
...
Array placement new has implementation defined memory overhead what
makes it pretty useless.
2013-12-11 01:59:31 +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
f6b71d5518
libroot/malloc: Do not use B_MAX_CPU_COUNT
2013-12-06 21:05:05 +01:00
Pawel Dziepak
3106f832a9
kernel/smp: Fix warning
2013-12-06 19:57:04 +01:00
Pawel Dziepak
e6ea745e81
kernel: Use SMP_MAX_CPUS instead of B_MAX_CPU_COUNT
2013-12-06 19:53:56 +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
e052b3e630
x86/paging: Remove unusued local variable
2013-12-06 03:11:42 +01:00
Pawel Dziepak
5c7f09c4d7
kernel/util: Bitmap: Silence warning
2013-12-06 03:10:50 +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
5f3798921f
x86/paging: Use ROUNUP() to compute the number of initial slots
2013-12-05 23:33:03 +01:00