From: Mike Snitzer <snitzer@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Trond Myklebust <trond.myklebust@hammerspace.com>,
Anna Schumaker <anna.schumaker@oracle.com>,
linux-nfs@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH v2 for-akpm for-6.14-rcX] NFS: fix nfs_release_folio() to not deadlock via kcompactd writeback
Date: Tue, 25 Feb 2025 12:02:34 -0500 [thread overview]
Message-ID: <Z733qhxzJyoIN41J@kernel.org> (raw)
In-Reply-To: <20250224225306.fb08838ac74f42f1c621fd19@linux-foundation.org>
On Mon, Feb 24, 2025 at 10:53:06PM -0800, Andrew Morton wrote:
> On Mon, 24 Feb 2025 21:20:02 -0500 Mike Snitzer <snitzer@kernel.org> wrote:
>
> > Add PF_KCOMPACTD flag and current_is_kcompactd() helper to check for
> > it so nfs_release_folio() can skip calling nfs_wb_folio() from
> > kcompactd.
> >
>
> --- a/mm/compaction.c~a
> +++ a/mm/compaction.c
> @@ -3182,7 +3182,7 @@ static int kcompactd(void *p)
> long default_timeout = msecs_to_jiffies(HPAGE_FRAG_CHECK_INTERVAL_MSEC);
> long timeout = default_timeout;
>
> - tsk->flags |= PF_KCOMPACTD;
> + current->flags |= PF_KCOMPACTD;
> set_freezable();
>
> pgdat->kcompactd_max_order = 0;
> @@ -3239,7 +3239,7 @@ static int kcompactd(void *p)
> pgdat->proactive_compact_trigger = false;
> }
>
> - tsk->flags &= ~PF_KCOMPACTD;
> + current->flags &= ~PF_KCOMPACTD;
>
> return 0;
> }
>
> I am of course concerned about how well tested this was!
Understandable, the patch was created and tested against v6.12.16.
Sincere apologies, I didn't rebase before submitting.
I'll rebase, retest and then send v3 today.
Thanks,
Mike
next prev parent reply other threads:[~2025-02-25 17:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 0:33 [PATCH for-akpm for-6.14-rcX] NFS: fix nfs_release_folio() to not call nfs_wb_folio() from kcompactd Mike Snitzer
2025-02-25 2:20 ` [PATCH v2 for-akpm for-6.14-rcX] NFS: fix nfs_release_folio() to not deadlock via kcompactd writeback Mike Snitzer
2025-02-25 6:53 ` Andrew Morton
2025-02-25 17:02 ` Mike Snitzer [this message]
2025-02-25 20:19 ` [PATCH v3 " Mike Snitzer
2025-02-25 20:28 ` Mike Snitzer
2025-02-26 14:58 ` [PATCH for-akpm for-6.14-rcX] NFS: fix nfs_release_folio() to not call nfs_wb_folio() from kcompactd Christoph Hellwig
2025-02-26 15:44 ` Mike Snitzer
2025-02-26 15:55 ` Mike Snitzer
2025-02-26 17:22 ` Trond Myklebust
2025-02-26 22:02 ` Andrew Morton
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=Z733qhxzJyoIN41J@kernel.org \
--to=snitzer@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=anna.schumaker@oracle.com \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.com \
/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