xfs
[Top] [All Lists]

Re: [PATCH] xfs: clear PF_NOFREEZE for xfsaild kthread

To: Jiri Kosina <jikos@xxxxxxxxxx>
Subject: Re: [PATCH] xfs: clear PF_NOFREEZE for xfsaild kthread
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Mon, 26 Oct 2015 10:08:47 -0400
Cc: Dave Chinner <david@xxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <alpine.LNX.2.00.1510261552160.8998@xxxxxxxxxxxxx>
References: <alpine.LNX.2.00.1510261552160.8998@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
On Mon, Oct 26, 2015 at 03:53:40PM +0900, Jiri Kosina wrote:
> From: Jiri Kosina <jkosina@xxxxxxx>
> 
> Since xfsaild has been converted to kthread in 0030807c, it calls 
> try_to_freeze() during every AIL push iteration. It however doesn't set 
> itself as freezable, and therefore this try_to_freeze() will never do 
> anything.
> 
> Before (hopefully eventually) kthread freezing gets converted to fileystem 
> freezing, we'd rather mark xfsaild freezable (as it can generate I/O 
> during suspend).
> 
> Signed-off-by: Jiri Kosina <jkosina@xxxxxxx>
> ---

Looks fine to me:

Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>

>  fs/xfs/xfs_trans_ail.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
> index 1098cf4..06d1a29 100644
> --- a/fs/xfs/xfs_trans_ail.c
> +++ b/fs/xfs/xfs_trans_ail.c
> @@ -497,6 +497,7 @@ xfsaild(
>       long            tout = 0;       /* milliseconds */
>  
>       current->flags |= PF_MEMALLOC;
> +     set_freezable();
>  
>       while (!kthread_should_stop()) {
>               if (tout && tout <= 20)
> -- 
> Jiri Kosina
> SUSE Labs
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

<Prev in Thread] Current Thread [Next in Thread>