summaryrefslogtreecommitdiff
path: root/src/kernel/proc.h
diff options
context:
space:
mode:
authordzwdz2022-08-03 12:42:52 +0200
committerdzwdz2022-08-03 12:42:52 +0200
commitd9da70c7c6230b9698dc4a1dbc4d7f05794d2740 (patch)
treeafa28cfc7069f7649632f7b33daac47ee56d3819 /src/kernel/proc.h
parent092f732b893c3ecc0f8cee6699ab21ea42ad10ff (diff)
kernel: reuse a single allocation for all vfs_requests of a process
$ 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.
Diffstat (limited to 'src/kernel/proc.h')
-rw-r--r--src/kernel/proc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/proc.h b/src/kernel/proc.h
index c7e885a..d6f84bd 100644
--- a/src/kernel/proc.h
+++ b/src/kernel/proc.h
@@ -36,9 +36,6 @@ struct process {
union {
int death_msg; // PS_DEAD
struct {
- struct vfs_request *req;
- } waits4fs; // PS_WAITS4FS
- struct {
char __user *buf;
size_t max_len;
struct fs_wait_response __user *res;
@@ -52,6 +49,9 @@ struct process {
};
struct vfs_request *handled_req;
+ /* allocated once, the requests from WAITS4FS get stored here */
+ struct vfs_request *reqslot;
+
/* vfs_backend controlled (not exclusively) by this process */
struct vfs_backend *controlled;