aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/arm/t6xx/kbase/docs/policy_operation_diagram.dot
blob: 17e13e53e64e6a7355c1973b84b0692a6312ed32 (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
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/*
 *
 * (C) COPYRIGHT 2010 ARM Limited. All rights reserved.
 *
 * This program is free software and is provided to you under the terms of the
 * GNU General Public License version 2 as published by the Free Software
 * Foundation, and any use by you of this program is subject to the terms
 * of such GNU licence.
 *
 * A copy of the licence is included with the program, and can also be obtained
 * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301, USA.
 *
 */



digraph policy_objects_diagram {
	rankdir=LR;
	size="12,8";
	compound=true;

	node [ shape = box ];

	subgraph cluster_policy_queues {
		low_queue [ shape=record label = "LowP | {<ql>ctx_lo | ... | <qm>ctx_i | ... | <qr>ctx_hi}" ];
		queues_middle_sep [ label="" shape=plaintext width=0 height=0 ];

		rt_queue [ shape=record label = "RT | {<ql>ctx_lo | ... | <qm>ctx_j | ... | <qr>ctx_hi}" ];

		label = "Policy's Queue(s)";
	}

	call_enqueue [ shape=plaintext label="enqueue_ctx()" ];

	{
		rank=same;
		ordering=out;
		call_dequeue [ shape=plaintext label="dequeue_head_ctx()\n+ runpool_add_ctx()" ];
		call_ctxfinish [ shape=plaintext label="runpool_remove_ctx()" ];

		call_ctxdone [ shape=plaintext label="don't requeue;\n/* ctx has no more jobs */" ];
	}

	subgraph cluster_runpool {

		as0 [ width=2 height = 0.25 label="AS0: Job_1, ..., Job_n" ];
		as1 [ width=2 height = 0.25 label="AS1: Job_1, ..., Job_m" ];
		as2 [ width=2 height = 0.25 label="AS2: Job_1, ..., Job_p" ];
		as3 [ width=2 height = 0.25 label="AS3: Job_1, ..., Job_q" ];

		label = "Policy's Run Pool";
	}

	{
		rank=same;
		call_jdequeue [ shape=plaintext label="dequeue_job()" ];
		sstop_dotfixup [ shape=plaintext label="" width=0 height=0 ];
	}

	{
		rank=same;
		ordering=out;
		sstop [ shape=ellipse label="SS-Timer expires" ]
		jobslots [ shape=record label="Jobslots: | <0>js[0] | <1>js[1] | <2>js[2]" ];

		irq [ label="IRQ" shape=ellipse ];

		job_finish [ shape=plaintext label="don't requeue;\n/* job done */" ];
	}

	hstop [ shape=ellipse label="HS-Timer expires" ]

	/*
	 * Edges
	 */

	call_enqueue -> queues_middle_sep [ lhead=cluster_policy_queues ];

	low_queue:qr -> call_dequeue:w;
	rt_queue:qr -> call_dequeue:w;

	call_dequeue -> as1 [lhead=cluster_runpool];

	as1->call_jdequeue         [ltail=cluster_runpool];
	call_jdequeue->jobslots:0;
	call_jdequeue->sstop_dotfixup [ arrowhead=none];
	sstop_dotfixup->sstop      [label="Spawn SS-Timer"];
	sstop->jobslots            [label="SoftStop"];
	sstop->hstop               [label="Spawn HS-Timer"];
	hstop->jobslots:ne            [label="HardStop"];


	as3->call_ctxfinish:ne [ ltail=cluster_runpool ];
	call_ctxfinish:sw->rt_queue:qm [ lhead=cluster_policy_queues label="enqueue_ctx()\n/* ctx still has jobs */" ];

	call_ctxfinish->call_ctxdone [constraint=false];

	call_ctxdone->call_enqueue [weight=0.1 labeldistance=20.0 labelangle=0.0 taillabel="Job submitted to the ctx" style=dotted constraint=false];


	{
	jobslots->irq   [constraint=false];

	irq->job_finish [constraint=false];
	}

	irq->as2  [lhead=cluster_runpool label="requeue_job()\n/* timeslice expired */" ];

}