mirror of
https://github.com/torvalds/linux.git
synced 2024-09-21 23:43:02 +00:00
sched: simplify __check_preempt_curr_fair()
Preparatory patch for fix-ideal-runtime: simplify __check_preempt_curr_fair(): get rid of the integer return. text data bss dec hex filename 13404 228 1204 14836 39f4 sched.o.before 13393 228 1204 14825 39e9 sched.o.after functionality is unchanged. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
cf2ab4696e
commit
7c92e54f6f
|
@ -673,7 +673,7 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int sleep)
|
||||||
/*
|
/*
|
||||||
* Preempt the current task with a newly woken task if needed:
|
* Preempt the current task with a newly woken task if needed:
|
||||||
*/
|
*/
|
||||||
static int
|
static void
|
||||||
__check_preempt_curr_fair(struct cfs_rq *cfs_rq, struct sched_entity *se,
|
__check_preempt_curr_fair(struct cfs_rq *cfs_rq, struct sched_entity *se,
|
||||||
struct sched_entity *curr, unsigned long granularity)
|
struct sched_entity *curr, unsigned long granularity)
|
||||||
{
|
{
|
||||||
|
@ -686,9 +686,8 @@ __check_preempt_curr_fair(struct cfs_rq *cfs_rq, struct sched_entity *se,
|
||||||
*/
|
*/
|
||||||
if (__delta > niced_granularity(curr, granularity)) {
|
if (__delta > niced_granularity(curr, granularity)) {
|
||||||
resched_task(rq_of(cfs_rq)->curr);
|
resched_task(rq_of(cfs_rq)->curr);
|
||||||
return 1;
|
curr->prev_sum_exec_runtime = curr->sum_exec_runtime;
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
@ -764,8 +763,7 @@ static void entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
|
||||||
if (delta_exec > ideal_runtime)
|
if (delta_exec > ideal_runtime)
|
||||||
gran = 0;
|
gran = 0;
|
||||||
|
|
||||||
if (__check_preempt_curr_fair(cfs_rq, next, curr, gran))
|
__check_preempt_curr_fair(cfs_rq, next, curr, gran);
|
||||||
curr->prev_sum_exec_runtime = curr->sum_exec_runtime;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************
|
/**************************************************
|
||||||
|
|
Loading…
Reference in New Issue
Block a user