remove CONFIG_SCHED_HRTICK
Subsystems (2)
PATCH 1/1 remove CONFIG_SCHED_HRTICK
It's equivalent to CONFIG_HIGH_RES_TIMERS now that all architectures use the generic helpers it relies on.
arch/arm/Kconfig +0 -6
@@ -1655,12 +1655,6 @@ config HZ default 500 if HZ_500 default 1000 -config SCHED_HRTICK - def_bool HIGH_RES_TIMERS - -config SCHED_HRTICK - def_bool HIGH_RES_TIMERS - config THUMB2_KERNEL bool "Compile the kernel in Thumb-2 mode" if !CPU_THUMBONLY depends on (CPU_V7 || CPU_V7M) && !CPU_V6 && !CPU_V6K
kernel/Kconfig.hz +0 -3
@@ -53,6 +53,3 @@ config HZ default 250 if HZ_250 default 300 if HZ_300 default 1000 if HZ_1000 - -config SCHED_HRTICK - def_bool HIGH_RES_TIMERS
kernel/sched/core.c +3 -3
@@ -367,7 +367,7 @@ static struct rq *this_rq_lock(void)return rq; } -#ifdef CONFIG_SCHED_HRTICK +#ifdef CONFIG_HIGH_RES_TIMERS /* * Use HR-timers to deliver accurate preemption points. */
@@ -492,7 +492,7 @@ static void init_rq_hrtick(struct rq *rq)hrtimer_init (&rq->hrtick_timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); rq->hrtick_timer.function = hrtick; } -#else /* CONFIG_SCHED_HRTICK */ +#else /* CONFIG_HIGH_RES_TIMERS */ static inline void hrtick_clear (struct rq *rq) { }
@@ -504,7 +504,7 @@ static inline void init_rq_hrtick(struct rq *rq)static inline void init_hrtick (void ) { } -#endif /* CONFIG_SCHED_HRTICK */ +#endif /* CONFIG_HIGH_RES_TIMERS */ /* * resched_task - mark a task 'to be rescheduled now'.
kernel/sched/fair.c +1 -1
@@ -2034,7 +2034,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued)update_cfs_rq_blocked_load (cfs_rq,1 );update_cfs_shares (cfs_rq); -#ifdef CONFIG_SCHED_HRTICK +#ifdef CONFIG_HIGH_RES_TIMERS /* * queued ticks are scheduled to match the slice, so don't bother * validating it and just reschedule.
kernel/sched/sched.h +3 -3
@@ -492,7 +492,7 @@ struct rq {unsigned long calc_load_update;long calc_load_active; -#ifdef CONFIG_SCHED_HRTICK +#ifdef CONFIG_HIGH_RES_TIMERS #ifdef CONFIG_SMP int hrtick_csd_pending;struct call_single_data hrtick_csd;
@@ -1103,7 +1103,7 @@ static inline u64 sched_avg_period(void)return (u64 )sysctl_sched_time_avg *NSEC_PER_MSEC /2 ; } -#ifdef CONFIG_SCHED_HRTICK +#ifdef CONFIG_HIGH_RES_TIMERS /* * Use hrtick when:
@@ -1128,7 +1128,7 @@ static inline int hrtick_enabled(struct rq *rq) return 0; } -#endif /* CONFIG_SCHED_HRTICK */ +#endif /* CONFIG_HIGH_RES_TIMERS */ #ifdef CONFIG_SMP extern void sched_avg_update (struct rq *rq);
Quoted 2 lines · Christoph Hellwig
It's equivalent to
CONFIG_HIGH_RES_TIMERSnow that all architectures use the generic helpers it relies on.
So the SCHED_HRTICK variable documents the scheduler's dependencies here. It currently indeed clones CONFIG_HIGH_RES_TIMERS, but that's just how it's implemented today.
If we were to enable this feature more widely in the future (it's expensive right now so disabled by default at the moment) then it will be much easier to just change.
That said, while checking the background of the changes here ran across two ARM commits that I don't really like:
commit c9218b163959fafa76ffbee0baa3ef269838f410
Author: Russell King <[email protected]>
Date: Sat Apr 27 23:31:10 2013 +0100
ARM: Allow selection HZ values
this commit introduced a nonsensical duplication:
+config SCHED_HRTICK
+ def_bool HIGH_RES_TIMERS
config SCHED_HRTICK
def_bool HIGH_RES_TIMERS
Plus:
commit b28748fb5d21d5d64c9ce31579ffbbd41f317042
Author: Russell King <[email protected]>
Date: Sun Feb 17 14:40:33 2013 +0000
ARM: add SCHED_HRTICK config option
As we don't include kernel/Kconfig.hz as this defines HZ values unsuitable for ARM platforms, add the SCHED_HRTICK to properly configure the scheduler for hrtimer operation.
... so if kernel/Kconfig.hz is 'unsuitable for ARM platforms' how about fixing it properly and making init/Kconfig.hz suitable for ARM, instead of duplicating its options in arch/arm/Kconfig in a messy fashion?
Thanks,
Ingo