Skip to content

Commit

Permalink
sched/core: Remove rq.hrtick_csd_pending
Browse files Browse the repository at this point in the history
Now smp_call_function_single_async() provides the protection that
we'll return with -EBUSY if the csd object is still pending, then we
don't need the rq.hrtick_csd_pending any more.

Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lkml.kernel.org/r/20191216213125.9536-4-peterx@redhat.com
  • Loading branch information
Peter Xu authored and Ingo Molnar committed Mar 6, 2020
1 parent e188f0a commit fd3eafd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
9 changes: 2 additions & 7 deletions kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ static void __hrtick_start(void *arg)

rq_lock(rq, &rf);
__hrtick_restart(rq);
rq->hrtick_csd_pending = 0;
rq_unlock(rq, &rf);
}

Expand All @@ -293,12 +292,10 @@ void hrtick_start(struct rq *rq, u64 delay)

hrtimer_set_expires(timer, time);

if (rq == this_rq()) {
if (rq == this_rq())
__hrtick_restart(rq);
} else if (!rq->hrtick_csd_pending) {
else
smp_call_function_single_async(cpu_of(rq), &rq->hrtick_csd);
rq->hrtick_csd_pending = 1;
}
}

#else
Expand All @@ -322,8 +319,6 @@ void hrtick_start(struct rq *rq, u64 delay)
static void hrtick_rq_init(struct rq *rq)
{
#ifdef CONFIG_SMP
rq->hrtick_csd_pending = 0;

rq->hrtick_csd.flags = 0;
rq->hrtick_csd.func = __hrtick_start;
rq->hrtick_csd.info = rq;
Expand Down
1 change: 0 additions & 1 deletion kernel/sched/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,6 @@ struct rq {

#ifdef CONFIG_SCHED_HRTICK
#ifdef CONFIG_SMP
int hrtick_csd_pending;
call_single_data_t hrtick_csd;
#endif
struct hrtimer hrtick_timer;
Expand Down

0 comments on commit fd3eafd

Please sign in to comment.