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 V1] fuse: Remove __GFP_FS flag to avoid allocator recursing
Date: Mon, 14 Sep 2020 15:07:33 +0100 [thread overview]
Message-ID: <20200914140733.GP6583@casper.infradead.org> (raw)
In-Reply-To: <1600091775-10639-1-git-send-email-ppvk@codeaurora.org>
On Mon, Sep 14, 2020 at 07:26:15PM +0530, Pradeep P V K wrote:
> Process#1(kswapd) held an inode lock and initaited a writeback to free
> the pages, as the inode superblock is fuse, process#2 forms a fuse
> request. Process#3 (Fuse daemon threads) while serving process#2 request,
> it requires memory(pages) and as the system is already running in low
> memory it ends up in calling try_to_ free_pages(), which might now call
> kswapd again, which is already stuck with an inode lock held. Thus forms
> a deadlock.
>
> So, remove __GFP_FS flag to avoid allocator recursing into the
> filesystem that might already held locks.
This is the wrong way to fix the problem. The fuse daemon threads should
have called memalloc_nofs_save() as this prevents them from inadvertently
tripping over other places where they forgot to use GFP_NOFS (or have
no way to pass a GFP_NOFS flags argument).
next prev parent reply other threads:[~2020-09-14 14:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-14 13:56 [PATCH V1] fuse: Remove __GFP_FS flag to avoid allocator recursing Pradeep P V K
2020-09-14 14:07 ` Matthew Wilcox [this message]
2020-09-15 14:34 ` 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=20200914140733.GP6583@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 \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.