| Age | Commit message (Collapse) | Author |
|
|
|
+ The system is now a bit simpler and hopefully easier to understand, while also
extending the shared memory to be 1:N, where there is one owner who
may become a zombie while waiting for the N to die.
|
|
+ Start out using big kernel lock, apparently seL4 thinks its good
enough. I might have a go at using a more fair lock, and possibly
moving to more fine-grained locks if I really feel the need to get
scalability up.
|
|
|
|
+ Took some fairly significant changes, for one the kernel is no longer
relocated at the start of a boot, instead it sits wherever the user
decides the kernel should sit. Similarly, the initial kernel stack and
page table are stored within the binary, slightly bloating the size
but making it much safer to boot since there's really no chance of us
overwriting the fdt or initrd in memory.
|
|
+ Compiling for size emits memcpy() calls after they've already been
removed by LTO, so add __used attribute to counteract this.
Newer versions of GCC seem to prefer `-flto=auto` to just `-flto`, so
use that.
printf format %d -> %ld
|
|
|
|
+ Allow threads to make themselves become orphants
|
|
+ Should write this down somewhere but the idea is that when a process
gets killed, it frees all the memory it can, making all threads within
that process orphans. Orphaned threads are assigned to the init
process, which will generally call exit() on each one. Zombie threads
are threads that own some bit of shared data, and whose reference
count is above zero. They may not be swapped to or called, even though
they take up space in thread map and reserve their thread ID.
|
|
|
|
+ Still largely untested, should really try to come up with a proper
testsuite, at the moment it's mostly me trying things out in the (as
of yet unreleased) kmx repo
|
|
+ Terminology is still a bit poor, and will still have to write
documentation + implement ipis properly
|
|
+ Largely inconsequential, but might make more sense for 32 bit
platforms
|
|
|
|
+ Sets the current core to sleep
|
|
|
|
+ The number of allowed threads running at the same time is limited to
num_tids, but each thread's ID can be any larger than that. This
should make ID reuse a lot more rare, and probably makes certain kinds
of time-of-check-to-time-of-use attacks more difficult
|
|
|
|
|
|
|
|
+ Gives a very slight improvement to RPC speeds, but mostly cleans up
code a little bit.
|
|
+ Fairly considerable speedup, as we don't have to look up the rpc pte
every time separately, instead cacheing them. Adds an architecture
specific limitation to total rpc stack size, though.
|
|
|
|
|
|
|
|
+ Found it in newlib. This allows the compiler to more effectively
optimize away unnecessary register operations. Applied to both kernel
and init.c for a slight speed increase.
I really should move init.c to some other repository though, the
binary files are starting to get annoying
|
|
+ Tests will have to come later
|
|
|
|
|
|
|
|
|
|
|
|
+ User can now specify debug, release and assert handling
|
|
+ Try to write arguments to memory as fast as possible to free up some
registers that the compiler can then play with.
Qemu runs ~1 700 000 rpc's per second, visionfive2 @1GHz (I think) ~800 000.
|
|
|
|
+ Make 8250 serial driver more generic
+ Still TODO: write a tutorial on how to boot on the visionfive2
|
|
|
|
+ Not bootable quite yet. Among other things, I couldn't
get the current starfive u-boot fork to boot, so
try adding support for booting with precompiled u-boot
via the `go` command. Initial testing with qemu shows that
this should be possible, and if it works, might be useful
in the (far) future with other slightly janky SBCs.
Also, NS16550 is 8250-based, and I'm really only using the base
8250, so rename and add visionfive 2 uart to list of compatibles.
Visionfive 2 is still completely untested.
|
|
+ Both kind of go hand in hand, made sense to do both at the same time.
Some parts feel slightly hacky, the loader works by placing everything
on the stack and avoiding global values. Still, seems to work?
|
|
|
|
|
|
|
|
+ Unlikely to ever run into billions of threads, and this keeps in line
with stuff like Linux. Also allows C to relatively painlessly
implement hashmaps of pids, if neccessary.
|
|
+ The new shared memory plan doesn't need it.
|
|
|
|
+ Now 10M alloc/frees succeed, which totals more memory than the virtual
machine has, so no too obvious leaks are occuring. For future
debugging speed, changed 10M to 1M.
+ Also quick fix to rpcs, stacks are now assigned. Not entirely sure why
they worked before this, but good that I found it.
|
|
|
|
|
|
|
|
|