Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 428 lines (370 sloc) 12.315 kb
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_SIZ...
Shinpei Kato authored
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
010bd64 gdev: implemented the Credit scheduling algorithm for virtual devices
Shinpei Kato authored
29 #include "gdev_device.h"
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_SIZ...
Shinpei Kato authored
30 #include "gdev_sched.h"
b96dab7 gdev: refactored code and cleaned up files
Shinpei Kato authored
31 #include "gdev_system.h"
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_SIZ...
Shinpei Kato authored
32
33 struct gdev_sched_entity *sched_entity_ptr[GDEV_CONTEXT_MAX_COUNT];
34
35 /**
010bd64 gdev: implemented the Credit scheduling algorithm for virtual devices
Shinpei Kato authored
36 * initialize the local scheduler for the device.
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_SIZ...
Shinpei Kato authored
37 */
38 int gdev_init_scheduler(struct gdev_device *gdev)
39 {
010bd64 gdev: implemented the Credit scheduling algorithm for virtual devices
Shinpei Kato authored
40 struct gdev_device *phys = gdev->parent;
41
b96dab7 gdev: refactored code and cleaned up files
Shinpei Kato authored
42 gdev_sched_create_scheduler(gdev);
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_SIZ...
Shinpei Kato authored
43
010bd64 gdev: implemented the Credit scheduling algorithm for virtual devices
Shinpei Kato authored
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
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_SIZ...
Shinpei Kato authored
58 return 0;
59 }
60
61 /**
010bd64 gdev: implemented the Credit scheduling algorithm for virtual devices
Shinpei Kato authored
62 * finalized the local scheduler for the device.
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_SIZ...
Shinpei Kato authored
63 */
64 void gdev_exit_scheduler(struct gdev_device *gdev)
65 {
010bd64 gdev: implemented the Credit scheduling algorithm for virtual devices
Shinpei Kato authored
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
b96dab7 gdev: refactored code and cleaned up files
Shinpei Kato authored
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;
5e75425 gdev: added a priority-based scheduler
Shinpei Kato authored
97 se->prio = gdev_sched_get_static_prio(se->task);
b96dab7 gdev: refactored code and cleaned up files
Shinpei Kato authored
98 se->rt_prio = GDEV_PRIO_DEFAULT;
5e75425 gdev: added a priority-based scheduler
Shinpei Kato authored
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);
010bd64 gdev: implemented the Credit scheduling algorithm for virtual devices
Shinpei Kato authored
103 gdev_time_us(&se->last_tick_com, 0);
104 gdev_time_us(&se->last_tick_mem, 0);
b96dab7 gdev: refactored code and cleaned up files
Shinpei Kato authored
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);
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_SIZ...
Shinpei Kato authored
116 }
117
010bd64 gdev: implemented the Credit scheduling algorithm for virtual devices
Shinpei Kato authored
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 /**
dd4de83 gdev: refactored code
Shinpei Kato authored
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 /**
010bd64 gdev: implemented the Credit scheduling algorithm for virtual devices
Shinpei Kato authored
173 * scheduling policy files.
174 */
9e10e89 gdev: updated scheduler
Shinpei Kato authored
175 #include "gdev_vsched_band.c"
657f7a2 gdev: added "period" in /proc entry
Shinpei Kato authored
176 #include "gdev_vsched_credit.c"
9e10e89 gdev: updated scheduler
Shinpei Kato authored
177 #include "gdev_vsched_cnods.c"
178 #include "gdev_vsched_fifo.c"
657f7a2 gdev: added "period" in /proc entry
Shinpei Kato authored
179
9e10e89 gdev: updated scheduler
Shinpei Kato authored
180 #define GDEV_VSCHED_POLICY_BAND
181 //#define GDEV_VSCHED_POLICY_CREDIT
182 //#define GDEV_VSCHED_POLICY_CNODS
183 //#define GDEV_VSCHED_POLICY_FIFO
162ee89 gdev: added CROD scheduler
Shinpei Kato authored
184
9e10e89 gdev: updated scheduler
Shinpei Kato authored
185 #if defined(GDEV_VSCHED_POLICY_BAND)
186 struct gdev_vsched_policy *gdev_vsched = &gdev_vsched_band;
187 #elif defined(GDEV_VSCHED_POLICY_CREDIT)
657f7a2 gdev: added "period" in /proc entry
Shinpei Kato authored
188 struct gdev_vsched_policy *gdev_vsched = &gdev_vsched_credit;
9e10e89 gdev: updated scheduler
Shinpei Kato authored
189 #elif defined(GDEV_VSCHED_POLICY_CNODS)
190 struct gdev_vsched_policy *gdev_vsched = &gdev_vsched_cnods;
191 #elif defined(GDEV_VSCHED_POLICY_FIFO)
192 struct gdev_vsched_policy *gdev_vsched = &gdev_vsched_fifo;
657f7a2 gdev: added "period" in /proc entry
Shinpei Kato authored
193 #endif
194
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_SIZ...
Shinpei Kato authored
195 /**
657f7a2 gdev: added "period" in /proc entry
Shinpei Kato authored
196 * schedule compute calls.
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_SIZ...
Shinpei Kato authored
197 */
657f7a2 gdev: added "period" in /proc entry
Shinpei Kato authored
198 void gdev_schedule_compute(struct gdev_sched_entity *se)
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_SIZ...
Shinpei Kato authored
199 {
ddb9864 gdev: updated (a little) scheduler code
Shinpei Kato authored
200 struct gdev_device *gdev = se->gdev;
657f7a2 gdev: added "period" in /proc entry
Shinpei Kato authored
201
5e75425 gdev: added a priority-based scheduler
Shinpei Kato authored
202 resched:
657f7a2 gdev: added "period" in /proc entry
Shinpei Kato authored
203 /* algorithm-specific virtual device scheduler. */
010bd64 gdev: implemented the Credit scheduling algorithm for virtual devices
Shinpei Kato authored
204 gdev_vsched->schedule_compute(se);
657f7a2 gdev: added "period" in /proc entry
Shinpei Kato authored
205
206 /* local compute scheduler. */
5e75425 gdev: added a priority-based scheduler
Shinpei Kato authored
207 gdev_lock(&gdev->sched_com_lock);
a2b5971 gdev: added gdev_global_{lock,unlock}()
Shinpei Kato authored
208 if ((gdev->current_com && gdev->current_com != se) || se->launch_instances >= GDEV_INSTANCES_LIMIT) {
010bd64 gdev: implemented the Credit scheduling algorithm for virtual devices
Shinpei Kato authored
209 /* enqueue the scheduling entity to the compute queue. */
210 __gdev_enqueue_compute(gdev, se);
5e75425 gdev: added a priority-based scheduler
Shinpei Kato authored
211 gdev_unlock(&gdev->sched_com_lock);
212
213 /* now the corresponding task will be suspended until some other tasks
214 will awaken it upon completions of their compute launches. */
215 gdev_sched_sleep();
216
217 goto resched;
218 }
219 else {
657f7a2 gdev: added "period" in /proc entry
Shinpei Kato authored
220 /* now, let's get offloaded to the device! */
221 if (se->launch_instances == 0) {
222 /* record the start time. */
010bd64 gdev: implemented the Credit scheduling algorithm for virtual devices
Shinpei Kato authored
223 gdev_time_stamp(&se->last_tick_com);
657f7a2 gdev: added "period" in /proc entry
Shinpei Kato authored
224 }
5e75425 gdev: added a priority-based scheduler
Shinpei Kato authored
225 se->launch_instances++;
08a0abb gdev: fixed the scheduler
Shinpei Kato authored
226 gdev->current_com = (void*)se;
5e75425 gdev: added a priority-based scheduler
Shinpei Kato authored
227 gdev_unlock(&gdev->sched_com_lock);
228 }
229 }
230
231 /**
657f7a2 gdev: added "period" in /proc entry
Shinpei Kato authored
232 * schedule the next context of compute.
5e75425 gdev: added a priority-based scheduler
Shinpei Kato authored
233 * invoked upon the completion of preceding contexts.
234 */
010bd64 gdev: implemented the Credit scheduling algorithm for virtual devices
Shinpei Kato authored
235 void gdev_select_next_compute(struct gdev_device *gdev)
5e75425 gdev: added a priority-based scheduler
Shinpei Kato authored
236 {
08a0abb gdev: fixed the scheduler
Shinpei Kato authored
237 struct gdev_sched_entity *se;
238 struct gdev_device *next;
7a89238 gdev: updated virtual device support
Shinpei Kato authored
239 struct gdev_time now, exec;
5e75425 gdev: added a priority-based scheduler
Shinpei Kato authored
240
241 gdev_lock(&gdev->sched_com_lock);
08a0abb gdev: fixed the scheduler
Shinpei Kato authored
242 se = (struct gdev_sched_entity *)gdev->current_com;
010bd64 gdev: implemented the Credit scheduling algorithm for virtual devices
Shinpei Kato authored
243 if (!se) {
244 gdev_unlock(&gdev->sched_com_lock);
245 GDEV_PRINT("Invalid scheduling entity on Gdev#%d\n", gdev->id);
246 return;
247 }
248
249 /* record the end time (update on multiple launches too). */
250 gdev_time_stamp(&now);
08a0abb gdev: fixed the scheduler
Shinpei Kato authored
251 /* aquire the execution time. */
7a89238 gdev: updated virtual device support
Shinpei Kato authored
252 gdev_time_sub(&exec, &now, &se->last_tick_com);
010bd64 gdev: implemented the Credit scheduling algorithm for virtual devices
Shinpei Kato authored
253
254 se->launch_instances--;
255 if (se->launch_instances == 0) {
08a0abb gdev: fixed the scheduler
Shinpei Kato authored
256 /* account for the credit. */
257 gdev_time_sub(&gdev->credit_com, &gdev->credit_com, &exec);
258 /* accumulate the computation time. */
259 gdev->com_time += gdev_time_to_us(&exec);
260
261 /* select the next context to be scheduled.
262 now don't reference the previous entity by se. */
263 se = gdev_list_container(gdev_list_head(&gdev->sched_com_list));
264 /* setting the next entity here prevents lower-priority contexts
265 arriving in gdev_schedule_compute() from being dispatched onto
266 the device. note that se = NULL could happen. */
267 gdev->current_com = (void*)se;
010bd64 gdev: implemented the Credit scheduling algorithm for virtual devices
Shinpei Kato authored
268 gdev_unlock(&gdev->sched_com_lock);
269
08a0abb gdev: fixed the scheduler
Shinpei Kato authored
270 /* select the next device to be scheduled. */
271 next = gdev_vsched->select_next_compute(gdev);
272 if (!next)
273 return;
274
275 gdev_lock(&next->sched_com_lock);
276 /* if the virtual device needs to be switched, change the next
277 scheduling entity to be scheduled also needs to be changed. */
278 if (next != gdev)
279 se = gdev_list_container(gdev_list_head(&next->sched_com_list));
280
281 /* now remove the scheduling entity from the waiting list, and wake
282 up the corresponding task. */
283 if (se) {
284 __gdev_dequeue_compute(se);
285 gdev_unlock(&next->sched_com_lock);
286
9e10e89 gdev: updated scheduler
Shinpei Kato authored
287 if (gdev_sched_wakeup(se->task) < 0) {
a2b5971 gdev: added gdev_global_{lock,unlock}()
Shinpei Kato authored
288 GDEV_PRINT("Failed to wake up context %d\n", se->ctx->cid);
289 }
08a0abb gdev: fixed the scheduler
Shinpei Kato authored
290 }
291 else
292 gdev_unlock(&next->sched_com_lock);
5e75425 gdev: added a priority-based scheduler
Shinpei Kato authored
293 }
294 else
295 gdev_unlock(&gdev->sched_com_lock);
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_SIZ...
Shinpei Kato authored
296 }
297
298 /**
dd4de83 gdev: refactored code
Shinpei Kato authored
299 * automatically replenish the credit of compute launches.
300 */
301 void gdev_replenish_credit_compute(struct gdev_device *gdev)
302 {
303 gdev_vsched->replenish_compute(gdev);
304 }
305
306 /**
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_SIZ...
Shinpei Kato authored
307 * schedule memcpy-copy calls.
308 */
657f7a2 gdev: added "period" in /proc entry
Shinpei Kato authored
309 void gdev_schedule_memory(struct gdev_sched_entity *se)
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_SIZ...
Shinpei Kato authored
310 {
dd4de83 gdev: refactored code
Shinpei Kato authored
311 struct gdev_device *gdev = se->gdev;
312
9e10e89 gdev: updated scheduler
Shinpei Kato authored
313 #ifndef GDEV_SCHED_MRQ
314 gdev_schedule_compute(se);
315 return;
316 #endif
317
dd4de83 gdev: refactored code
Shinpei Kato authored
318 resched:
319 /* algorithm-specific virtual device scheduler. */
320 gdev_vsched->schedule_memory(se);
321
322 /* local memory scheduler. */
323 gdev_lock(&gdev->sched_mem_lock);
324 if ((gdev->current_mem && gdev->current_mem != se) || se->memcpy_instances >= GDEV_INSTANCES_LIMIT) {
325 /* enqueue the scheduling entity to the memory queue. */
326 __gdev_enqueue_memory(gdev, se);
327 gdev_unlock(&gdev->sched_mem_lock);
328
329 /* now the corresponding task will be suspended until some other tasks
330 will awaken it upon completions of their memory transfers. */
331 gdev_sched_sleep();
332
333 goto resched;
334 }
335 else {
336 /* now, let's get offloaded to the device! */
337 if (se->memcpy_instances == 0) {
338 /* record the start time. */
339 gdev_time_stamp(&se->last_tick_mem);
340 }
341 se->memcpy_instances++;
342 gdev->current_mem = (void*)se;
343 gdev_unlock(&gdev->sched_mem_lock);
344 }
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_SIZ...
Shinpei Kato authored
345 }
346
347 /**
657f7a2 gdev: added "period" in /proc entry
Shinpei Kato authored
348 * schedule the next context of memory copy.
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_SIZ...
Shinpei Kato authored
349 * invoked upon the completion of preceding contexts.
350 */
010bd64 gdev: implemented the Credit scheduling algorithm for virtual devices
Shinpei Kato authored
351 void gdev_select_next_memory(struct gdev_device *gdev)
657f7a2 gdev: added "period" in /proc entry
Shinpei Kato authored
352 {
dd4de83 gdev: refactored code
Shinpei Kato authored
353 struct gdev_sched_entity *se;
354 struct gdev_device *next;
355 struct gdev_time now, exec;
657f7a2 gdev: added "period" in /proc entry
Shinpei Kato authored
356
9e10e89 gdev: updated scheduler
Shinpei Kato authored
357 #ifndef GDEV_SCHED_MRQ
358 gdev_select_next_compute(gdev);
359 return;
360 #endif
361
dd4de83 gdev: refactored code
Shinpei Kato authored
362 gdev_lock(&gdev->sched_mem_lock);
363 se = (struct gdev_sched_entity *)gdev->current_mem;
364 if (!se) {
365 gdev_unlock(&gdev->sched_mem_lock);
366 GDEV_PRINT("Invalid scheduling entity on Gdev#%d\n", gdev->id);
367 return;
368 }
369
370 /* record the end time (update on multiple launches too). */
371 gdev_time_stamp(&now);
372 /* aquire the execution time. */
373 gdev_time_sub(&exec, &now, &se->last_tick_mem);
374
375 se->memcpy_instances--;
376 if (se->memcpy_instances == 0) {
377 /* account for the credit. */
378 gdev_time_sub(&gdev->credit_mem, &gdev->credit_mem, &exec);
379 /* accumulate the memory transfer time. */
380 gdev->mem_time += gdev_time_to_us(&exec);
381
382 /* select the next context to be scheduled.
383 now don't reference the previous entity by se. */
384 se = gdev_list_container(gdev_list_head(&gdev->sched_mem_list));
385 /* setting the next entity here prevents lower-priority contexts
386 arriving in gdev_schedule_memory() from being dispatched onto
387 the device. note that se = NULL could happen. */
388 gdev->current_mem = (void*)se;
389 gdev_unlock(&gdev->sched_mem_lock);
390
391 /* select the next device to be scheduled. */
392 next = gdev_vsched->select_next_memory(gdev);
393 if (!next)
394 return;
395
396 gdev_lock(&next->sched_mem_lock);
397 /* if the virtual device needs to be switched, change the next
398 scheduling entity to be scheduled also needs to be changed. */
399 if (next != gdev)
400 se = gdev_list_container(gdev_list_head(&next->sched_mem_list));
401
402 /* now remove the scheduling entity from the waiting list, and wake
403 up the corresponding task. */
404 if (se) {
405 __gdev_dequeue_memory(se);
406 gdev_unlock(&next->sched_mem_lock);
407
408 while (gdev_sched_wakeup(se->task) < 0) {
409 GDEV_PRINT("Failed to wake up context %d\n", se->ctx->cid);
410 }
411 }
412 else
413 gdev_unlock(&next->sched_mem_lock);
414 }
415 else
416 gdev_unlock(&gdev->sched_mem_lock);
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_SIZ...
Shinpei Kato authored
417 }
418
010bd64 gdev: implemented the Credit scheduling algorithm for virtual devices
Shinpei Kato authored
419 /**
420 * automatically replenish the credit of memory copies.
421 */
657f7a2 gdev: added "period" in /proc entry
Shinpei Kato authored
422 void gdev_replenish_credit_memory(struct gdev_device *gdev)
423 {
9e10e89 gdev: updated scheduler
Shinpei Kato authored
424 #ifdef GDEV_SCHED_MRQ
dd4de83 gdev: refactored code
Shinpei Kato authored
425 gdev_vsched->replenish_memory(gdev);
9e10e89 gdev: updated scheduler
Shinpei Kato authored
426 #endif
657f7a2 gdev: added "period" in /proc entry
Shinpei Kato authored
427 }
Something went wrong with that request. Please try again.