All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen-blkback: clear PF_NOFREEZE for xen_blkif_schedule()
@ 2015-10-26  5:47 Jiri Kosina
  2015-12-07 22:00 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Kosina @ 2015-10-26  5:47 UTC (permalink / raw)
  To: konrad.wilk, roger.pau; +Cc: linux-kernel, xen-devel

From: Jiri Kosina <jkosina@suse.cz>

xen_blkif_schedule() kthread calls try_to_freeze() at the beginning of 
every attempt to purge the LRU. This operation can't ever succeed though, 
as the kthread hasn't marked itself as freezable.

Before (hopefully eventually) kthread freezing gets converted to fileystem 
freezing, we'd rather mark xen_blkif_schedule() freezable (as it can 
generate I/O during suspend).

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
---
 drivers/block/xen-blkback/blkback.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
index af3caa3..bb65f7c 100644
--- a/drivers/block/xen-blkback/blkback.c
+++ b/drivers/block/xen-blkback/blkback.c
@@ -597,6 +597,7 @@ int xen_blkif_schedule(void *arg)
 
 	xen_blkif_get(blkif);
 
+	set_freezable();
 	while (!kthread_should_stop()) {
 		if (unlikely(vbd->size != vbd_sz(vbd)))
 			xen_vbd_resize(blkif);

-- 
Jiri Kosina
SUSE Labs

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

* [PATCH] xen-blkback: clear PF_NOFREEZE for xen_blkif_schedule()
@ 2015-10-26  5:47 Jiri Kosina
  0 siblings, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2015-10-26  5:47 UTC (permalink / raw)
  To: konrad.wilk, roger.pau; +Cc: xen-devel, linux-kernel

From: Jiri Kosina <jkosina@suse.cz>

xen_blkif_schedule() kthread calls try_to_freeze() at the beginning of 
every attempt to purge the LRU. This operation can't ever succeed though, 
as the kthread hasn't marked itself as freezable.

Before (hopefully eventually) kthread freezing gets converted to fileystem 
freezing, we'd rather mark xen_blkif_schedule() freezable (as it can 
generate I/O during suspend).

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
---
 drivers/block/xen-blkback/blkback.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
index af3caa3..bb65f7c 100644
--- a/drivers/block/xen-blkback/blkback.c
+++ b/drivers/block/xen-blkback/blkback.c
@@ -597,6 +597,7 @@ int xen_blkif_schedule(void *arg)
 
 	xen_blkif_get(blkif);
 
+	set_freezable();
 	while (!kthread_should_stop()) {
 		if (unlikely(vbd->size != vbd_sz(vbd)))
 			xen_vbd_resize(blkif);

-- 
Jiri Kosina
SUSE Labs

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

* Re: [PATCH] xen-blkback: clear PF_NOFREEZE for xen_blkif_schedule()
  2015-10-26  5:47 [PATCH] xen-blkback: clear PF_NOFREEZE for xen_blkif_schedule() Jiri Kosina
@ 2015-12-07 22:00 ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-12-07 22:00 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: xen-devel, linux-kernel, roger.pau

On Mon, Oct 26, 2015 at 02:47:21PM +0900, Jiri Kosina wrote:
> From: Jiri Kosina <jkosina@suse.cz>
> 
> xen_blkif_schedule() kthread calls try_to_freeze() at the beginning of 
> every attempt to purge the LRU. This operation can't ever succeed though, 
> as the kthread hasn't marked itself as freezable.

<nods>!
> 
> Before (hopefully eventually) kthread freezing gets converted to fileystem 
> freezing, we'd rather mark xen_blkif_schedule() freezable (as it can 
> generate I/O during suspend).
> 
> Signed-off-by: Jiri Kosina <jkosina@suse.cz>

Thank you for reporting that. Will queue it up for Linux 4.5!
> ---
>  drivers/block/xen-blkback/blkback.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
> index af3caa3..bb65f7c 100644
> --- a/drivers/block/xen-blkback/blkback.c
> +++ b/drivers/block/xen-blkback/blkback.c
> @@ -597,6 +597,7 @@ int xen_blkif_schedule(void *arg)
>  
>  	xen_blkif_get(blkif);
>  
> +	set_freezable();
>  	while (!kthread_should_stop()) {
>  		if (unlikely(vbd->size != vbd_sz(vbd)))
>  			xen_vbd_resize(blkif);
> 
> -- 
> Jiri Kosina
> SUSE Labs

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

end of thread, other threads:[~2015-12-07 22:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-26  5:47 [PATCH] xen-blkback: clear PF_NOFREEZE for xen_blkif_schedule() Jiri Kosina
2015-12-07 22:00 ` Konrad Rzeszutek Wilk
  -- strict thread matches above, loose matches on Subject: below --
2015-10-26  5:47 Jiri Kosina

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.