Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: ppvk@codeaurora.org
To: Matthew Wilcox <willy@infradead.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: Mon, 21 Sep 2020 17:09:00 +0530	[thread overview]
Message-ID: <2a5b17f0a80d6a52e6c2c7301dea4c41@codeaurora.org> (raw)
In-Reply-To: <20200916145634.GN5449@casper.infradead.org>

On 2020-09-16 20:26, Matthew Wilcox wrote:
> 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.

> ok, i will fix this in my next patch set.
>>  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.
ok, i will update this in my next patch set.

      reply	other threads:[~2020-09-21 11:44 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
2020-09-21 11:39   ` ppvk [this message]

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=2a5b17f0a80d6a52e6c2c7301dea4c41@codeaurora.org \
    --to=ppvk@codeaurora.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=sayalil@codeaurora.org \
    --cc=stummala@codeaurora.org \
    --cc=willy@infradead.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).