Age | Commit message (Collapse) | Author |
|
Use standard errno codes. This change also adds strerror to string.h.
|
|
In order to avoid workarounds that check whether a module is ready or
not, break the initialization of some core modules into a bootstrap
step for basic BSP initialization, and a setup step that completes
initialization. Most users only need the bootstrap operation as a
dependency, especially since scheduling isn't enabled yet.
|
|
|
|
|
|
|
|
|
|
Make epoch management slightly faster by replacing the "cascading" of
queue0 into queue1 with queue flipping.
|
|
Track valid deltas in a list instead of walking the entire hash table.
|
|
|
|
Instead of using a mutex, disable preemption when accessing a delta cache,
but reenable it when flushing a cache to keep latencies low.
|
|
This reverts commit d18d0e85596f90e0bd597b33d58209d0b3973c95.
|
|
|
|
|
|
These new macros take care of disabling/restoring interrupts in the
appropriate order.
|
|
This makes sure symbols referenced by assert uses may not be generated
if unused. The recently introduced __unused macro is used to suppress
compiler warnings resulting from this change.
|
|
|
|
|
|
|
|
|
|
Move the page properties into the new x86/page module, and the virtual
memory layout macros into the x86/pmap module.
|
|
|
|
|
|
|
|
This turns assert.h into a standard header.
|
|
|
|
Make kernel code obtain definitions for the printf family of functions
through the inclusion of the standard stdio.h header.
|
|
The printk functions are close enough to the printf ones to bear the
same names.
|
|
Stick to a sequentially consistent model for most atomic operations as it
matches the semantics of the existing code. Each call site will have to be
reevaluated in order to switch to more relaxed accesses where possible.
|
|
Now that event counters have been replaced with system counters, drop
the convention of naming the counter as the event it tracks.
|
|
The syscnt module supports more generic counters, in addition to atomic
access from any context on any architecture.
|
|
|
|
|
|
Instead of mixing standard headers and internal redefinitions of standard
types, completely rely on the compiler for what is guaranteed for a free
standing environment. This results in the removal of kern/stddef.h and
kern/stdint.h. The kern/types.h header is reintroduced for the different
(and saner) purpose of defining types not specified in standard C,
namely ssize_t for now.
|
|
|
|
|
|
This macro is used to build kernel thread names.
|
|
This is mostly done for the machine-independent part.
|
|
This change was done using astyle, with a few manual editing here and
there.
|
|
|
|
|
|
There is a subtle error in the Refcache pseudocode :
flush():
evict all non-zero local cache entries and clear cache
update the current epoch
Here is a use case demonstrating the issue : take the sref_dirty_zeroes
test module on a machine with two processors. The test code makes
sure the counter is incremented before being decremented through the
use of a condition variable, which also guarantees strong memory
ordering, but these operations can occur on any processor. Flushes
can occur in any order.
EVENT DELTA/0 DELTA/1 GLOBAL
start 0 0 1
inc/0 1 1
dec/1 -1 1
flush/1 0 0
inc/1 1 0
dec/0 0 0
flush/0 0 0
end_of_epoch 0 <- first epoch
inc/0 1 0
dec/1 0 0
flush/1 0 0 <- flushing 0
inc/1 1 0
dec/0 0 0
flush/0 0 0 <- flushing 0
end_of_epoch 0 <- second epoch
Here, deltas are zero on both flushes during the second epoch, leading
the implementation to determine that the counter is a true zero. Fix
the error by unconditionally flushing valid deltas, even if zero,
and actually clearing the cache.
|
|
|
|
This module provides multiprocessor scalable reference counters, based
on Refcache, as described in the RadixVM paper.
|