Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Pradeep P V K <ppvk@codeaurora.org>
Cc: miklos@szeredi.hu, linux-fsdevel@vger.kernel.org,
	stummala@codeaurora.org, sayalil@codeaurora.org
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: <20200916145634.GN5449@casper.infradead.org> (raw)
In-Reply-To: <1600238380-33350-1-git-send-email-ppvk@codeaurora.org>

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:
  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=20200916145634.GN5449@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=ppvk@codeaurora.org \
    --cc=sayalil@codeaurora.org \
    --cc=stummala@codeaurora.org \
    --subject='Re: [PATCH V2] fuse: Remove __GFP_FS flag to avoid allocator recursing' \
    /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

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