diff options
author | dzwdz | 2022-08-03 12:42:52 +0200 |
---|---|---|
committer | dzwdz | 2022-08-03 12:42:52 +0200 |
commit | d9da70c7c6230b9698dc4a1dbc4d7f05794d2740 (patch) | |
tree | afa28cfc7069f7649632f7b33daac47ee56d3819 /src/kernel/vfs/request.h | |
parent | 092f732b893c3ecc0f8cee6699ab21ea42ad10ff (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/vfs/request.h')
-rw-r--r-- | src/kernel/vfs/request.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/kernel/vfs/request.h b/src/kernel/vfs/request.h index cb560c9..ee33623 100644 --- a/src/kernel/vfs/request.h +++ b/src/kernel/vfs/request.h @@ -51,6 +51,8 @@ struct vfs_request { long offset; int flags; + /* if caller != NULL, owned by it - don't free, the allocation will be reused + * if caller == NULL, free on finish */ struct process *caller; struct vfs_backend *backend; |