ia64/linux-2.6.18-xen.hg

view arch/alpha/kernel/irq_impl.h @ 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
line source
1 /*
2 * linux/arch/alpha/kernel/irq_impl.h
3 *
4 * Copyright (C) 1995 Linus Torvalds
5 * Copyright (C) 1998, 2000 Richard Henderson
6 *
7 * This file contains declarations and inline functions for interfacing
8 * with the IRQ handling routines in irq.c.
9 */
11 #include <linux/interrupt.h>
12 #include <linux/irq.h>
13 #include <linux/profile.h>
16 #define RTC_IRQ 8
18 extern void isa_device_interrupt(unsigned long, struct pt_regs *);
19 extern void isa_no_iack_sc_device_interrupt(unsigned long, struct pt_regs *);
20 extern void srm_device_interrupt(unsigned long, struct pt_regs *);
21 extern void pyxis_device_interrupt(unsigned long, struct pt_regs *);
23 extern struct irqaction timer_irqaction;
24 extern struct irqaction isa_cascade_irqaction;
25 extern struct irqaction timer_cascade_irqaction;
26 extern struct irqaction halt_switch_irqaction;
28 extern void init_srm_irqs(long, unsigned long);
29 extern void init_pyxis_irqs(unsigned long);
30 extern void init_rtc_irq(void);
32 extern void common_init_isa_dma(void);
34 extern void i8259a_enable_irq(unsigned int);
35 extern void i8259a_disable_irq(unsigned int);
36 extern void i8259a_mask_and_ack_irq(unsigned int);
37 extern unsigned int i8259a_startup_irq(unsigned int);
38 extern void i8259a_end_irq(unsigned int);
39 extern struct hw_interrupt_type i8259a_irq_type;
40 extern void init_i8259a_irqs(void);
42 extern void handle_irq(int irq, struct pt_regs * regs);