ia64/xen-unstable

changeset 3741:6062bb54a227

bitkeeper revision 1.1159.223.81 (42091872lrObHIRNczDaqDeQw3NmyA)

debug memory audit cleanups + comment fix from Jon Mason.
Signed-off-by: ian.pratt@cl.cam.ac.uk
author iap10@freefall.cl.cam.ac.uk
date Tue Feb 08 19:52:18 2005 +0000 (2005-02-08)
parents 0823f72cd071
children d1e1c9854420 73484d0fa776
files linux-2.6.10-xen-sparse/drivers/xen/netback/netback.c xen/arch/x86/domain.c xen/arch/x86/memory.c
line diff
     1.1 --- a/linux-2.6.10-xen-sparse/drivers/xen/netback/netback.c	Tue Feb 08 15:43:01 2005 +0000
     1.2 +++ b/linux-2.6.10-xen-sparse/drivers/xen/netback/netback.c	Tue Feb 08 19:52:18 2005 +0000
     1.3 @@ -1,11 +1,11 @@
     1.4  /******************************************************************************
     1.5 - * arch/xen/drivers/netif/backend/main.c
     1.6 + * drivers/xen/netback/netback.c
     1.7   * 
     1.8 - * Back-end of the driver for virtual block devices. This portion of the
     1.9 - * driver exports a 'unified' block-device interface that can be accessed
    1.10 + * Back-end of the driver for virtual network devices. This portion of the
    1.11 + * driver exports a 'unified' network-device interface that can be accessed
    1.12   * by any operating system that implements a compatible front end. A 
    1.13   * reference front-end implementation can be found in:
    1.14 - *  arch/xen/drivers/netif/frontend
    1.15 + *  drivers/xen/netfront/netfront.c
    1.16   * 
    1.17   * Copyright (c) 2002-2004, K A Fraser
    1.18   */
     2.1 --- a/xen/arch/x86/domain.c	Tue Feb 08 15:43:01 2005 +0000
     2.2 +++ b/xen/arch/x86/domain.c	Tue Feb 08 19:52:18 2005 +0000
     2.3 @@ -578,8 +578,11 @@ void domain_relinquish_memory(struct dom
     2.4  
     2.5      /* Drop the in-use reference to the page-table base. */
     2.6      if ( pagetable_val(d->mm.pagetable) != 0 )
     2.7 +    {
     2.8          put_page_and_type(&frame_table[pagetable_val(d->mm.pagetable) >>
     2.9                                        PAGE_SHIFT]);
    2.10 +	d->mm.pagetable = mk_pagetable(0);
    2.11 +    }
    2.12  
    2.13      /*
    2.14       * Relinquish GDT mappings. No need for explicit unmapping of the LDT as 
     3.1 --- a/xen/arch/x86/memory.c	Tue Feb 08 15:43:01 2005 +0000
     3.2 +++ b/xen/arch/x86/memory.c	Tue Feb 08 19:52:18 2005 +0000
     3.3 @@ -2098,8 +2098,8 @@ void audit_domain(struct domain *d)
     3.4  
     3.5  
     3.6      /* PHASE 1 */
     3.7 -
     3.8 -    adjust(&frame_table[pagetable_val(d->mm.pagetable)>>PAGE_SHIFT], -1, 1);
     3.9 +    if( pagetable_val(d->mm.pagetable) )
    3.10 +	adjust(&frame_table[pagetable_val(d->mm.pagetable)>>PAGE_SHIFT], -1, 1);
    3.11  
    3.12      list_ent = d->page_list.next;
    3.13      for ( i = 0; (list_ent != &d->page_list); i++ )
    3.14 @@ -2352,9 +2352,10 @@ void audit_domain(struct domain *d)
    3.15  
    3.16      spin_unlock(&d->page_alloc_lock);
    3.17  
    3.18 -    adjust(&frame_table[pagetable_val(d->mm.pagetable)>>PAGE_SHIFT], 1, 1);
    3.19 +    if( pagetable_val(d->mm.pagetable) )
    3.20 +	adjust(&frame_table[pagetable_val(d->mm.pagetable)>>PAGE_SHIFT], 1, 1);
    3.21  
    3.22 -    printk("Audit %d: Done. ctot=%d ttot=%d\n", d->id, ctot, ttot );
    3.23 +    printk("Audit %d: Done. pages=%d ctot=%d ttot=%d\n", i, d->id, ctot, ttot );
    3.24  
    3.25      if ( d != current )
    3.26          domain_unpause(d);