ia64/xen-unstable

changeset 342:3426ef69b9dc

bitkeeper revision 1.157 (3e7e2a8f82w4Wez8Nigyi3seahCBIA)

config.h, domain.c, dom_mem_ops.c:
Fixed out-of-memory handling slightly.
author kaf24@scramble.cl.cam.ac.uk
date Sun Mar 23 21:43:43 2003 +0000 (2003-03-23)
parents 05ad6558003c
children 8c63ec842aca
files xen/common/dom_mem_ops.c xen/common/domain.c xen/include/xeno/config.h
line diff
     1.1 --- a/xen/common/dom_mem_ops.c	Sun Mar 23 15:51:53 2003 +0000
     1.2 +++ b/xen/common/dom_mem_ops.c	Sun Mar 23 21:43:43 2003 +0000
     1.3 @@ -40,7 +40,7 @@ static long alloc_dom_mem(struct task_st
     1.4  
     1.5      spin_lock_irqsave(&free_list_lock, flags);
     1.6  
     1.7 -    if ( free_pfns < (bop.size + (SLACK_DOMAIN_MEM_KILOBYTES << 
     1.8 +    if ( free_pfns < (bop.size + (SLACK_DOMAIN_MEM_KILOBYTES >> 
     1.9                                    (PAGE_SHIFT-10))) ) 
    1.10      {
    1.11          spin_unlock_irqrestore(&free_list_lock, flags);
     2.1 --- a/xen/common/domain.c	Sun Mar 23 15:51:53 2003 +0000
     2.2 +++ b/xen/common/domain.c	Sun Mar 23 21:43:43 2003 +0000
     2.3 @@ -161,7 +161,7 @@ unsigned int alloc_new_dom_mem(struct ta
     2.4      spin_lock_irqsave(&free_list_lock, flags);
     2.5      
     2.6      /* is there enough mem to serve the request? */   
     2.7 -    if ( (req_pages + (SLACK_DOMAIN_MEM_KILOBYTES << (PAGE_SHIFT-10))) >
     2.8 +    if ( (req_pages + (SLACK_DOMAIN_MEM_KILOBYTES >> (PAGE_SHIFT-10))) >
     2.9           free_pfns )
    2.10      {
    2.11          spin_unlock_irqrestore(&free_list_lock, flags);
     3.1 --- a/xen/include/xeno/config.h	Sun Mar 23 15:51:53 2003 +0000
     3.2 +++ b/xen/include/xeno/config.h	Sun Mar 23 21:43:43 2003 +0000
     3.3 @@ -89,7 +89,7 @@
     3.4   * Amount of slack domain memory to leave in system, in megabytes.
     3.5   * Prevents a hard out-of-memory crunch for thinsg like network receive.
     3.6   */
     3.7 -#define SLACK_DOMAIN_MEM_KILOBYTES 1024
     3.8 +#define SLACK_DOMAIN_MEM_KILOBYTES 2048
     3.9  
    3.10  /* Linkage for x86 */
    3.11  #define FASTCALL(x)     x __attribute__((regparm(3)))