Age | Commit message (Collapse) | Author |
|
This will both let me save space in the allocation header, and make the
debugprint more readable.
|
|
The postqueue functions remain as-is, as that's a more "specialized" interface.
They're mostly wrappers around queue.h, though.
|
|
|
|
I'm still not sure if I should use sys/queue.h for this.
But yeah, this is more consistent, and it will also let me switch over to O(1)
insertions later on.
|
|
Keeping its old name for now to make things easier for myself.
This might just be replaced by sys/queue.h soon.
|
|
To use the same testing methodology as when I've introduced request slots:
before:
/ $ iostress 1 1000000 0 > /dev/vtty
run 0: 2585203
1000000 calls, 0 bytes. avg 2585203
after:
/ $ iostress 1 1000000 0 > /dev/vtty
run 0: 2783171
1000000 calls, 0 bytes. avg 2783171
This is around a 7.7% slowdown - that I hope to fix with a better malloc.
While this doesn't really make the code that much simpler, it doesn't feel
like the right approach in the first place
|
|
* I'm being more strict about the linked list state to hopefully ensure
I'm not leaking any references.
* vfsreq_create was renamed to vfsreq_dispatchcopy as that name feels more
clear. It copies its argument, and dispatches it.
* Requests for user backends are now handled more like requests for kernel
backends - there's an accept() function that accepts a request.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I've wanted to do this for a while, and since I've just had a relatively
large refactor commit (pcpy), this is as good of a time as any.
Typedefing structs was mostly inspired by Plan 9's coding style. It makes
some lines of code much shorter at basically no expense.
Everything related to userland kept old-style struct definitions, so as not
to force that style onto other people.
I also considered changing SCREAMING_ENUM_FIELDS to NicerLookingCamelcase,
but I didn't, just in case that'd be confusing.
|
|
|
|
|
|
|
|
doesn't really prevent anything, and makes it harder to test edge cases
|
|
|
|
The old name could have suggested that it held a response to a request
received by fs_wait. The new name is unfortunately very similar to
the `struct vfs_request` already used internally in the kernel, but
it's better at conveying that it contains a filesystem request yet to
be handled.
vfs_request - virtual filesystem request (a bad name in hindsight)
ufs_request - user filesystem request
|
|
|
|
* changed vfs_root_register's name because the _mount didn't add anything
* removed the old pointless vfs_backend_tryaccept calls from drivers
* because of that, i could remove the vfs_backend globals
* replaced the horrible BACKEND_KERN macro
* all vfs_backends are now stored on the heap
|
|
|
|
|
|
|
|
|
|
|
|
$ iostress 32 512 0 > /vtty # before
512 calls, 0 bytes. avg 121133
$ iostress 32 512 0 > /vtty # after
512 calls, 0 bytes. avg 103540
103540/121133 = ~85%
I think the tiny bit of added complexity is worth it here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Previously, file ids could only be positive integers, so their range
was 31 bits - not enough to represent the entire memory. Now, pointers
can be safely used as file ids.
|
|
|
|
this is big in terms of speed, it avoids a lot of unnecessary context
switches
|
|
|
|
|
|
|
|
|
|
|
|
thus they can opt out of doing that
so the calls which might return immediately but can return later don't
have to both regs_savereturn and return to the caller.
and because of that, the return values of a lot of VFS things have just
got way saner
|
|
|
|
|
|
|
|
...instead of letting the hwole process stay around.
This could end up a bit more complex, I have no idea how to test killing
processes during vfs requests.
The upside of this is that I can remove all the deathbed/deadparent
weirdness now.
|