Skip to content

Commit

Permalink
Merge branch 'sched/urgent' into sched/clock
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingo Molnar committed Jul 30, 2008
2 parents 6e86841 + 2c3d103 commit 39675e8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion kernel/Kconfig.hz
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ config HZ
default 1000 if HZ_1000

config SCHED_HRTICK
def_bool HIGH_RES_TIMERS && USE_GENERIC_SMP_HELPERS
def_bool HIGH_RES_TIMERS && (!SMP || USE_GENERIC_SMP_HELPERS)
2 changes: 1 addition & 1 deletion kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ static inline u64 global_rt_period(void)

static inline u64 global_rt_runtime(void)
{
if (sysctl_sched_rt_period < 0)
if (sysctl_sched_rt_runtime < 0)
return RUNTIME_INF;

return (u64)sysctl_sched_rt_runtime * NSEC_PER_USEC;
Expand Down
19 changes: 9 additions & 10 deletions kernel/sched_clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@
#include <linux/ktime.h>
#include <linux/module.h>

/*
* Scheduler clock - returns current time in nanosec units.
* This is default implementation.
* Architectures and sub-architectures can override this.
*/
unsigned long long __attribute__((weak)) sched_clock(void)
{
return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ);
}

#ifdef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK

Expand Down Expand Up @@ -321,16 +330,6 @@ EXPORT_SYMBOL_GPL(sched_clock_idle_wakeup_event);

#endif

/*
* Scheduler clock - returns current time in nanosec units.
* This is default implementation.
* Architectures and sub-architectures can override this.
*/
unsigned long long __attribute__((weak)) sched_clock(void)
{
return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ);
}

unsigned long long cpu_clock(int cpu)
{
unsigned long long clock;
Expand Down
2 changes: 1 addition & 1 deletion kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p)
* doesn't make sense. Rely on vruntime for fairness.
*/
if (rq->curr != p)
delta = max(10000LL, delta);
delta = max_t(s64, 10000LL, delta);

hrtick_start(rq, delta);
}
Expand Down

0 comments on commit 39675e8

Please sign in to comment.