xref: /aosp_15_r20/external/iproute2/tc/README.last (revision de1e4e894b0c224df933550f0afdecc354b238c4)
1*de1e4e89SAndroid Build Coastguard WorkerKernel code and interface.
2*de1e4e89SAndroid Build Coastguard Worker--------------------------
3*de1e4e89SAndroid Build Coastguard Worker
4*de1e4e89SAndroid Build Coastguard Worker* Compile time switches
5*de1e4e89SAndroid Build Coastguard Worker
6*de1e4e89SAndroid Build Coastguard WorkerThere is only one, but very important, compile time switch.
7*de1e4e89SAndroid Build Coastguard WorkerIt is not settable by "make config", but should be selected
8*de1e4e89SAndroid Build Coastguard Workermanually and after a bit of thinking in <include/net/pkt_sched.h>
9*de1e4e89SAndroid Build Coastguard Worker
10*de1e4e89SAndroid Build Coastguard WorkerPSCHED_CLOCK_SOURCE can take three values:
11*de1e4e89SAndroid Build Coastguard Worker
12*de1e4e89SAndroid Build Coastguard Worker	PSCHED_GETTIMEOFDAY
13*de1e4e89SAndroid Build Coastguard Worker	PSCHED_JIFFIES
14*de1e4e89SAndroid Build Coastguard Worker	PSCHED_CPU
15*de1e4e89SAndroid Build Coastguard Worker
16*de1e4e89SAndroid Build Coastguard Worker
17*de1e4e89SAndroid Build Coastguard Worker PSCHED_GETTIMEOFDAY
18*de1e4e89SAndroid Build Coastguard Worker
19*de1e4e89SAndroid Build Coastguard WorkerDefault setting is the most conservative PSCHED_GETTIMEOFDAY.
20*de1e4e89SAndroid Build Coastguard WorkerIt is very slow both because of weird slowness of do_gettimeofday()
21*de1e4e89SAndroid Build Coastguard Workerand because it forces code to use unnatural "timeval" format,
22*de1e4e89SAndroid Build Coastguard Workerwhere microseconds and seconds fields are separate.
23*de1e4e89SAndroid Build Coastguard WorkerBesides that, it will misbehave, when delays exceed 2 seconds
24*de1e4e89SAndroid Build Coastguard Worker(f.e. very slow links or classes bounded to small slice of bandwidth)
25*de1e4e89SAndroid Build Coastguard WorkerTo resume: as only you will get it working, select correct clock
26*de1e4e89SAndroid Build Coastguard Workersource and forget about PSCHED_GETTIMEOFDAY forever.
27*de1e4e89SAndroid Build Coastguard Worker
28*de1e4e89SAndroid Build Coastguard Worker
29*de1e4e89SAndroid Build Coastguard Worker PSCHED_JIFFIES
30*de1e4e89SAndroid Build Coastguard Worker
31*de1e4e89SAndroid Build Coastguard WorkerClock is derived from jiffies. On architectures with HZ=100
32*de1e4e89SAndroid Build Coastguard Workergranularity of this clock is not enough to make reasonable
33*de1e4e89SAndroid Build Coastguard Workerbindings to real time. However, taking into account Linux
34*de1e4e89SAndroid Build Coastguard Workerarchitecture problems, which force us to use artificial
35*de1e4e89SAndroid Build Coastguard Workerintegrated clock in any case, this switch is not so bad
36*de1e4e89SAndroid Build Coastguard Workerfor schduling even on high speed networks, though policing
37*de1e4e89SAndroid Build Coastguard Workeris not reliable.
38*de1e4e89SAndroid Build Coastguard Worker
39*de1e4e89SAndroid Build Coastguard Worker
40*de1e4e89SAndroid Build Coastguard Worker PSCHED_CPU
41*de1e4e89SAndroid Build Coastguard Worker
42*de1e4e89SAndroid Build Coastguard WorkerIt is available only for alpha and pentiums with correct
43*de1e4e89SAndroid Build Coastguard WorkerCPU timestamp. It is the fastest way, use it when it is available,
44*de1e4e89SAndroid Build Coastguard Workerbut remember: not all pentiums have this facility, and
45*de1e4e89SAndroid Build Coastguard Workera lot of them have clock, broken by APM etc. etc.
46