Age | Commit message (Collapse) | Author |
|
Each core on the CPU gets one idle thread so that it is always up to
something. To ensure these threads are not bouncing wildly between cores
and are always ready for their respective processor to take when they
have no threads to grab. We must call proc_pin() on each for every
processor.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit introduces support for pinning processes to specific cores
which can be useful for things like, keeping core-specific workthreads
running on their respective processors as well as mitigating very
specific cases of false-sharing and performance degradation caused by a
thread jumping between cores which requires cache-line entries to be thrashed
around between them. Threads pinned to a specific core will always see their
cached data in the same L1, L2, etc.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Deprecate SPAWN_WAIT in favor of waitpid()
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Add waitpid() in preparation of deprecating SPAWN_WAIT.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
It is a good idea to have a completely different stack during syscalls.
This commit implements a TSS IST entry for syscalls.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Certain operations dealing with context switches are better off being
implemented as machine dependent routines which allows us to be flexible
with what we can do, as well as the extra benefit of requiring less
workarounds to keep things MI.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Previously, our process counter was monotonic (wuh oh!). We want to be
sure that it decrements when a process exits.
- Rename nthreads to g_nthreads as a global
- Atomically increment on enter and decrement on exit
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- Add atomic_inc_64()
- Add atomic_dec_64()
- Add atomic_load_64()
- Add atomic_store_64()
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Allow finer control over which LEDs to toggle and how they should be
toggled.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Refer to share/docs/hw/et131x.txt
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Keep track of how many times an interrupt fires, this can be used for
interrupt statistics later on.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
The CPU family ID and model number are sometimes useful in order to
detect the presence of certain CPU features as well as detecting CPU
specific quirks.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Avoid using kprintf() during a system panic event as it relies on
internal locking that may hang the system preventing diagnostics from
being logged
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- Keep old sched_yield() logic as newer logic caused issues on QEMU
- TODO: Actually fix and test
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Ensure all file descriptors are freed and their respective vnodes
released.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
The purpose of yielding to the scheduler is to tell it you want to
preempt early in order to not starve processes while waiting for I/O. We
can trigger the timer earlier on for stability as a ~10 usec delay
should not be too terrible.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce a prototype cryptographically secure (?) random number generator.
The RNG uses ChaCha20 seeded with a SipHash-processed entropy pool. Entropy is
collected only at read time and is mixed into the internal pool before each
ChaCha20 reseed. The design is still experimental.
Signed-off-by: Alex Funo <frost@osmora.org>
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|