All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH, GIT] xen: avoid allocation causing potential swap activity on the resume path
@ 2010-05-25 12:34 Ian Campbell
  2010-06-02 12:23 ` Ian Campbell
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Campbell @ 2010-05-25 12:34 UTC (permalink / raw)
  To: Jeremy Fitzhardinge; +Cc: xen-devel

The following changes since commit 5c6aea17c9692e6c12f198573ef640a9dfb2b431:
  Ian Campbell (1):
        xen: ensure timer tick is resumed even on CPU driving the resume

are available in the git repository at:

  git://xenbits.xensource.com/people/ianc/linux-2.6.git for-jeremy/saverestore

Ian Campbell (1):
      xen: avoid allocation causing potential swap activity on the resume path

 drivers/xen/xenbus/xenbus_xs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Subject: [PATCH] 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>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Stable Kernel <stable@kernel.org>
---
 drivers/xen/xenbus/xenbus_xs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
index 6f91e8c..5534690 100644
--- a/drivers/xen/xenbus/xenbus_xs.c
+++ b/drivers/xen/xenbus/xenbus_xs.c
@@ -534,7 +534,7 @@ int xenbus_printf(struct xenbus_transaction t,
 #define PRINTF_BUFFER_SIZE 4096
 	char *printf_buffer;
 
-	printf_buffer = kmalloc(PRINTF_BUFFER_SIZE, GFP_KERNEL);
+	printf_buffer = kmalloc(PRINTF_BUFFER_SIZE, GFP_NOIO | __GFP_HIGH);
 	if (printf_buffer == NULL)
 		return -ENOMEM;
 
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH, GIT] xen: avoid allocation causing potential swap activity on the resume path
  2010-05-25 12:34 [PATCH, GIT] xen: avoid allocation causing potential swap activity on the resume path Ian Campbell
@ 2010-06-02 12:23 ` Ian Campbell
  2010-06-02 16:41   ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Campbell @ 2010-06-02 12:23 UTC (permalink / raw)
  To: Jeremy Fitzhardinge; +Cc: xen-devel

Jeremy,

are you happy for me to send this +
5c6aea17c9692e6c12f198573ef640a9dfb2b431 ("xen: ensure timer tick is
resumed even on CPU driving the resume") to Linus as bugfixes for 2.6.35
(+stable backport)?

Ian.

On Tue, 2010-05-25 at 13:34 +0100, Ian Campbell wrote:
> The following changes since commit 5c6aea17c9692e6c12f198573ef640a9dfb2b431:
>   Ian Campbell (1):
>         xen: ensure timer tick is resumed even on CPU driving the resume
> 
> are available in the git repository at:
> 
>   git://xenbits.xensource.com/people/ianc/linux-2.6.git for-jeremy/saverestore
> 
> Ian Campbell (1):
>       xen: avoid allocation causing potential swap activity on the resume path
> 
>  drivers/xen/xenbus/xenbus_xs.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> Subject: [PATCH] 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>
> Cc: Jeremy Fitzhardinge <jeremy@goop.org>
> Cc: Stable Kernel <stable@kernel.org>
> ---
>  drivers/xen/xenbus/xenbus_xs.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
> index 6f91e8c..5534690 100644
> --- a/drivers/xen/xenbus/xenbus_xs.c
> +++ b/drivers/xen/xenbus/xenbus_xs.c
> @@ -534,7 +534,7 @@ int xenbus_printf(struct xenbus_transaction t,
>  #define PRINTF_BUFFER_SIZE 4096
>  	char *printf_buffer;
>  
> -	printf_buffer = kmalloc(PRINTF_BUFFER_SIZE, GFP_KERNEL);
> +	printf_buffer = kmalloc(PRINTF_BUFFER_SIZE, GFP_NOIO | __GFP_HIGH);
>  	if (printf_buffer == NULL)
>  		return -ENOMEM;
>  

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH, GIT] xen: avoid allocation causing potential swap activity on the resume path
  2010-06-02 12:23 ` Ian Campbell
@ 2010-06-02 16:41   ` Jeremy Fitzhardinge
  0 siblings, 0 replies; 3+ messages in thread
From: Jeremy Fitzhardinge @ 2010-06-02 16:41 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

On 06/02/2010 05:23 AM, Ian Campbell wrote:
> Jeremy,
>
> are you happy for me to send this +
> 5c6aea17c9692e6c12f198573ef640a9dfb2b431 ("xen: ensure timer tick is
> resumed even on CPU driving the resume") to Linus as bugfixes for 2.6.35
> (+stable backport)?
>   

Yep, ACK.

    J

> Ian.
>
> On Tue, 2010-05-25 at 13:34 +0100, Ian Campbell wrote:
>   
>> The following changes since commit 5c6aea17c9692e6c12f198573ef640a9dfb2b431:
>>   Ian Campbell (1):
>>         xen: ensure timer tick is resumed even on CPU driving the resume
>>
>> are available in the git repository at:
>>
>>   git://xenbits.xensource.com/people/ianc/linux-2.6.git for-jeremy/saverestore
>>
>> Ian Campbell (1):
>>       xen: avoid allocation causing potential swap activity on the resume path
>>
>>  drivers/xen/xenbus/xenbus_xs.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> Subject: [PATCH] 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>
>> Cc: Jeremy Fitzhardinge <jeremy@goop.org>
>> Cc: Stable Kernel <stable@kernel.org>
>> ---
>>  drivers/xen/xenbus/xenbus_xs.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
>> index 6f91e8c..5534690 100644
>> --- a/drivers/xen/xenbus/xenbus_xs.c
>> +++ b/drivers/xen/xenbus/xenbus_xs.c
>> @@ -534,7 +534,7 @@ int xenbus_printf(struct xenbus_transaction t,
>>  #define PRINTF_BUFFER_SIZE 4096
>>  	char *printf_buffer;
>>  
>> -	printf_buffer = kmalloc(PRINTF_BUFFER_SIZE, GFP_KERNEL);
>> +	printf_buffer = kmalloc(PRINTF_BUFFER_SIZE, GFP_NOIO | __GFP_HIGH);
>>  	if (printf_buffer == NULL)
>>  		return -ENOMEM;
>>  
>>     
>
>   

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-06-02 16:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-25 12:34 [PATCH, GIT] xen: avoid allocation causing potential swap activity on the resume path Ian Campbell
2010-06-02 12:23 ` Ian Campbell
2010-06-02 16:41   ` Jeremy Fitzhardinge

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.