ia64/xen-unstable

changeset 13:6a5ecb7d90d1

bitkeeper revision 1.7.2.1 (3dee99e5zKIwL56NUrPTsfwwlmAvsQ)

domain.c:
Avoid scheduling idle domain unnecessarily. Good for performance :-)
author kaf24@striker.cl.cam.ac.uk
date Thu Dec 05 00:12:21 2002 +0000 (2002-12-05)
parents 515c1cd5de05
children 9011ca198220
files xen-2.4.16/common/domain.c
line diff
     1.1 --- a/xen-2.4.16/common/domain.c	Tue Dec 03 19:38:21 2002 +0000
     1.2 +++ b/xen-2.4.16/common/domain.c	Thu Dec 05 00:12:21 2002 +0000
     1.3 @@ -253,7 +253,7 @@ void release_task(struct task_struct *p)
     1.4  
     1.5  asmlinkage void schedule(void)
     1.6  {
     1.7 -    struct task_struct *prev, *next, *p;
     1.8 +    struct task_struct *prev, *next;
     1.9      struct list_head *tmp;
    1.10      int this_cpu;
    1.11  
    1.12 @@ -286,11 +286,11 @@ asmlinkage void schedule(void)
    1.13      }
    1.14      clear_bit(_HYP_EVENT_NEED_RESCHED, &prev->hyp_events);
    1.15  
    1.16 +    /* Round-robin, skipping idle where possible. */
    1.17      next = NULL;
    1.18      list_for_each(tmp, &schedule_data[smp_processor_id()].runqueue) {
    1.19 -        p = list_entry(tmp, struct task_struct, run_list);
    1.20 -        next = p;
    1.21 -        break;
    1.22 +        next = list_entry(tmp, struct task_struct, run_list);
    1.23 +        if ( next->domain != IDLE_DOMAIN_ID ) break;
    1.24      }
    1.25  
    1.26      prev->has_cpu = 0;
    1.27 @@ -402,7 +402,7 @@ int setup_guestos(struct task_struct *p,
    1.28      unsigned long cur_address, end_address, alloc_address, vaddr;
    1.29      unsigned long virt_load_address, virt_stack_address, virt_shinfo_address;
    1.30      unsigned long virt_ftable_start_addr = 0, virt_ftable_end_addr;
    1.31 -    unsigned long ft_mapping = frame_table;
    1.32 +    unsigned long ft_mapping = (unsigned long)frame_table;
    1.33      unsigned int ft_size = 0;
    1.34      start_info_t  *virt_startinfo_address;
    1.35      unsigned long long time;
    1.36 @@ -410,7 +410,6 @@ int setup_guestos(struct task_struct *p,
    1.37      l1_pgentry_t *l1tab = NULL;
    1.38      struct pfn_info *page = NULL;
    1.39      net_ring_t *net_ring;
    1.40 -    blk_ring_t *blk_ring;
    1.41  
    1.42      if ( strncmp(__va(mod[0].mod_start), "XenoGues", 8) )
    1.43      {