summaryrefslogtreecommitdiff
path: root/src/kernel/proc.c
diff options
context:
space:
mode:
authordzwdz2024-07-12 00:12:06 +0200
committerdzwdz2024-07-12 00:12:06 +0200
commitded843efbdad1ed048fe42c50c8fb68d50bafa51 (patch)
treede6b59e3a8e62af367d91f35d2e70d9d54d51975 /src/kernel/proc.c
parented8ff1ff9c4c0f847ffc2ab4624bd999539a0890 (diff)
kernel: don't reuse VfsReq allocations for a single process
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
Diffstat (limited to 'src/kernel/proc.c')
-rw-r--r--src/kernel/proc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c
index fcb51c6..9a9a84f 100644
--- a/src/kernel/proc.c
+++ b/src/kernel/proc.c
@@ -223,10 +223,8 @@ void proc_kill(Proc *p, int ret) {
if (p->state == PS_WAITS4FS) {
assert(p->reqslot);
- p->reqslot->caller = NULL; /* transfer ownership */
+ p->reqslot->caller = NULL;
p->reqslot = NULL;
- } else if (p->reqslot) {
- kfree(p->reqslot);
}
if (p->state == PS_WAITS4PIPE) {