ia64/linux-2.6.18-xen.hg

view Documentation/hw_random.txt @ 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 Hardware driver for Intel/AMD/VIA Random Number Generators (RNG)
2 Copyright 2000,2001 Jeff Garzik <jgarzik@pobox.com>
3 Copyright 2000,2001 Philipp Rumpf <prumpf@mandrakesoft.com>
5 Introduction:
7 The hw_random device driver is software that makes use of a
8 special hardware feature on your CPU or motherboard,
9 a Random Number Generator (RNG).
11 In order to make effective use of this device driver, you
12 should download the support software as well. Download the
13 latest version of the "rng-tools" package from the
14 hw_random driver's official Web site:
16 http://sourceforge.net/projects/gkernel/
18 About the Intel RNG hardware, from the firmware hub datasheet:
20 The Firmware Hub integrates a Random Number Generator (RNG)
21 using thermal noise generated from inherently random quantum
22 mechanical properties of silicon. When not generating new random
23 bits the RNG circuitry will enter a low power state. Intel will
24 provide a binary software driver to give third party software
25 access to our RNG for use as a security feature. At this time,
26 the RNG is only to be used with a system in an OS-present state.
28 Theory of operation:
30 Character driver. Using the standard open()
31 and read() system calls, you can read random data from
32 the hardware RNG device. This data is NOT CHECKED by any
33 fitness tests, and could potentially be bogus (if the
34 hardware is faulty or has been tampered with). Data is only
35 output if the hardware "has-data" flag is set, but nevertheless
36 a security-conscious person would run fitness tests on the
37 data before assuming it is truly random.
39 /dev/hwrandom is char device major 10, minor 183.
41 Driver notes:
43 * FIXME: support poll(2)
45 NOTE: request_mem_region was removed, for two reasons:
46 1) Only one RNG is supported by this driver, 2) The location
47 used by the RNG is a fixed location in MMIO-addressable memory,
48 3) users with properly working BIOS e820 handling will always
49 have the region in which the RNG is located reserved, so
50 request_mem_region calls always fail for proper setups.
51 However, for people who use mem=XX, BIOS e820 information is
52 -not- in /proc/iomem, and request_mem_region(RNG_ADDR) can
53 succeed.
55 Driver details:
57 Based on:
58 Intel 82802AB/82802AC Firmware Hub (FWH) Datasheet
59 May 1999 Order Number: 290658-002 R
61 Intel 82802 Firmware Hub: Random Number Generator
62 Programmer's Reference Manual
63 December 1999 Order Number: 298029-001 R
65 Intel 82802 Firmware HUB Random Number Generator Driver
66 Copyright (c) 2000 Matt Sottek <msottek@quiknet.com>
68 Special thanks to Matt Sottek. I did the "guts", he
69 did the "brains" and all the testing.