Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234581
b: refs/heads/master
c: 1aabd67
h: refs/heads/master
i:
  234579: 552c5f1
v: v3
  • Loading branch information
Torben Hohn authored and Thomas Gleixner committed Jan 31, 2011
1 parent c9b8422 commit c48fbaa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 23 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: daad8b581e7f5e21a2f79e49d57d4f6a73b26510
refs/heads/master: 1aabd67d2e97e6affdf5a7c65f442ac91ace3f85
19 changes: 5 additions & 14 deletions trunk/arch/ia64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,19 +190,10 @@ timer_interrupt (int irq, void *dev_id)

new_itm += local_cpu_data->itm_delta;

if (smp_processor_id() == time_keeper_id) {
/*
* Here we are in the timer irq handler. We have irqs locally
* disabled, but we don't know if the timer_bh is running on
* another CPU. We need to avoid to SMP race by acquiring the
* xtime_lock.
*/
write_seqlock(&xtime_lock);
do_timer(1);
local_cpu_data->itm_next = new_itm;
write_sequnlock(&xtime_lock);
} else
local_cpu_data->itm_next = new_itm;
if (smp_processor_id() == time_keeper_id)
xtime_update(1);

local_cpu_data->itm_next = new_itm;

if (time_after(new_itm, ia64_get_itc()))
break;
Expand All @@ -222,7 +213,7 @@ timer_interrupt (int irq, void *dev_id)
* comfort, we increase the safety margin by
* intentionally dropping the next tick(s). We do NOT
* update itm.next because that would force us to call
* do_timer() which in turn would let our clock run
* xtime_update() which in turn would let our clock run
* too fast (with the potentially devastating effect
* of losing monotony of time).
*/
Expand Down
13 changes: 5 additions & 8 deletions trunk/arch/ia64/xen/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,11 @@ consider_steal_time(unsigned long new_itm)
run_posix_cpu_timers(p);
delta_itm += local_cpu_data->itm_delta * (stolen + blocked);

if (cpu == time_keeper_id) {
write_seqlock(&xtime_lock);
do_timer(stolen + blocked);
local_cpu_data->itm_next = delta_itm + new_itm;
write_sequnlock(&xtime_lock);
} else {
local_cpu_data->itm_next = delta_itm + new_itm;
}
if (cpu == time_keeper_id)
xtime_update(stolen + blocked);

local_cpu_data->itm_next = delta_itm + new_itm;

per_cpu(xen_stolen_time, cpu) += NS_PER_TICK * stolen;
per_cpu(xen_blocked_time, cpu) += NS_PER_TICK * blocked;
}
Expand Down

0 comments on commit c48fbaa

Please sign in to comment.