Commit b3831cb55d383e8eb55d3b56c715fb48459b87c9
1 parent
cd52e17ea8
Exists in
master
and in
7 other branches
xen: avoid allocation causing potential swap activity on the resume path
Since the device we are resuming could be the device containing the swap device we should ensure that the allocation cannot cause IO. On resume, this path is triggered when the running system tries to continue using its devices. If it cannot then the resume will fail; to try to avoid this we let it dip into the emergency pools. The majority of these changes were made when linux-2.6.18-xen.hg changeset e8b49cfbdac0 was ported upstream in a144ff09bc52ef3f3684ed23eadc9c7c0e57b3aa but somehow this hunk was dropped. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Stable Kernel <stable@kernel.org> # .32.x
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
drivers/xen/xenbus/xenbus_xs.c
... | ... | @@ -499,7 +499,7 @@ |
499 | 499 | #define PRINTF_BUFFER_SIZE 4096 |
500 | 500 | char *printf_buffer; |
501 | 501 | |
502 | - printf_buffer = kmalloc(PRINTF_BUFFER_SIZE, GFP_KERNEL); | |
502 | + printf_buffer = kmalloc(PRINTF_BUFFER_SIZE, GFP_NOIO | __GFP_HIGH); | |
503 | 503 | if (printf_buffer == NULL) |
504 | 504 | return -ENOMEM; |
505 | 505 |