Lines Matching refs:rq
73 grrr_run_queue_t rq,
78 grrr_run_queue_t rq);
82 grrr_run_queue_t rq,
87 grrr_sorted_list_insert_group(grrr_run_queue_t rq,
91 grrr_rescale_work(grrr_run_queue_t rq);
312 grrr_run_queue_t rq = &processor->grrr_runq;
314 return grrr_select(rq);
347 grrr_run_queue_t rq = &processor->grrr_runq;
350 result = grrr_enqueue(rq, thread);
406 grrr_run_queue_t rq = &processor->grrr_runq;
408 grrr_remove(rq, thread);
438 grrr_run_queue_t rq = &processor->grrr_runq;
443 if (rq->groups[i].count > 0)
610 grrr_intergroup_schedule(grrr_run_queue_t rq)
615 if (rq->count == 0) {
619 group = rq->current_group;
622 group = (grrr_group_t)queue_first(&rq->sorted_group_list);
627 if ((group->work >= (UINT32_MAX-256)) || (rq->last_rescale_tick != grrr_rescale_tick)) {
628 grrr_rescale_work(rq);
632 if (queue_end(&rq->sorted_group_list, queue_next((queue_entry_t)group))) {
634 group = (grrr_group_t)queue_first(&rq->sorted_group_list);
652 group = (grrr_group_t)queue_first(&rq->sorted_group_list);
656 rq->current_group = group;
695 grrr_rescale_work(grrr_run_queue_t rq)
701 rq->groups[index].work >>= 3;
704 rq->last_rescale_tick = grrr_rescale_tick;
709 grrr_run_queue_t rq,
718 group = &rq->groups[gindex];
738 SCHED_STATS_RUNQ_CHANGE(&rq->runq_stats, rq->count);
746 grrr_sorted_list_insert_group(rq, group);
748 rq->count++;
749 rq->weight += gpriority;
755 grrr_select(grrr_run_queue_t rq)
759 thread = grrr_intergroup_schedule(rq);
767 group = &rq->groups[gindex];
770 SCHED_STATS_RUNQ_CHANGE(&rq->runq_stats, rq->count);
779 if (rq->current_group == group) {
780 rq->current_group = GRRR_GROUP_NULL;
784 grrr_sorted_list_insert_group(rq, group);
787 rq->count--;
788 rq->weight -= gpriority;
799 grrr_run_queue_t rq,
808 group = &rq->groups[gindex];
811 SCHED_STATS_RUNQ_CHANGE(&rq->runq_stats, rq->count);
820 if (rq->current_group == group) {
821 rq->current_group = GRRR_GROUP_NULL;
825 grrr_sorted_list_insert_group(rq, group);
828 rq->count--;
829 rq->weight -= gpriority;
835 grrr_sorted_list_insert_group(grrr_run_queue_t rq,
839 if (queue_empty(&rq->sorted_group_list)) {
840 enqueue_tail(&rq->sorted_group_list, (queue_entry_t)group);
847 search_group = (grrr_group_t)queue_first(&rq->sorted_group_list);
848 while (!queue_end(&rq->sorted_group_list, (queue_entry_t)search_group) ) {
866 if (queue_end(&rq->sorted_group_list, (queue_entry_t)search_group)) {
867 enqueue_tail(&rq->sorted_group_list, (queue_entry_t)group);