linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Cc: linux-mm@kvack.org, linux-xfs@vger.kernel.org,
	linux-kernel@vger.kernel.org, dchinner@redhat.com,
	bfoster@redhat.com, sandeen@sandeen.net
Subject: Re: [PATCH] xfs: Drop setting redundant PF_KSWAPD in kswapd context
Date: Thu, 24 Aug 2017 12:56:35 +0200	[thread overview]
Message-ID: <20170824105635.GA5965@dhcp22.suse.cz> (raw)
In-Reply-To: <20170824104247.8288-1-khandual@linux.vnet.ibm.com>

On Thu 24-08-17 16:12:47, Anshuman Khandual wrote:
> xfs_btree_split() calls xfs_btree_split_worker() with args.kswapd set
> if current->flags alrady has PF_KSWAPD. Hence we should not again add
> PF_KSWAPD into the current flags inside kswapd context. So drop this
> redundant flag addition.

I am not familiar with the code but your change seems incorect. The
whole point of args->kswapd is to convey the kswapd context to the
worker which is obviously running in a different context. So this patch
loses the kswapd context.

> Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
> ---
>  fs/xfs/libxfs/xfs_btree.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c
> index e0bcc4a..b3c85e3 100644
> --- a/fs/xfs/libxfs/xfs_btree.c
> +++ b/fs/xfs/libxfs/xfs_btree.c
> @@ -2895,7 +2895,7 @@ struct xfs_btree_split_args {
>  	 * in any way.
>  	 */
>  	if (args->kswapd)
> -		new_pflags |= PF_MEMALLOC | PF_SWAPWRITE | PF_KSWAPD;
> +		new_pflags |= PF_MEMALLOC | PF_SWAPWRITE;
>  
>  	current_set_flags_nested(&pflags, new_pflags);
>  
> -- 
> 1.8.5.2

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-08-24 10:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24 10:42 [PATCH] xfs: Drop setting redundant PF_KSWAPD in kswapd context Anshuman Khandual
2017-08-24 10:56 ` Michal Hocko [this message]
2017-08-25  0:01   ` Dave Chinner
2017-08-25  4:02     ` Anshuman Khandual

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170824105635.GA5965@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=bfoster@redhat.com \
    --cc=dchinner@redhat.com \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).