-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
93 lines (85 loc) · 5.53 KB
/
TODO
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Reaperfish TODO's
~~~~~~~~~~~~~~~~~
Bugs/TODO's
-----------
- merge with reaperfish-cilium branch (pick histogram stuff etc.)
- BPF might miss some IOs coming from merge requests, see biosnoop.bpf.c: BPF_KPROBE(blk_account_io_merge_bio
maybe add to trace_req_start()
- try BPF code with -Wall and remove warnings
- Fix golang printf mess with my own wrapper
- make BPF lookup dir use absolute path and look for it in same dir as golang executable
- color mode looks bad in konsole with non-default colors...
- CTRL-C is broken in lastes reaperfish-cilium branch
- histogram mode needs a completely new display routine
-> unify GetDropletData mit GetServiceData
- warum sehe ich reads nicht?
sudo dd if=/dev/sda of=/dev/zero
./reaper -major 8 -minor 0 -log-events
-> argh, missing complete event for bio... WTF
dd-11188 [002] ..... 7106.277703: block_bio_queue: 8,0 RA 126004424 + 256 [dd]
dd-11188 [002] ..... 7106.277704: block_getrq: 8,0 RA 126004424 + 256 [dd]
dd-11188 [002] ..... 7106.277704: block_plug: [dd]
dd-11188 [002] ..... 7106.277704: block_unplug: [dd] 1
dd-11188 [002] ...1. 7106.277704: block_rq_insert: 8,0 RA 131072 () 126004424 + 256 [dd]
dd-11188 [002] ...1. 7106.277704: block_rq_issue: 8,0 RA 131072 () 126004424 + 256 [dd]
<idle>-0 [002] ..s1. 7106.278076: block_rq_complete: 8,0 RA () 126004168 + 256 [0]
dd-11188 [002] ..... 7106.278171: block_bio_queue: 8,0 RA 126004680 + 256 [dd]
dd-11188 [002] ..... 7106.278172: block_getrq: 8,0 RA 126004680 + 256 [dd]
dd-11188 [002] ..... 7106.278172: block_plug: [dd]
dd-11188 [002] ..... 7106.278172: block_unplug: [dd] 1
dd-11188 [002] ...1. 7106.278172: block_rq_insert: 8,0 RA 131072 () 126004680 + 256 [dd]
dd-11188 [002] ...1. 7106.278172: block_rq_issue: 8,0 RA 131072 () 126004680 + 256 [dd]
<idle>-0 [002] ..s1. 7106.278547: block_rq_complete: 8,0 RA () 126004424 + 256 [0]
- multi-kernel support:
-> re-compile BPF on load, requires full build tools on target, so need a way to avoid this!
-> merken, fuer welchen Kern BPF object compiliert wurde!
- cilium asm builtin BPF code verstehen, vielleicht ist das einfacher zu benutzen??? (und hat neue bugs...)
-> koennte TP progs von golang aus fuer verschiedene TP sigs generieren!
- avoid BPF Makefile re-compile every time, .c timestamp geht nicht?
- rename optBPFHist (after downgrade of log events mode)
- Call GetDropletIDs only per new detected VM
- get total/HV number als from BPF (to make it consistent (after fixing the bugs)) and remove cgroup code
- improve process names, /proc/pid/stat instead of BPF shows firefox instead of glean.dispatche
- run log and see if we catch all relevant IO
- kernel struct flavors not working:
36: (15) if r1 == 0x0 goto pc+103
R0=inv(id=0) R1_w=inv(id=0) R6=ctx(id=0,off=0,imm=0) R7=inv(id=1) R8=map_value(id=0,off=0,ks=8,vs=8,imm=0) R10=fp0 fp-8=mmmmmmmm fp-16=mmmmmmmm fp-24=00000000 fp-32=00000000 fp-40=00000000 fp-48=00000000 fp-56=00000000 fp-64=00000000 fp-72=00000000 fp-80=00000000 fp-88_w=mmmmmmmm fp-96=00000000 fp-104=00000000 fp-112=00000000 fp-120=00000000 fp-128=00000000
; struct gendisk *disk = get_disk(bio);
37: (79) r3 = *(u64 *)(r10 -16)
; if (linux_kernel_version >= KERNEL_VERSION(5, 11, 0)) {
38: (18) r1 = 0xffff94c5a9793910
40: (61) r1 = *(u32 *)(r1 +0)
R0=inv(id=0) R1_w=map_value(id=0,off=0,ks=4,vs=4,imm=0) R3_w=inv(id=0) R6=ctx(id=0,off=0,imm=0) R7=inv(id=1) R8=map_value(id=0,off=0,ks=8,vs=8,imm=0) R10=fp0 fp-8=mmmmmmmm fp-16=mmmmmmmm fp-24=00000000 fp-32=00000000 fp-40=00000000 fp-48=00000000 fp-56=00000000 fp-64=00000000 fp-72=00000000 fp-80=00000000 fp-88_w=mmmmmmmm fp-96=00000000 fp-104=00000000 fp-112=00000000 fp-120=00000000 fp-128=00000000
41: (b7) r2 = 330496
; if (linux_kernel_version >= KERNEL_VERSION(5, 11, 0)) {
42: (2d) if r2 > r1 goto pc+9
from 42 to 52: R0=inv(id=0) R1=inv(id=0,umax_value=330495,var_off=(0x0; 0x7ffff)) R2=inv330496 R3=inv(id=0) R6=ctx(id=0,off=0,imm=0) R7=inv(id=1) R8=map_value(id=0,off=0,ks=8,vs=8,imm=0) R10=fp0 fp-8=mmmmmmmm fp-16=mmmmmmmm fp-24=00000000 fp-32=00000000 fp-40=00000000 fp-48=00000000 fp-56=00000000 fp-64=00000000 fp-72=00000000 fp-80=00000000 fp-88=mmmmmmmm fp-96=00000000 fp-104=00000000 fp-112=00000000 fp-120=00000000 fp-128=00000000
; bdev = BPF_CORE_READ(bio, bi_bdev);
52: (85) call unknown#195896080
invalid func unknown#195896080
processed 157 insns (limit 1000000) max_states_per_insn 0 total_states 11 peak_states 11 mark_read 8
Planned features
----------------
- ncurses / notcurses GUI
- different sort's like most BW
- histogram/percentiles and log mode
- document all build and run-time dependencies
- multiple devices support
- tracing requests
- tracing bio merges
- minimize golang dependecies or re-write golang in C ?
- fancy graphs
- switch to blk iocost for automatic throttling
BPF
---
- decide on minimal kernel version to support, 5.10+? focal?
- bi_disk is replaced by struct block_device *bi_bdev 309dca309fc39a9e3c31b916393b74bd174fd74e after 5.10
- block_bio_complete: error argument got removed, need to deal with both variants for 5.4
commit d24de76af836260a99ca2ba281a937bd5bc55591
block: remove the error argument to the block_bio_complete tracepoint
Long-term
---------
- QEMU tracing, attach bpf (like systemtap / uprobes) to qemu?
- Testing/Verification
Testsuite to verify measured values against fio probe
(more) plausibility checks at runtime (some are already in place)