Move dsched to sys/kern/.
[dragonfly.git] / sys / kern / dsched / fq / flow.txt
1 O create process -> assign master proc struct + fqps for each disk present
2 O  create disk -> walk all master proc struct and add new fqp for new disk
3 O       -> also keep some list on what disks are associated to the scheduler
4   destroy disk -> walk all master proc struct and remove new fqp; cancel all bios
5         -> remove from global list of disks with this scheduler
6   zombie process -> cancel all reads in all fqps; push all writes in all fqps to disk
7 O new buf -> assign master proc struct using curthread/curproc
8 O queue -> find actual fqp in master proc struct of buf
9
10
11   master proc ref count:
12 O       + create process
13 O       + new buf
14         - zombie process
15         - queue
16
17   fqp ref count:
18 O       + queue
19 O       - completed
20
21   master proc list (kept globally):
22 O       + create process
23         - zombie process
24
25   fqp list (kept per proc):
26 O       + create disk (walk master list, create fqps)
27 O       + create process (one fqp per disk on create process)
28         - destroy disk (walk master list, destroy fqps)
29         - zombie process (destroy all fqps in master proc struct)
30
31
32 so how do we do buckets?
33 option 1)
34         - each process has a member pointing to a bucket
35         - bucket has also a list of all processes that are members
36         - per-disk list of buckets
37         - each bucket is allocated a proportional amount of total throughput
38         - each fqp in each bucket gets a fair share of the bucket's proportional amount
39         => so when do we instantiate them?
40                 -> each fq disk has a list of all buckets that exist
41                 -> but buckets are marked either active or inactive
42                         -> inactive buckets are skipped and not accounted for
43                            in bandwidth allocation.
44
45
46 if fqp has references and is in flight but disk is destroyed?
47         -> set to inactive
48         -> on completion see if it's cancelled (?)
49
50 subr_dsched:
51 stuff to iterate through disks with a particular scheduler
52
53
54 http://pcca.ath.cx/updatedb.php
55
56
57
58
59
60
61
62
63 ------------------------
64
65 calculate budget in respective thread
66 Andrew File System Benchmark
67 TPC-B database benchmark