Skip to contentSkip to conversation

Question: sched_rt.c : is RT check needed within a RT func? dequeue_task_rt() calls update_curr_rt() which checks for priority of RR or FIFO :

DISCUSSION Mitchell Erblich 2 participants 2 messages Aug 9, 2007

lore
Share & tools
lore
#0 lore raw

1) * Possible wasted stats overhead during dequeue.. sched_rt.c:
Is RT check needed within a RT func? dequeue_task_rt() calls update_curr_rt() which checks for priority of RR or FIFO.

WITHIN..
static inline void update_curr_rt(struct rq *rq)

are the two lines..
if (!task_has_rt_policy(curr))

    return;

Generally if I am reading this right, then what
RT task is neither FIFO or RR???

Thus, I think those two lines could be removed.

2) nit....
The comment within sched_rt.c
-----> Adding/removing a task to/from a priority array:
Is placed before dequeue_task_rt() where
enqueue_task_rt() is placed above the comment

Thus, the comment should be moved above enqueue_task_rt()

Mitchell Erblich

#1 lore raw
Quoted 8 lines · Mitchell Erblich

1) * Possible wasted stats overhead during dequeue.. sched_rt.c:
Is RT check needed within a RT func? dequeue_task_rt() calls update_curr_rt() which checks for priority of RR or FIFO.
[ ... ]
Thus, I think those two lines could be removed.

Quoted 6 lines

2) nit....
The comment within sched_rt.c
-----> Adding/removing a task to/from a priority array:
Is placed before dequeue_task_rt() where
enqueue_task_rt() is placed above the comment

Both suggestions sound good. I guess, a patch would be welcomed :-)

Quoted 3 lines

Mitchell Erblich

Signature · 2 lines
Best regards,
Dmitry Adamushko