Linux-Fsdevel Archive on
help / color / mirror / Atom feed
From: Matthew Wilcox <>
To: Pradeep P V K <>
Subject: Re: [PATCH V2] fuse: Remove __GFP_FS flag to avoid allocator recursing
Date: Wed, 16 Sep 2020 15:56:34 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Wed, Sep 16, 2020 at 12:09:40PM +0530, Pradeep P V K wrote:
> Changes since V1:
> - Used memalloc_nofs_save() in all allocation paths of fuse daemons
>   to avoid use __GFP_FS flag as per Matthew comments.

That's not how to use memalloc_nofs_save().  You call it when entering a
context in which any memory allocation would cause a deadlock.  You don't
look for every place which allocates memory and wrap the memory allocation
calls in memalloc_nofs_save() because you're likely to miss one.

>  static ssize_t fuse_dev_read(struct kiocb *iocb, struct iov_iter *to)
>  {
> +	ssize_t size;
> +	unsigned nofs_flag;

This is almost certainly too low in the call stack.

  reply	other threads:[~2020-09-16 18:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16  6:39 Pradeep P V K
2020-09-16 14:56 ` Matthew Wilcox [this message]
2020-09-21 11:39   ` ppvk

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:

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

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: [PATCH V2] fuse: Remove __GFP_FS flag to avoid allocator recursing' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).