Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73398
b: refs/heads/master
c: d6322fa
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and Ingo Molnar committed Nov 9, 2007
1 parent e959922 commit 0758aa7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 19978ca610946ed57c071bad63f8f6642ca1298b
refs/heads/master: d6322faf296ab5bbb597f8b0abcb50153754cd08
8 changes: 4 additions & 4 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
*/
unsigned long long __attribute__((weak)) sched_clock(void)
{
return (unsigned long long)jiffies * (1000000000 / HZ);
return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ);
}

/*
Expand All @@ -99,8 +99,8 @@ unsigned long long __attribute__((weak)) sched_clock(void)
/*
* Some helpers for converting nanosecond timing to jiffy resolution
*/
#define NS_TO_JIFFIES(TIME) ((unsigned long)(TIME) / (1000000000 / HZ))
#define JIFFIES_TO_NS(TIME) ((TIME) * (1000000000 / HZ))
#define NS_TO_JIFFIES(TIME) ((unsigned long)(TIME) / (NSEC_PER_SEC / HZ))
#define JIFFIES_TO_NS(TIME) ((TIME) * (NSEC_PER_SEC / HZ))

#define NICE_0_LOAD SCHED_LOAD_SCALE
#define NICE_0_SHIFT SCHED_LOAD_SHIFT
Expand Down Expand Up @@ -7256,7 +7256,7 @@ static u64 cpu_usage_read(struct cgroup *cgrp, struct cftype *cft)
spin_unlock_irqrestore(&cpu_rq(i)->lock, flags);
}
/* Convert from ns to ms */
do_div(res, 1000000);
do_div(res, NSEC_PER_MSEC);

return res;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/kernel/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ static struct ctl_table root_table[] = {

#ifdef CONFIG_SCHED_DEBUG
static unsigned long min_sched_granularity_ns = 100000; /* 100 usecs */
static unsigned long max_sched_granularity_ns = 1000000000; /* 1 second */
static unsigned long max_sched_granularity_ns = NSEC_PER_SEC; /* 1 second */
static unsigned long min_wakeup_granularity_ns; /* 0 usecs */
static unsigned long max_wakeup_granularity_ns = 1000000000; /* 1 second */
static unsigned long max_wakeup_granularity_ns = NSEC_PER_SEC; /* 1 second */
#endif

static struct ctl_table kern_table[] = {
Expand Down

0 comments on commit 0758aa7

Please sign in to comment.