Skip to content
This repository
Newer
Older
100644 427 lines (369 sloc) 12.251 kb
3ddab5ef »
2012-01-04 gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
1 /*
2 * Copyright 2012 Shinpei Kato
3 *
4 * University of California, Santa Cruz
5 * Systems Research Lab.
6 *
7 * All Rights Reserved.
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice (including the next
17 * paragraph) shall be included in all copies or substantial portions of the
18 * Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 * OTHER DEALINGS IN THE SOFTWARE.
27 */
28
010bd64f »
2012-01-08 gdev: implemented the Credit scheduling algorithm for virtual devices
29 #include "gdev_device.h"
3ddab5ef »
2012-01-04 gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
30 #include "gdev_sched.h"
b96dab78 »
2012-01-05 gdev: refactored code and cleaned up files
31 #include "gdev_system.h"
3ddab5ef »
2012-01-04 gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
32
33 struct gdev_sched_entity *sched_entity_ptr[GDEV_CONTEXT_MAX_COUNT];
34
35 /**
010bd64f »
2012-01-08 gdev: implemented the Credit scheduling algorithm for virtual devices
36 * initialize the local scheduler for the device.
3ddab5ef »
2012-01-04 gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
37 */
38 int gdev_init_scheduler(struct gdev_device *gdev)
39 {
010bd64f »
2012-01-08 gdev: implemented the Credit scheduling algorithm for virtual devices
40 struct gdev_device *phys = gdev->parent;
41
b96dab78 »
2012-01-05 gdev: refactored code and cleaned up files
42 gdev_sched_create_scheduler(gdev);
3ddab5ef »
2012-01-04 gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
43
010bd64f »
2012-01-08 gdev: implemented the Credit scheduling algorithm for virtual devices
44 if (phys) {
45 gdev_lock(&phys->sched_com_lock);
46 gdev_list_init(&gdev->list_entry_com, (void*)gdev);
47 gdev_list_add(&gdev->list_entry_com, &phys->sched_com_list);
48 gdev_unlock(&phys->sched_com_lock);
49 gdev_replenish_credit_compute(gdev);
50
51 gdev_lock(&phys->sched_mem_lock);
52 gdev_list_init(&gdev->list_entry_mem, (void*)gdev);
53 gdev_list_add(&gdev->list_entry_mem, &phys->sched_mem_list);
54 gdev_unlock(&phys->sched_mem_lock);
55 gdev_replenish_credit_memory(gdev);
56 }
57
3ddab5ef »
2012-01-04 gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
58 return 0;
59 }
60
61 /**
010bd64f »
2012-01-08 gdev: implemented the Credit scheduling algorithm for virtual devices
62 * finalized the local scheduler for the device.
3ddab5ef »
2012-01-04 gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
63 */
64 void gdev_exit_scheduler(struct gdev_device *gdev)
65 {
010bd64f »
2012-01-08 gdev: implemented the Credit scheduling algorithm for virtual devices
66 struct gdev_device *phys = gdev->parent;
67
68 if (phys) {
69 gdev_lock(&phys->sched_com_lock);
70 if (!gdev_list_empty(&gdev->list_entry_com))
71 gdev_list_del(&gdev->list_entry_com);
72 gdev_unlock(&phys->sched_com_lock);
73
74 gdev_lock(&phys->sched_mem_lock);
75 if (!gdev_list_empty(&gdev->list_entry_mem))
76 gdev_list_del(&gdev->list_entry_mem);
77 gdev_unlock(&phys->sched_mem_lock);
78 }
79
b96dab78 »
2012-01-05 gdev: refactored code and cleaned up files
80 gdev_sched_destroy_scheduler(gdev);
81 }
82
83 /**
84 * create a new scheduling entity.
85 */
86 struct gdev_sched_entity *gdev_sched_entity_create(struct gdev_device *gdev, gdev_ctx_t *ctx)
87 {
88 struct gdev_sched_entity *se;
89
90 if (!(se= MALLOC(sizeof(*se))))
91 return NULL;
92
93 /* set up the scheduling entity. */
94 se->gdev = gdev;
95 se->task = gdev_sched_get_current_task();
96 se->ctx = ctx;
5e75425a »
2012-01-07 gdev: added a priority-based scheduler
97 se->prio = gdev_sched_get_static_prio(se->task);
b96dab78 »
2012-01-05 gdev: refactored code and cleaned up files
98 se->rt_prio = GDEV_PRIO_DEFAULT;
5e75425a »
2012-01-07 gdev: added a priority-based scheduler
99 se->launch_instances = 0;
100 se->memcpy_instances = 0;
101 gdev_list_init(&se->list_entry_com, (void*)se);
102 gdev_list_init(&se->list_entry_mem, (void*)se);
010bd64f »
2012-01-08 gdev: implemented the Credit scheduling algorithm for virtual devices
103 gdev_time_us(&se->last_tick_com, 0);
104 gdev_time_us(&se->last_tick_mem, 0);
b96dab78 »
2012-01-05 gdev: refactored code and cleaned up files
105 sched_entity_ptr[gdev_ctx_get_cid(ctx)] = se;
106
107 return se;
108 }
109
110 /**
111 * destroy the scheduling entity.
112 */
113 void gdev_sched_entity_destroy(struct gdev_sched_entity *se)
114 {
115 FREE(se);
3ddab5ef »
2012-01-04 gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
116 }
117
010bd64f »
2012-01-08 gdev: implemented the Credit scheduling algorithm for virtual devices
118 /**
119 * insert the scheduling entity to the priority-ordered compute list.
120 * gdev->sched_com_lock must be locked.
121 */
122 static void __gdev_enqueue_compute(struct gdev_device *gdev, struct gdev_sched_entity *se)
123 {
124 struct gdev_sched_entity *p;
125
126 gdev_list_for_each (p, &gdev->sched_com_list, list_entry_com) {
127 if (se->prio > p->prio) {
128 gdev_list_add_prev(&se->list_entry_com, &p->list_entry_com);
129 break;
130 }
131 }
132 if (gdev_list_empty(&se->list_entry_com))
133 gdev_list_add_tail(&se->list_entry_com, &gdev->sched_com_list);
134 }
135
136 /**
137 * delete the scheduling entity from the priority-ordered compute list.
138 * gdev->sched_com_lock must be locked.
139 */
140 static void __gdev_dequeue_compute(struct gdev_sched_entity *se)
141 {
142 gdev_list_del(&se->list_entry_com);
143 }
144
145 /**
dd4de83d »
2012-01-10 gdev: refactored code
146 * insert the scheduling entity to the priority-ordered memory list.
147 * gdev->sched_mem_lock must be locked.
148 */
149 static void __gdev_enqueue_memory(struct gdev_device *gdev, struct gdev_sched_entity *se)
150 {
151 struct gdev_sched_entity *p;
152
153 gdev_list_for_each (p, &gdev->sched_mem_list, list_entry_mem) {
154 if (se->prio > p->prio) {
155 gdev_list_add_prev(&se->list_entry_mem, &p->list_entry_mem);
156 break;
157 }
158 }
159 if (gdev_list_empty(&se->list_entry_mem))
160 gdev_list_add_tail(&se->list_entry_mem, &gdev->sched_mem_list);
161 }
162
163 /**
164 * delete the scheduling entity from the priority-ordered memory list.
165 * gdev->sched_mem_lock must be locked.
166 */
167 static void __gdev_dequeue_memory(struct gdev_sched_entity *se)
168 {
169 gdev_list_del(&se->list_entry_mem);
170 }
171
172 /**
010bd64f »
2012-01-08 gdev: implemented the Credit scheduling algorithm for virtual devices
173 * scheduling policy files.
174 */
9e10e893 »
2012-01-11 gdev: updated scheduler
175 #include "gdev_vsched_band.c"
657f7a2b »
2012-01-08 gdev: added "period" in /proc entry
176 #include "gdev_vsched_credit.c"
9e10e893 »
2012-01-11 gdev: updated scheduler
177 #include "gdev_vsched_fifo.c"
657f7a2b »
2012-01-08 gdev: added "period" in /proc entry
178
9e10e893 »
2012-01-11 gdev: updated scheduler
179 #define GDEV_VSCHED_POLICY_BAND
180 //#define GDEV_VSCHED_POLICY_CREDIT
181 //#define GDEV_VSCHED_POLICY_FIFO
162ee89d »
2012-01-09 gdev: added CROD scheduler
182
9e10e893 »
2012-01-11 gdev: updated scheduler
183 #if defined(GDEV_VSCHED_POLICY_BAND)
184 struct gdev_vsched_policy *gdev_vsched = &gdev_vsched_band;
185 #elif defined(GDEV_VSCHED_POLICY_CREDIT)
657f7a2b »
2012-01-08 gdev: added "period" in /proc entry
186 struct gdev_vsched_policy *gdev_vsched = &gdev_vsched_credit;
9e10e893 »
2012-01-11 gdev: updated scheduler
187 #elif defined(GDEV_VSCHED_POLICY_FIFO)
188 struct gdev_vsched_policy *gdev_vsched = &gdev_vsched_fifo;
657f7a2b »
2012-01-08 gdev: added "period" in /proc entry
189 #endif
190
3ddab5ef »
2012-01-04 gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
191 /**
657f7a2b »
2012-01-08 gdev: added "period" in /proc entry
192 * schedule compute calls.
3ddab5ef »
2012-01-04 gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
193 */
657f7a2b »
2012-01-08 gdev: added "period" in /proc entry
194 void gdev_schedule_compute(struct gdev_sched_entity *se)
3ddab5ef »
2012-01-04 gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
195 {
ddb9864f »
2012-01-05 gdev: updated (a little) scheduler code
196 struct gdev_device *gdev = se->gdev;
657f7a2b »
2012-01-08 gdev: added "period" in /proc entry
197
5e75425a »
2012-01-07 gdev: added a priority-based scheduler
198 resched:
657f7a2b »
2012-01-08 gdev: added "period" in /proc entry
199 /* algorithm-specific virtual device scheduler. */
010bd64f »
2012-01-08 gdev: implemented the Credit scheduling algorithm for virtual devices
200 gdev_vsched->schedule_compute(se);
657f7a2b »
2012-01-08 gdev: added "period" in /proc entry
201
202 /* local compute scheduler. */
5e75425a »
2012-01-07 gdev: added a priority-based scheduler
203 gdev_lock(&gdev->sched_com_lock);
a2b59714 »
2012-01-10 gdev: added gdev_global_{lock,unlock}()
204 if ((gdev->current_com && gdev->current_com != se) || se->launch_instances >= GDEV_INSTANCES_LIMIT) {
010bd64f »
2012-01-08 gdev: implemented the Credit scheduling algorithm for virtual devices
205 /* enqueue the scheduling entity to the compute queue. */
206 __gdev_enqueue_compute(gdev, se);
5e75425a »
2012-01-07 gdev: added a priority-based scheduler
207 gdev_unlock(&gdev->sched_com_lock);
208
209 /* now the corresponding task will be suspended until some other tasks
210 will awaken it upon completions of their compute launches. */
211 gdev_sched_sleep();
212
213 goto resched;
214 }
215 else {
657f7a2b »
2012-01-08 gdev: added "period" in /proc entry
216 /* now, let's get offloaded to the device! */
217 if (se->launch_instances == 0) {
218 /* record the start time. */
010bd64f »
2012-01-08 gdev: implemented the Credit scheduling algorithm for virtual devices
219 gdev_time_stamp(&se->last_tick_com);
657f7a2b »
2012-01-08 gdev: added "period" in /proc entry
220 }
5e75425a »
2012-01-07 gdev: added a priority-based scheduler
221 se->launch_instances++;
08a0abb5 »
2012-01-09 gdev: fixed the scheduler
222 gdev->current_com = (void*)se;
5e75425a »
2012-01-07 gdev: added a priority-based scheduler
223 gdev_unlock(&gdev->sched_com_lock);
224 }
225 }
226
227 /**
657f7a2b »
2012-01-08 gdev: added "period" in /proc entry
228 * schedule the next context of compute.
5e75425a »
2012-01-07 gdev: added a priority-based scheduler
229 * invoked upon the completion of preceding contexts.
230 */
010bd64f »
2012-01-08 gdev: implemented the Credit scheduling algorithm for virtual devices
231 void gdev_select_next_compute(struct gdev_device *gdev)
5e75425a »
2012-01-07 gdev: added a priority-based scheduler
232 {
08a0abb5 »
2012-01-09 gdev: fixed the scheduler
233 struct gdev_sched_entity *se;
234 struct gdev_device *next;
7a89238f »
2012-01-09 gdev: updated virtual device support
235 struct gdev_time now, exec;
5e75425a »
2012-01-07 gdev: added a priority-based scheduler
236
237 gdev_lock(&gdev->sched_com_lock);
08a0abb5 »
2012-01-09 gdev: fixed the scheduler
238 se = (struct gdev_sched_entity *)gdev->current_com;
010bd64f »
2012-01-08 gdev: implemented the Credit scheduling algorithm for virtual devices
239 if (!se) {
240 gdev_unlock(&gdev->sched_com_lock);
241 GDEV_PRINT("Invalid scheduling entity on Gdev#%d\n", gdev->id);
242 return;
243 }
244
245 /* record the end time (update on multiple launches too). */
246 gdev_time_stamp(&now);
08a0abb5 »
2012-01-09 gdev: fixed the scheduler
247 /* aquire the execution time. */
7a89238f »
2012-01-09 gdev: updated virtual device support
248 gdev_time_sub(&exec, &now, &se->last_tick_com);
010bd64f »
2012-01-08 gdev: implemented the Credit scheduling algorithm for virtual devices
249
250 se->launch_instances--;
251 if (se->launch_instances == 0) {
08a0abb5 »
2012-01-09 gdev: fixed the scheduler
252 /* account for the credit. */
253 gdev_time_sub(&gdev->credit_com, &gdev->credit_com, &exec);
254 /* accumulate the computation time. */
255 gdev->com_time += gdev_time_to_us(&exec);
256
257 /* select the next context to be scheduled.
258 now don't reference the previous entity by se. */
259 se = gdev_list_container(gdev_list_head(&gdev->sched_com_list));
260 /* setting the next entity here prevents lower-priority contexts
261 arriving in gdev_schedule_compute() from being dispatched onto
262 the device. note that se = NULL could happen. */
263 gdev->current_com = (void*)se;
010bd64f »
2012-01-08 gdev: implemented the Credit scheduling algorithm for virtual devices
264 gdev_unlock(&gdev->sched_com_lock);
265
08a0abb5 »
2012-01-09 gdev: fixed the scheduler
266 /* select the next device to be scheduled. */
267 next = gdev_vsched->select_next_compute(gdev);
268 if (!next)
269 return;
270
271 gdev_lock(&next->sched_com_lock);
272 /* if the virtual device needs to be switched, change the next
273 scheduling entity to be scheduled also needs to be changed. */
34f54dc4 »
2012-01-17 commit for debug
274 if (next != gdev) {
275 gdev->current_com = NULL;
08a0abb5 »
2012-01-09 gdev: fixed the scheduler
276 se = gdev_list_container(gdev_list_head(&next->sched_com_list));
34f54dc4 »
2012-01-17 commit for debug
277 }
08a0abb5 »
2012-01-09 gdev: fixed the scheduler
278
279 /* now remove the scheduling entity from the waiting list, and wake
280 up the corresponding task. */
281 if (se) {
282 __gdev_dequeue_compute(se);
283 gdev_unlock(&next->sched_com_lock);
284
9e10e893 »
2012-01-11 gdev: updated scheduler
285 if (gdev_sched_wakeup(se->task) < 0) {
a2b59714 »
2012-01-10 gdev: added gdev_global_{lock,unlock}()
286 GDEV_PRINT("Failed to wake up context %d\n", se->ctx->cid);
a486bdf4 »
2012-01-11 gdev: improved and fixed the Band scheduler!!!!!
287 GDEV_PRINT("Perhaps context %d is already up\n", se->ctx->cid);
a2b59714 »
2012-01-10 gdev: added gdev_global_{lock,unlock}()
288 }
08a0abb5 »
2012-01-09 gdev: fixed the scheduler
289 }
290 else
291 gdev_unlock(&next->sched_com_lock);
5e75425a »
2012-01-07 gdev: added a priority-based scheduler
292 }
293 else
294 gdev_unlock(&gdev->sched_com_lock);
3ddab5ef »
2012-01-04 gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
295 }
296
297 /**
dd4de83d »
2012-01-10 gdev: refactored code
298 * automatically replenish the credit of compute launches.
299 */
300 void gdev_replenish_credit_compute(struct gdev_device *gdev)
301 {
302 gdev_vsched->replenish_compute(gdev);
303 }
304
305 /**
3ddab5ef »
2012-01-04 gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
306 * schedule memcpy-copy calls.
307 */
657f7a2b »
2012-01-08 gdev: added "period" in /proc entry
308 void gdev_schedule_memory(struct gdev_sched_entity *se)
3ddab5ef »
2012-01-04 gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
309 {
dd4de83d »
2012-01-10 gdev: refactored code
310 struct gdev_device *gdev = se->gdev;
311
9e10e893 »
2012-01-11 gdev: updated scheduler
312 #ifndef GDEV_SCHED_MRQ
313 gdev_schedule_compute(se);
314 return;
315 #endif
316
dd4de83d »
2012-01-10 gdev: refactored code
317 resched:
318 /* algorithm-specific virtual device scheduler. */
319 gdev_vsched->schedule_memory(se);
320
321 /* local memory scheduler. */
322 gdev_lock(&gdev->sched_mem_lock);
323 if ((gdev->current_mem && gdev->current_mem != se) || se->memcpy_instances >= GDEV_INSTANCES_LIMIT) {
324 /* enqueue the scheduling entity to the memory queue. */
325 __gdev_enqueue_memory(gdev, se);
326 gdev_unlock(&gdev->sched_mem_lock);
327
328 /* now the corresponding task will be suspended until some other tasks
329 will awaken it upon completions of their memory transfers. */
330 gdev_sched_sleep();
331
332 goto resched;
333 }
334 else {
335 /* now, let's get offloaded to the device! */
336 if (se->memcpy_instances == 0) {
337 /* record the start time. */
338 gdev_time_stamp(&se->last_tick_mem);
339 }
340 se->memcpy_instances++;
341 gdev->current_mem = (void*)se;
342 gdev_unlock(&gdev->sched_mem_lock);
343 }
3ddab5ef »
2012-01-04 gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
344 }
345
346 /**
657f7a2b »
2012-01-08 gdev: added "period" in /proc entry
347 * schedule the next context of memory copy.
3ddab5ef »
2012-01-04 gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
348 * invoked upon the completion of preceding contexts.
349 */
010bd64f »
2012-01-08 gdev: implemented the Credit scheduling algorithm for virtual devices
350 void gdev_select_next_memory(struct gdev_device *gdev)
657f7a2b »
2012-01-08 gdev: added "period" in /proc entry
351 {
dd4de83d »
2012-01-10 gdev: refactored code
352 struct gdev_sched_entity *se;
353 struct gdev_device *next;
354 struct gdev_time now, exec;
657f7a2b »
2012-01-08 gdev: added "period" in /proc entry
355
9e10e893 »
2012-01-11 gdev: updated scheduler
356 #ifndef GDEV_SCHED_MRQ
357 gdev_select_next_compute(gdev);
358 return;
359 #endif
360
dd4de83d »
2012-01-10 gdev: refactored code
361 gdev_lock(&gdev->sched_mem_lock);
362 se = (struct gdev_sched_entity *)gdev->current_mem;
363 if (!se) {
364 gdev_unlock(&gdev->sched_mem_lock);
365 GDEV_PRINT("Invalid scheduling entity on Gdev#%d\n", gdev->id);
366 return;
367 }
368
369 /* record the end time (update on multiple launches too). */
370 gdev_time_stamp(&now);
371 /* aquire the execution time. */
372 gdev_time_sub(&exec, &now, &se->last_tick_mem);
373
374 se->memcpy_instances--;
375 if (se->memcpy_instances == 0) {
376 /* account for the credit. */
377 gdev_time_sub(&gdev->credit_mem, &gdev->credit_mem, &exec);
378 /* accumulate the memory transfer time. */
379 gdev->mem_time += gdev_time_to_us(&exec);
380
381 /* select the next context to be scheduled.
382 now don't reference the previous entity by se. */
383 se = gdev_list_container(gdev_list_head(&gdev->sched_mem_list));
384 /* setting the next entity here prevents lower-priority contexts
385 arriving in gdev_schedule_memory() from being dispatched onto
386 the device. note that se = NULL could happen. */
387 gdev->current_mem = (void*)se;
388 gdev_unlock(&gdev->sched_mem_lock);
389
390 /* select the next device to be scheduled. */
391 next = gdev_vsched->select_next_memory(gdev);
392 if (!next)
393 return;
394
395 gdev_lock(&next->sched_mem_lock);
396 /* if the virtual device needs to be switched, change the next
397 scheduling entity to be scheduled also needs to be changed. */
398 if (next != gdev)
399 se = gdev_list_container(gdev_list_head(&next->sched_mem_list));
400
401 /* now remove the scheduling entity from the waiting list, and wake
402 up the corresponding task. */
403 if (se) {
404 __gdev_dequeue_memory(se);
405 gdev_unlock(&next->sched_mem_lock);
406
407 while (gdev_sched_wakeup(se->task) < 0) {
408 GDEV_PRINT("Failed to wake up context %d\n", se->ctx->cid);
409 }
410 }
411 else
412 gdev_unlock(&next->sched_mem_lock);
413 }
414 else
415 gdev_unlock(&gdev->sched_mem_lock);
3ddab5ef »
2012-01-04 gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
416 }
417
010bd64f »
2012-01-08 gdev: implemented the Credit scheduling algorithm for virtual devices
418 /**
419 * automatically replenish the credit of memory copies.
420 */
657f7a2b »
2012-01-08 gdev: added "period" in /proc entry
421 void gdev_replenish_credit_memory(struct gdev_device *gdev)
422 {
9e10e893 »
2012-01-11 gdev: updated scheduler
423 #ifdef GDEV_SCHED_MRQ
dd4de83d »
2012-01-10 gdev: refactored code
424 gdev_vsched->replenish_memory(gdev);
9e10e893 »
2012-01-11 gdev: updated scheduler
425 #endif
657f7a2b »
2012-01-08 gdev: added "period" in /proc entry
426 }
Something went wrong with that request. Please try again.