Skip to content

Commit fd3eafd

Browse files
xzpeterIngo Molnar
authored andcommitted
sched/core: Remove rq.hrtick_csd_pending
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
1 parent e188f0a commit fd3eafd

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

kernel/sched/core.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ static void __hrtick_start(void *arg)
269269

270270
rq_lock(rq, &rf);
271271
__hrtick_restart(rq);
272-
rq->hrtick_csd_pending = 0;
273272
rq_unlock(rq, &rf);
274273
}
275274

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

294293
hrtimer_set_expires(timer, time);
295294

296-
if (rq == this_rq()) {
295+
if (rq == this_rq())
297296
__hrtick_restart(rq);
298-
} else if (!rq->hrtick_csd_pending) {
297+
else
299298
smp_call_function_single_async(cpu_of(rq), &rq->hrtick_csd);
300-
rq->hrtick_csd_pending = 1;
301-
}
302299
}
303300

304301
#else
@@ -322,8 +319,6 @@ void hrtick_start(struct rq *rq, u64 delay)
322319
static void hrtick_rq_init(struct rq *rq)
323320
{
324321
#ifdef CONFIG_SMP
325-
rq->hrtick_csd_pending = 0;
326-
327322
rq->hrtick_csd.flags = 0;
328323
rq->hrtick_csd.func = __hrtick_start;
329324
rq->hrtick_csd.info = rq;

kernel/sched/sched.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,6 @@ struct rq {
967967

968968
#ifdef CONFIG_SCHED_HRTICK
969969
#ifdef CONFIG_SMP
970-
int hrtick_csd_pending;
971970
call_single_data_t hrtick_csd;
972971
#endif
973972
struct hrtimer hrtick_timer;

0 commit comments

Comments
 (0)