Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86321
b: refs/heads/master
c: 6892b75
h: refs/heads/master
i:
  86319: c3039fb
v: v3
  • Loading branch information
Ingo Molnar committed Feb 25, 2008
1 parent cc68f6b commit be11249
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 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: cf3680b90c7842cf91ed857ac4528f4e057da366
refs/heads/master: 6892b75e60557a48c01d57ba320419a9e2ce9846
2 changes: 1 addition & 1 deletion trunk/kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
}
/* Emit the output into the temporary buffer */
printed_len += vscnprintf(printk_buf + printed_len,
sizeof(printk_buf) - printed_len, fmt, args);
sizeof(printk_buf), fmt, args);

/*
* Copy the output into log_buf. If the caller didn't provide
Expand Down
14 changes: 10 additions & 4 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,8 @@ const_debug unsigned int sysctl_sched_nr_migrate = 32;
*/
unsigned int sysctl_sched_rt_period = 1000000;

static __read_mostly int scheduler_running;

/*
* part of the period that we allow rt tasks to run in us.
* default: 0.95s
Expand All @@ -689,14 +691,16 @@ unsigned long long cpu_clock(int cpu)
unsigned long flags;
struct rq *rq;

local_irq_save(flags);
rq = cpu_rq(cpu);
/*
* Only call sched_clock() if the scheduler has already been
* initialized (some code might call cpu_clock() very early):
*/
if (rq->idle)
update_rq_clock(rq);
if (unlikely(!scheduler_running))
return 0;

local_irq_save(flags);
rq = cpu_rq(cpu);
update_rq_clock(rq);
now = rq->clock;
local_irq_restore(flags);

Expand Down Expand Up @@ -7284,6 +7288,8 @@ void __init sched_init(void)
* During early bootup we pretend to be a normal task:
*/
current->sched_class = &fair_sched_class;

scheduler_running = 1;
}

#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
Expand Down

0 comments on commit be11249

Please sign in to comment.