summaryrefslogtreecommitdiff
path: root/sys-fs/bees/files/0001-HACK-crucible-Work-around-kernel-memory-fragmentatio.patch
blob: 0ceb5cbfc79ebed2ef3afb59a783ecac7702771f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 10c2006e627b5bda74f9f8aca1a574aa0e0e1eaa Mon Sep 17 00:00:00 2001
From: Kai Krakow <kai@kaishome.de>
Date: Sun, 9 Jul 2023 12:24:40 +0200
Subject: [PATCH] HACK: crucible: Work around kernel memory fragmentation

According to @Zygo:

> This will drastically reduce the number of reflinks bees can handle
> to a single extent, but that size is beyond more than enough for most
> filesystems. Making the buffer smaller may also reduce the size of
> vmallocs which might be aggravating the kernel's memory manager.

Link: https://github.com/Zygo/bees/issues/260#issuecomment-1627586574
Signed-off-by: Kai Krakow <kai@kaishome.de>
---
 include/crucible/fs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/crucible/fs.h b/include/crucible/fs.h
index 6d1780b..5da7da0 100644
--- a/include/crucible/fs.h
+++ b/include/crucible/fs.h
@@ -65,7 +65,7 @@ namespace crucible {
 	};
 
 	struct BtrfsIoctlLogicalInoArgs {
-		BtrfsIoctlLogicalInoArgs(uint64_t logical, size_t buf_size = 16 * 1024 * 1024);
+		BtrfsIoctlLogicalInoArgs(uint64_t logical, size_t buf_size = 64 * 1024);
 
 		uint64_t get_flags() const;
 		void set_flags(uint64_t new_flags);
-- 
2.39.3