Commit 1d18b5c
Kent Overstreet
bcachefs: __bch2_read(): call trans_begin() on every loop iter
perusal of /sys/kernel/debug/bcachefs/*/btree_transaction_stats shows
that the read path has been acculumalating unneeded paths on the reflink
btree, which we don't want.
The solution is to call bch2_trans_begin(), which drops paths not used
on previous loop iteration.
bch2_readahead:
Max mem used: 0
Transaction duration:
count: 194235
since mount recent
duration of events
min: 150 ns
max: 9 ms
total: 838 ms
mean: 4 us 6 us
stddev: 34 us 7 us
time between events
min: 10 ns
max: 15 h
mean: 2 s 12 s
stddev: 2 s 3 ms
Maximum allocated btree paths (193):
path: idx 2 ref 0:0 P btree=extents l=0 pos 270943112:392:U32_MAX locks 0
path: idx 3 ref 1:0 S btree=extents l=0 pos 270943112:24578:U32_MAX locks 1
path: idx 4 ref 0:0 P btree=reflink l=0 pos 0:24773509:0 locks 0
path: idx 5 ref 0:0 P S btree=reflink l=0 pos 0:24773631:0 locks 1
path: idx 6 ref 0:0 P S btree=reflink l=0 pos 0:24773759:0 locks 1
path: idx 7 ref 0:0 P S btree=reflink l=0 pos 0:24773887:0 locks 1
path: idx 8 ref 0:0 P S btree=reflink l=0 pos 0:24774015:0 locks 1
path: idx 9 ref 0:0 P S btree=reflink l=0 pos 0:24774143:0 locks 1
path: idx 10 ref 0:0 P S btree=reflink l=0 pos 0:24774271:0 locks 1
<many more reflink paths>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>1 parent 114f530 commit 1d18b5c
1 file changed
+19
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1147 | 1147 | | |
1148 | 1148 | | |
1149 | 1149 | | |
1150 | | - | |
1151 | 1150 | | |
1152 | 1151 | | |
1153 | 1152 | | |
1154 | 1153 | | |
1155 | 1154 | | |
1156 | | - | |
1157 | | - | |
1158 | | - | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
1163 | | - | |
1164 | 1155 | | |
1165 | | - | |
| 1156 | + | |
1166 | 1157 | | |
| 1158 | + | |
1167 | 1159 | | |
1168 | 1160 | | |
1169 | 1161 | | |
1170 | 1162 | | |
1171 | | - | |
1172 | | - | |
1173 | | - | |
1174 | | - | |
1175 | | - | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
1176 | 1167 | | |
1177 | | - | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
1178 | 1171 | | |
1179 | 1172 | | |
1180 | 1173 | | |
1181 | 1174 | | |
1182 | 1175 | | |
1183 | 1176 | | |
1184 | 1177 | | |
1185 | | - | |
| 1178 | + | |
1186 | 1179 | | |
1187 | 1180 | | |
1188 | 1181 | | |
| |||
1193 | 1186 | | |
1194 | 1187 | | |
1195 | 1188 | | |
1196 | | - | |
| 1189 | + | |
1197 | 1190 | | |
1198 | 1191 | | |
1199 | 1192 | | |
| |||
1213 | 1206 | | |
1214 | 1207 | | |
1215 | 1208 | | |
1216 | | - | |
| 1209 | + | |
1217 | 1210 | | |
1218 | 1211 | | |
1219 | 1212 | | |
| |||
1223 | 1216 | | |
1224 | 1217 | | |
1225 | 1218 | | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
1226 | 1225 | | |
1227 | 1226 | | |
1228 | | - | |
1229 | | - | |
1230 | | - | |
1231 | | - | |
1232 | | - | |
1233 | | - | |
1234 | | - | |
1235 | 1227 | | |
| 1228 | + | |
1236 | 1229 | | |
1237 | 1230 | | |
1238 | 1231 | | |
| |||
0 commit comments