rt.c (0cce284537fb42d9c28b9b31038ffc9b464555f5) | rt.c (b18b6a9cef7f30e9a8b7738d5fc8d568cf660855) |
---|---|
1/* 2 * Real-Time Scheduling Class (mapped to the SCHED_FIFO and SCHED_RR 3 * policies) 4 */ 5 6#include "sched.h" 7 8#include <linux/slab.h> --- 2232 unchanged lines hidden (view full) --- 2241 * greater than the current running task 2242 * then reschedule. 2243 */ 2244 if (p->prio < rq->curr->prio) 2245 resched_curr(rq); 2246 } 2247} 2248 | 1/* 2 * Real-Time Scheduling Class (mapped to the SCHED_FIFO and SCHED_RR 3 * policies) 4 */ 5 6#include "sched.h" 7 8#include <linux/slab.h> --- 2232 unchanged lines hidden (view full) --- 2241 * greater than the current running task 2242 * then reschedule. 2243 */ 2244 if (p->prio < rq->curr->prio) 2245 resched_curr(rq); 2246 } 2247} 2248 |
2249#ifdef CONFIG_POSIX_TIMERS |
|
2249static void watchdog(struct rq *rq, struct task_struct *p) 2250{ 2251 unsigned long soft, hard; 2252 2253 /* max may change after cur was read, this will be fixed next tick */ 2254 soft = task_rlimit(p, RLIMIT_RTTIME); 2255 hard = task_rlimit_max(p, RLIMIT_RTTIME); 2256 --- 5 unchanged lines hidden (view full) --- 2262 p->rt.watchdog_stamp = jiffies; 2263 } 2264 2265 next = DIV_ROUND_UP(min(soft, hard), USEC_PER_SEC/HZ); 2266 if (p->rt.timeout > next) 2267 p->cputime_expires.sched_exp = p->se.sum_exec_runtime; 2268 } 2269} | 2250static void watchdog(struct rq *rq, struct task_struct *p) 2251{ 2252 unsigned long soft, hard; 2253 2254 /* max may change after cur was read, this will be fixed next tick */ 2255 soft = task_rlimit(p, RLIMIT_RTTIME); 2256 hard = task_rlimit_max(p, RLIMIT_RTTIME); 2257 --- 5 unchanged lines hidden (view full) --- 2263 p->rt.watchdog_stamp = jiffies; 2264 } 2265 2266 next = DIV_ROUND_UP(min(soft, hard), USEC_PER_SEC/HZ); 2267 if (p->rt.timeout > next) 2268 p->cputime_expires.sched_exp = p->se.sum_exec_runtime; 2269 } 2270} |
2271#else 2272static inline void watchdog(struct rq *rq, struct task_struct *p) { } 2273#endif |
|
2270 2271static void task_tick_rt(struct rq *rq, struct task_struct *p, int queued) 2272{ 2273 struct sched_rt_entity *rt_se = &p->rt; 2274 2275 update_curr_rt(rq); 2276 2277 watchdog(rq, p); --- 93 unchanged lines hidden --- | 2274 2275static void task_tick_rt(struct rq *rq, struct task_struct *p, int queued) 2276{ 2277 struct sched_rt_entity *rt_se = &p->rt; 2278 2279 update_curr_rt(rq); 2280 2281 watchdog(rq, p); --- 93 unchanged lines hidden --- |