diff options
author | Jens Axboe <axboe@kernel.dk> | 2013-07-02 02:31:48 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-07-02 02:31:48 -0400 |
commit | 5f0e5afa0de4522abb3ea7d1369039b94e740ec5 (patch) | |
tree | 6a5be3db9ecfed8ef2150c6146f6d1e0d658ac8b /drivers/xen/xen-selfballoon.c | |
parent | d752b2696072ed52fd5afab08b601e2220a3b87e (diff) | |
parent | 9e895ace5d82df8929b16f58e9f515f6d54ab82d (diff) |
Merge tag 'v3.10-rc7' into for-3.11/drivers
Linux 3.10-rc7
Pull this in early to avoid doing it with the bcache merge,
since there are a number of changes to bcache between my old
base (3.10-rc1) and the new pull request.
Diffstat (limited to 'drivers/xen/xen-selfballoon.c')
-rw-r--r-- | drivers/xen/xen-selfballoon.c | 47 |
1 files changed, 6 insertions, 41 deletions
diff --git a/drivers/xen/xen-selfballoon.c b/drivers/xen/xen-selfballoon.c index f2ef569c7cc1..f70984a892aa 100644 --- a/drivers/xen/xen-selfballoon.c +++ b/drivers/xen/xen-selfballoon.c | |||
@@ -53,15 +53,12 @@ | |||
53 | * System configuration note: Selfballooning should not be enabled on | 53 | * System configuration note: Selfballooning should not be enabled on |
54 | * systems without a sufficiently large swap device configured; for best | 54 | * systems without a sufficiently large swap device configured; for best |
55 | * results, it is recommended that total swap be increased by the size | 55 | * results, it is recommended that total swap be increased by the size |
56 | * of the guest memory. Also, while technically not required to be | 56 | * of the guest memory. Note, that selfballooning should be disabled by default |
57 | * configured, it is highly recommended that frontswap also be configured | 57 | * if frontswap is not configured. Similarly selfballooning should be enabled |
58 | * and enabled when selfballooning is running. So, selfballooning | 58 | * by default if frontswap is configured and can be disabled with the |
59 | * is disabled by default if frontswap is not configured and can only | 59 | * "tmem.selfballooning=0" kernel boot option. Finally, when frontswap is |
60 | * be enabled with the "selfballooning" kernel boot option; similarly | 60 | * configured, frontswap-selfshrinking can be disabled with the |
61 | * selfballooning is enabled by default if frontswap is configured and | 61 | * "tmem.selfshrink=0" kernel boot option. |
62 | * can be disabled with the "noselfballooning" kernel boot option. Finally, | ||
63 | * when frontswap is configured, frontswap-selfshrinking can be disabled | ||
64 | * with the "noselfshrink" kernel boot option. | ||
65 | * | 62 | * |
66 | * Selfballooning is disallowed in domain0 and force-disabled. | 63 | * Selfballooning is disallowed in domain0 and force-disabled. |
67 | * | 64 | * |
@@ -120,9 +117,6 @@ static DECLARE_DELAYED_WORK(selfballoon_worker, selfballoon_process); | |||
120 | /* Enable/disable with sysfs. */ | 117 | /* Enable/disable with sysfs. */ |
121 | static bool frontswap_selfshrinking __read_mostly; | 118 | static bool frontswap_selfshrinking __read_mostly; |
122 | 119 | ||
123 | /* Enable/disable with kernel boot option. */ | ||
124 | static bool use_frontswap_selfshrink = true; | ||
125 | |||
126 | /* | 120 | /* |
127 | * The default values for the following parameters were deemed reasonable | 121 | * The default values for the following parameters were deemed reasonable |
128 | * by experimentation, may be workload-dependent, and can all be | 122 | * by experimentation, may be workload-dependent, and can all be |
@@ -176,35 +170,6 @@ static void frontswap_selfshrink(void) | |||
176 | frontswap_shrink(tgt_frontswap_pages); | 170 | frontswap_shrink(tgt_frontswap_pages); |
177 | } | 171 | } |
178 | 172 | ||
179 | static int __init xen_nofrontswap_selfshrink_setup(char *s) | ||
180 | { | ||
181 | use_frontswap_selfshrink = false; | ||
182 | return 1; | ||
183 | } | ||
184 | |||
185 | __setup("noselfshrink", xen_nofrontswap_selfshrink_setup); | ||
186 | |||
187 | /* Disable with kernel boot option. */ | ||
188 | static bool use_selfballooning = true; | ||
189 | |||
190 | static int __init xen_noselfballooning_setup(char *s) | ||
191 | { | ||
192 | use_selfballooning = false; | ||
193 | return 1; | ||
194 | } | ||
195 | |||
196 | __setup("noselfballooning", xen_noselfballooning_setup); | ||
197 | #else /* !CONFIG_FRONTSWAP */ | ||
198 | /* Enable with kernel boot option. */ | ||
199 | static bool use_selfballooning; | ||
200 | |||
201 | static int __init xen_selfballooning_setup(char *s) | ||
202 | { | ||
203 | use_selfballooning = true; | ||
204 | return 1; | ||
205 | } | ||
206 | |||
207 | __setup("selfballooning", xen_selfballooning_setup); | ||
208 | #endif /* CONFIG_FRONTSWAP */ | 173 | #endif /* CONFIG_FRONTSWAP */ |
209 | 174 | ||
210 | #define MB2PAGES(mb) ((mb) << (20 - PAGE_SHIFT)) | 175 | #define MB2PAGES(mb) ((mb) << (20 - PAGE_SHIFT)) |