ia64/xen-unstable

changeset 980:a822251cfa9b

bitkeeper revision 1.633 (3fc09b3aBu9Z_PNCl6Nd9mfFp6gtGA)

ide-xeno.c, xen_block.c, domain.c, xen_cpuperf.c:
Bug fixes and cleanups.
author kaf24@scramble.cl.cam.ac.uk
date Sun Nov 23 11:34:18 2003 +0000 (2003-11-23)
parents e392f2509f23
children 88ef6048499a
files tools/misc/xen_cpuperf.c xen/common/domain.c xen/drivers/block/xen_block.c xen/drivers/ide/ide-xeno.c
line diff
     1.1 --- a/tools/misc/xen_cpuperf.c	Sat Nov 22 17:06:38 2003 +0000
     1.2 +++ b/tools/misc/xen_cpuperf.c	Sun Nov 23 11:34:18 2003 +0000
     1.3 @@ -16,7 +16,7 @@
     1.4  #include <string.h>
     1.5  
     1.6  #include "p4perf.h"
     1.7 -#include "libxc_private.h"
     1.8 +#include "xc_private.h"
     1.9  
    1.10  void dom0_wrmsr( int privfd,
    1.11                   int cpu_mask, 
     2.1 --- a/xen/common/domain.c	Sat Nov 22 17:06:38 2003 +0000
     2.2 +++ b/xen/common/domain.c	Sun Nov 23 11:34:18 2003 +0000
     2.3 @@ -440,7 +440,12 @@ int setup_guestos(struct task_struct *p,
     2.4          return -1;
     2.5      }
     2.6  
     2.7 -    if ( alloc_new_dom_mem(p, params->memory_kb) ) return -ENOMEM;
     2.8 +    if ( alloc_new_dom_mem(p, params->memory_kb) )
     2.9 +    {
    2.10 +        printk("DOM%d: Not enough memory --- reduce dom0_mem ??\n", dom);
    2.11 +        return -ENOMEM;
    2.12 +    }
    2.13 +
    2.14      alloc_address = list_entry(p->pg_head.prev, struct pfn_info, list) -
    2.15          frame_table;
    2.16      alloc_address <<= PAGE_SHIFT;
     3.1 --- a/xen/drivers/block/xen_block.c	Sat Nov 22 17:06:38 2003 +0000
     3.2 +++ b/xen/drivers/block/xen_block.c	Sun Nov 23 11:34:18 2003 +0000
     3.3 @@ -20,7 +20,7 @@
     3.4  #include <xeno/vbd.h>
     3.5  #include <xeno/slab.h>
     3.6  
     3.7 -#if 1
     3.8 +#if 0
     3.9  #define DPRINTK(_f, _a...) printk( _f , ## _a )
    3.10  #else
    3.11  #define DPRINTK(_f, _a...) ((void)0)
    3.12 @@ -624,15 +624,17 @@ static void make_response(struct task_st
    3.13  
    3.14  static void dump_blockq(u_char key, void *dev_id, struct pt_regs *regs) 
    3.15  {
    3.16 +    unsigned long flags;
    3.17      struct task_struct *p;
    3.18      blk_ring_t *blk_ring ;
    3.19 +    int i;
    3.20  
    3.21      printk("Dumping block queue stats: nr_pending = %d (prod=%d,cons=%d)\n",
    3.22             atomic_read(&nr_pending), pending_prod, pending_cons);
    3.23  
    3.24 -    p = current->next_task;
    3.25 -    do
    3.26 -    {
    3.27 +    read_lock_irqsave(&tasklist_lock, flags);
    3.28 +    p = &idle0_task;
    3.29 +    do {
    3.30          if ( !is_idle_task(p) )
    3.31          {
    3.32              printk("Domain: %d\n", p->domain);
    3.33 @@ -644,7 +646,17 @@ static void dump_blockq(u_char key, void
    3.34                     __on_blkdev_list(p));
    3.35          }
    3.36          p = p->next_task;
    3.37 -    } while (p != current);
    3.38 +    } 
    3.39 +    while ( (p = p->next_task) != &idle0_task );
    3.40 +    read_unlock_irqrestore(&tasklist_lock, flags);
    3.41 +
    3.42 +    for ( i = 0; i < MAX_PENDING_REQS; i++ )
    3.43 +    {
    3.44 +        printk("Pend%d: dom=%p, id=%08lx, cnt=%d, op=%d, status=%d\n",
    3.45 +               i, pending_reqs[i].domain, pending_reqs[i].id,
    3.46 +               atomic_read(&pending_reqs[i].pendcnt), 
    3.47 +               pending_reqs[i].operation, pending_reqs[i].status);
    3.48 +    }
    3.49  }
    3.50  
    3.51  /* Start-of-day initialisation for a new domain. */
     4.1 --- a/xen/drivers/ide/ide-xeno.c	Sat Nov 22 17:06:38 2003 +0000
     4.2 +++ b/xen/drivers/ide/ide-xeno.c	Sun Nov 23 11:34:18 2003 +0000
     4.3 @@ -65,7 +65,7 @@ int ide_probe_devices(xen_disk_info_t* x
     4.4  		cur_disk.info |= XD_FLAG_RO; 
     4.5  
     4.6  	    cur_disk.capacity = current_capacity(drive);
     4.7 -	    cur_disk.domain   = 0; /* 'physical' disks belong to domain 0 
     4.8 +	    cur_disk.domain   = 0; /* 'physical' disks belong to domain 0 */
     4.9  
    4.10  	    /* Now copy into relevant part of user-space buffer */
    4.11  	    if((ret = copy_to_user(xdi->disks + xdi->count, &cur_disk,