From ded843efbdad1ed048fe42c50c8fb68d50bafa51 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 12 Jul 2024 00:12:06 +0200 Subject: 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 --- src/kernel/proc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/kernel/proc.h') diff --git a/src/kernel/proc.h b/src/kernel/proc.h index f4b6b97..99eac94 100644 --- a/src/kernel/proc.h +++ b/src/kernel/proc.h @@ -80,7 +80,7 @@ struct Proc { uint32_t localid; uint32_t nextlid; - /* allocated once, the requests from WAITS4FS get stored here */ + /* stores a request during WAITS4FS, NULL otherwise */ VfsReq *reqslot; /* vfs_backend controlled (not exclusively) by this process */ -- cgit v1.2.3