ia64/linux-2.6.18-xen.hg

annotate arch/alpha/kernel/alpha_ksyms.c @ 897:329ea0ccb344

balloon: try harder to balloon up under memory pressure.

Currently if the balloon driver is unable to increase the guest's
reservation it assumes the failure was due to reaching its full
allocation, gives up on the ballooning operation and records the limit
it reached as the "hard limit". The driver will not try again until
the target is set again (even to the same value).

However it is possible that ballooning has in fact failed due to
memory pressure in the host and therefore it is desirable to keep
attempting to reach the target in case memory becomes available. The
most likely scenario is that some guests are ballooning down while
others are ballooning up and therefore there is temporary memory
pressure while things stabilise. You would not expect a well behaved
toolstack to ask a domain to balloon to more than its allocation nor
would you expect it to deliberately over-commit memory by setting
balloon targets which exceed the total host memory.

This patch drops the concept of a hard limit and causes the balloon
driver to retry increasing the reservation on a timer in the same
manner as when decreasing the reservation.

Also if we partially succeed in increasing the reservation
(i.e. receive less pages than we asked for) then we may as well keep
those pages rather than returning them to Xen.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 05 14:01:20 2009 +0100 (2009-06-05)
parents 831230e53067
children
rev   line source
ian@0 1 /*
ian@0 2 * linux/arch/alpha/kernel/ksyms.c
ian@0 3 *
ian@0 4 * Export the alpha-specific functions that are needed for loadable
ian@0 5 * modules.
ian@0 6 */
ian@0 7
ian@0 8 #include <linux/module.h>
ian@0 9 #include <linux/string.h>
ian@0 10 #include <linux/user.h>
ian@0 11 #include <linux/elfcore.h>
ian@0 12 #include <linux/socket.h>
ian@0 13 #include <linux/syscalls.h>
ian@0 14 #include <linux/in.h>
ian@0 15 #include <linux/in6.h>
ian@0 16 #include <linux/pci.h>
ian@0 17 #include <linux/screen_info.h>
ian@0 18 #include <linux/tty.h>
ian@0 19 #include <linux/mm.h>
ian@0 20 #include <linux/delay.h>
ian@0 21 #include <linux/dma-mapping.h>
ian@0 22
ian@0 23 #include <asm/io.h>
ian@0 24 #include <asm/console.h>
ian@0 25 #include <asm/hwrpb.h>
ian@0 26 #include <asm/uaccess.h>
ian@0 27 #include <asm/processor.h>
ian@0 28 #include <asm/checksum.h>
ian@0 29 #include <linux/interrupt.h>
ian@0 30 #include <asm/fpu.h>
ian@0 31 #include <asm/irq.h>
ian@0 32 #include <asm/machvec.h>
ian@0 33 #include <asm/pgalloc.h>
ian@0 34 #include <asm/semaphore.h>
ian@0 35 #include <asm/tlbflush.h>
ian@0 36 #include <asm/cacheflush.h>
ian@0 37 #include <asm/vga.h>
ian@0 38
ian@0 39 #define __KERNEL_SYSCALLS__
ian@0 40 #include <asm/unistd.h>
ian@0 41
ian@0 42 extern struct hwrpb_struct *hwrpb;
ian@0 43 extern spinlock_t rtc_lock;
ian@0 44
ian@0 45 /* these are C runtime functions with special calling conventions: */
ian@0 46 extern void __divl (void);
ian@0 47 extern void __reml (void);
ian@0 48 extern void __divq (void);
ian@0 49 extern void __remq (void);
ian@0 50 extern void __divlu (void);
ian@0 51 extern void __remlu (void);
ian@0 52 extern void __divqu (void);
ian@0 53 extern void __remqu (void);
ian@0 54
ian@0 55 EXPORT_SYMBOL(alpha_mv);
ian@0 56 EXPORT_SYMBOL(screen_info);
ian@0 57 EXPORT_SYMBOL(perf_irq);
ian@0 58 EXPORT_SYMBOL(callback_getenv);
ian@0 59 EXPORT_SYMBOL(callback_setenv);
ian@0 60 EXPORT_SYMBOL(callback_save_env);
ian@0 61 #ifdef CONFIG_ALPHA_GENERIC
ian@0 62 EXPORT_SYMBOL(alpha_using_srm);
ian@0 63 #endif /* CONFIG_ALPHA_GENERIC */
ian@0 64
ian@0 65 /* platform dependent support */
ian@0 66 EXPORT_SYMBOL(strcat);
ian@0 67 EXPORT_SYMBOL(strcpy);
ian@0 68 EXPORT_SYMBOL(strlen);
ian@0 69 EXPORT_SYMBOL(strncpy);
ian@0 70 EXPORT_SYMBOL(strncat);
ian@0 71 EXPORT_SYMBOL(strchr);
ian@0 72 EXPORT_SYMBOL(strrchr);
ian@0 73 EXPORT_SYMBOL(memmove);
ian@0 74 EXPORT_SYMBOL(__memcpy);
ian@0 75 EXPORT_SYMBOL(__memset);
ian@0 76 EXPORT_SYMBOL(__memsetw);
ian@0 77 EXPORT_SYMBOL(__constant_c_memset);
ian@0 78 EXPORT_SYMBOL(copy_page);
ian@0 79 EXPORT_SYMBOL(clear_page);
ian@0 80
ian@0 81 EXPORT_SYMBOL(__direct_map_base);
ian@0 82 EXPORT_SYMBOL(__direct_map_size);
ian@0 83
ian@0 84 #ifdef CONFIG_PCI
ian@0 85 EXPORT_SYMBOL(pci_alloc_consistent);
ian@0 86 EXPORT_SYMBOL(pci_free_consistent);
ian@0 87 EXPORT_SYMBOL(pci_map_single);
ian@0 88 EXPORT_SYMBOL(pci_map_page);
ian@0 89 EXPORT_SYMBOL(pci_unmap_single);
ian@0 90 EXPORT_SYMBOL(pci_unmap_page);
ian@0 91 EXPORT_SYMBOL(pci_map_sg);
ian@0 92 EXPORT_SYMBOL(pci_unmap_sg);
ian@0 93 EXPORT_SYMBOL(pci_dma_supported);
ian@0 94 EXPORT_SYMBOL(pci_dac_dma_supported);
ian@0 95 EXPORT_SYMBOL(pci_dac_page_to_dma);
ian@0 96 EXPORT_SYMBOL(pci_dac_dma_to_page);
ian@0 97 EXPORT_SYMBOL(pci_dac_dma_to_offset);
ian@0 98 EXPORT_SYMBOL(alpha_gendev_to_pci);
ian@0 99 #endif
ian@0 100 EXPORT_SYMBOL(dma_set_mask);
ian@0 101
ian@0 102 EXPORT_SYMBOL(dump_thread);
ian@0 103 EXPORT_SYMBOL(dump_elf_thread);
ian@0 104 EXPORT_SYMBOL(dump_elf_task);
ian@0 105 EXPORT_SYMBOL(dump_elf_task_fp);
ian@0 106 EXPORT_SYMBOL(hwrpb);
ian@0 107 EXPORT_SYMBOL(start_thread);
ian@0 108 EXPORT_SYMBOL(alpha_read_fp_reg);
ian@0 109 EXPORT_SYMBOL(alpha_read_fp_reg_s);
ian@0 110 EXPORT_SYMBOL(alpha_write_fp_reg);
ian@0 111 EXPORT_SYMBOL(alpha_write_fp_reg_s);
ian@0 112
ian@0 113 /* In-kernel system calls. */
ian@0 114 EXPORT_SYMBOL(kernel_thread);
ian@0 115 EXPORT_SYMBOL(sys_dup);
ian@0 116 EXPORT_SYMBOL(sys_exit);
ian@0 117 EXPORT_SYMBOL(sys_write);
ian@0 118 EXPORT_SYMBOL(sys_lseek);
ian@0 119 EXPORT_SYMBOL(execve);
ian@0 120 EXPORT_SYMBOL(sys_setsid);
ian@0 121 EXPORT_SYMBOL(sys_wait4);
ian@0 122
ian@0 123 /* Networking helper routines. */
ian@0 124 EXPORT_SYMBOL(csum_tcpudp_magic);
ian@0 125 EXPORT_SYMBOL(ip_compute_csum);
ian@0 126 EXPORT_SYMBOL(ip_fast_csum);
ian@0 127 EXPORT_SYMBOL(csum_partial_copy_nocheck);
ian@0 128 EXPORT_SYMBOL(csum_partial_copy_from_user);
ian@0 129 EXPORT_SYMBOL(csum_ipv6_magic);
ian@0 130
ian@0 131 #ifdef CONFIG_MATHEMU_MODULE
ian@0 132 extern long (*alpha_fp_emul_imprecise)(struct pt_regs *, unsigned long);
ian@0 133 extern long (*alpha_fp_emul) (unsigned long pc);
ian@0 134 EXPORT_SYMBOL(alpha_fp_emul_imprecise);
ian@0 135 EXPORT_SYMBOL(alpha_fp_emul);
ian@0 136 #endif
ian@0 137
ian@0 138 #ifdef CONFIG_ALPHA_BROKEN_IRQ_MASK
ian@0 139 EXPORT_SYMBOL(__min_ipl);
ian@0 140 #endif
ian@0 141
ian@0 142 /*
ian@0 143 * The following are specially called from the uaccess assembly stubs.
ian@0 144 */
ian@0 145 EXPORT_SYMBOL(__copy_user);
ian@0 146 EXPORT_SYMBOL(__do_clear_user);
ian@0 147 EXPORT_SYMBOL(__strncpy_from_user);
ian@0 148 EXPORT_SYMBOL(__strnlen_user);
ian@0 149
ian@0 150 /* Semaphore helper functions. */
ian@0 151 EXPORT_SYMBOL(__down_failed);
ian@0 152 EXPORT_SYMBOL(__down_failed_interruptible);
ian@0 153 EXPORT_SYMBOL(__up_wakeup);
ian@0 154 EXPORT_SYMBOL(down);
ian@0 155 EXPORT_SYMBOL(down_interruptible);
ian@0 156 EXPORT_SYMBOL(down_trylock);
ian@0 157 EXPORT_SYMBOL(up);
ian@0 158
ian@0 159 /*
ian@0 160 * SMP-specific symbols.
ian@0 161 */
ian@0 162
ian@0 163 #ifdef CONFIG_SMP
ian@0 164 EXPORT_SYMBOL(flush_tlb_mm);
ian@0 165 EXPORT_SYMBOL(flush_tlb_range);
ian@0 166 EXPORT_SYMBOL(flush_tlb_page);
ian@0 167 EXPORT_SYMBOL(smp_imb);
ian@0 168 EXPORT_SYMBOL(cpu_data);
ian@0 169 EXPORT_SYMBOL(smp_num_cpus);
ian@0 170 EXPORT_SYMBOL(smp_call_function);
ian@0 171 EXPORT_SYMBOL(smp_call_function_on_cpu);
ian@0 172 EXPORT_SYMBOL(_atomic_dec_and_lock);
ian@0 173 #endif /* CONFIG_SMP */
ian@0 174
ian@0 175 /*
ian@0 176 * NUMA specific symbols
ian@0 177 */
ian@0 178 #ifdef CONFIG_DISCONTIGMEM
ian@0 179 EXPORT_SYMBOL(node_data);
ian@0 180 #endif /* CONFIG_DISCONTIGMEM */
ian@0 181
ian@0 182 EXPORT_SYMBOL(rtc_lock);
ian@0 183
ian@0 184 /*
ian@0 185 * The following are special because they're not called
ian@0 186 * explicitly (the C compiler or assembler generates them in
ian@0 187 * response to division operations). Fortunately, their
ian@0 188 * interface isn't gonna change any time soon now, so it's OK
ian@0 189 * to leave it out of version control.
ian@0 190 */
ian@0 191 # undef memcpy
ian@0 192 # undef memset
ian@0 193 EXPORT_SYMBOL(__divl);
ian@0 194 EXPORT_SYMBOL(__divlu);
ian@0 195 EXPORT_SYMBOL(__divq);
ian@0 196 EXPORT_SYMBOL(__divqu);
ian@0 197 EXPORT_SYMBOL(__reml);
ian@0 198 EXPORT_SYMBOL(__remlu);
ian@0 199 EXPORT_SYMBOL(__remq);
ian@0 200 EXPORT_SYMBOL(__remqu);
ian@0 201 EXPORT_SYMBOL(memcpy);
ian@0 202 EXPORT_SYMBOL(memset);
ian@0 203 EXPORT_SYMBOL(memchr);
ian@0 204
ian@0 205 #ifdef CONFIG_ALPHA_IRONGATE
ian@0 206 EXPORT_SYMBOL(irongate_ioremap);
ian@0 207 EXPORT_SYMBOL(irongate_iounmap);
ian@0 208 #endif