- Feb 11, 2013
-
-
Avi Kivity authored
-
Avi Kivity authored
At present, a trivial algorithm is used: wake up once in a while, look for a less-loaded cpu, and push a waiting thread from this cpu to the other cpu. This is very simple wrt. locking, since the waiting thread is guaranteed not to be running, and to be on the runqueue of the load balancer thread.
-
Avi Kivity authored
Lost when remote wakeups were added.
-
Avi Kivity authored
While it is the default, we'll rely heavily on constant time size to compute the load (from remote processors, too). Document it to avoid having someone "optimize" it away.
-
Avi Kivity authored
This allows copying thread::attr objects around without leaking stacks.
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
Interferes with the scheduler
-
Avi Kivity authored
Without fairness, the concurrent alloc/free test fails quickly on smp, as the allocator thread hogs the allocator mutex and quickly exhausts all memory. While we could fix up the test to avoid this, fairness is a desirable quality, so implement it. We do so by adding and owner field, and having the unlocker transfer ownership of the locked mutex instead of freeing it and letting the waiter race with a newcomer. Also simplify the wait list to a singly linked list. There was some corruption with the original implementation, and rather than fix it, simplify it to a singly linked list which is all that is needed.
-
Avi Kivity authored
So it doesn't interfere with the scheduler
-
- Feb 10, 2013
-
-
Avi Kivity authored
Time might stop under some hosts without this fix.
-
Avi Kivity authored
-
- Feb 09, 2013
- Feb 07, 2013
-
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Dor Laor authored
-
Dor Laor authored
-
Dor Laor authored
-
Dor Laor authored
-
Dor Laor authored
* 'master' of github.com:cloudius-systems/osv: (41 commits) sched: default thread attributes sched: add new thread::attr object enable locking in libc apic clockevents: per-cpu setup sched: use cpu::init_on_cpu() libc/manifest update add a real wcsftime_l implementation add real implementation of locale-aware strto{f,d,ld} routines add floating support to *printf and *scanf enable stro* add the license for FreeBSDs realpath remove the unused old environ-related variables sched: per-cpu timer list remove an accidentally added file remove getenv debugging import a real realpath from FreeBSD add lstat() mutex: zero the mutex structure in mutex_init add a full getenv/putenv & friends implementation from musl sched: maintain a list of active thread timers ...
-
Avi Kivity authored
-
Avi Kivity authored
This makes it easier to create a thread with no special properties.
-
Dor Laor authored
Run 2 threads, one allocated mem, the other deletes the allocation.
-
Avi Kivity authored
This makes it easy to configure a thread with various parameters. The first is the existing stack_info parameter.
-
Dor Laor authored
pushing it into a dummy bio structure. In addition, expand the test some more
-
Dor Laor authored
-
Christoph Hellwig authored
-
Avi Kivity authored
The apic needs to be programmed on each cpu that is brought up.
-
Avi Kivity authored
We used cpu_arch::init_on_cpu() instead of the arch-indepdendent version.
-
Christoph Hellwig authored
-
Avi Kivity authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
Of course we don't actually support locales yet, so these are trivial wrappers.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Avi Kivity authored
Maintain the list of active timers per-cpu, instead of globally. This removes the need for locking (other than disabling preemption). The clock_event interface is awkward in that the callback is global, not per-cpu. This requires us to have a global dispatch object that then uses cpu::current() to pick up the current cpu and dispatch the event. We should probably make clock_event explicitly per-cpu in the future.
-