ia64/xen-unstable

changeset 3666:c4a7f635b2cd

bitkeeper revision 1.1159.223.68 (4204a5090n9Cd2ll6YcdL3tK2uDu1A)

Bug fix to the scheduler for writable page tables.
Don't flush the writable page tables inside __enter_scheduler()
until after we've committed to switching to another domain.

Here's the problem: if enough debugging messages are enabled (for
example, shadow mode and/or writable page tables messages), then we
can get into a situation where we *always* visit
__enter_scheduler() after every page fault and/or hypercall. If we
flush the writable page tables every time we take a page fault,
we'll never end up actually getting into the domain with write
permissions enabled to its page table.

Signed-off-by: michael.fetterman@cl.cam.ac.uk
author mafetter@fleming.research
date Sat Feb 05 10:50:49 2005 +0000 (2005-02-05)
parents e264eb30eba0
children 4f291c00af8c 6e1e447cf696
files xen/common/schedule.c
line diff
     1.1 --- a/xen/common/schedule.c	Sat Feb 05 10:31:37 2005 +0000
     1.2 +++ b/xen/common/schedule.c	Sat Feb 05 10:50:49 2005 +0000
     1.3 @@ -318,8 +318,6 @@ void __enter_scheduler(void)
     1.4      task_slice_t        next_slice;
     1.5      s32                 r_time;     /* time for new dom to run */
     1.6  
     1.7 -    cleanup_writable_pagetable(prev);
     1.8 -
     1.9      perfc_incrc(sched_run);
    1.10      
    1.11      spin_lock_irq(&schedule_data[cpu].schedule_lock);
    1.12 @@ -369,6 +367,8 @@ void __enter_scheduler(void)
    1.13      
    1.14      perfc_incrc(sched_ctx);
    1.15  
    1.16 +    cleanup_writable_pagetable(prev);
    1.17 +
    1.18  #if defined(WAKE_HISTO)
    1.19      if ( !is_idle_task(next) && next->wokenup ) {
    1.20          ulong diff = (ulong)(now - next->wokenup);