From: Jon Hunter <jonathanh@nvidia.com>
To: NeilBrown <neilb@suse.de>
Cc: Chuck Lever III <chuck.lever@oracle.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Chris Packham <Chris.Packham@alliedtelesis.co.nz>,
linux-stable <stable@vger.kernel.org>,
"patches@lists.linux.dev" <patches@lists.linux.dev>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Guenter Roeck <linux@roeck-us.net>,
"shuah@kernel.org" <shuah@kernel.org>,
"patches@kernelci.org" <patches@kernelci.org>,
"lkft-triage@lists.linaro.org" <lkft-triage@lists.linaro.org>,
"pavel@denx.de" <pavel@denx.de>,
"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
"sudipm.mukherjee@gmail.com" <sudipm.mukherjee@gmail.com>,
"srw@sladewatkins.net" <srw@sladewatkins.net>,
"rwarsow@gmx.de" <rwarsow@gmx.de>,
"conor@kernel.org" <conor@kernel.org>,
"allen.lkml@gmail.com" <allen.lkml@gmail.com>,
"broonie@kernel.org" <broonie@kernel.org>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH 5.15 00/23] 5.15.160-rc1 review
Date: Thu, 30 May 2024 13:11:47 +0100 [thread overview]
Message-ID: <b2dc17ff-faa6-4ada-a807-ce2a64c9fa29@nvidia.com> (raw)
In-Reply-To: <171701638769.14261.14189708664797323773@noble.neil.brown.name>
On 29/05/2024 21:59, NeilBrown wrote:
...
> Thanks for testing.
> I can only guess that you had an active NFSv4.1 mount and that the
> callback thread was causing problems. Please try this. I also changed
> to use freezable_schedule* which seems like a better interface to do the
> same thing.
>
> If this doesn't fix it, we'll probably need to ask someone who remembers
> the old freezer code.
>
> Thanks,
> NeilBrown
>
> From 518f0c1150f988b3fe8e5e0d053a25c3aa6c7d44 Mon Sep 17 00:00:00 2001
> From: NeilBrown <neilb@suse.de>
> Date: Wed, 29 May 2024 09:38:22 +1000
> Subject: [PATCH] sunrpc: exclude from freezer when waiting for requests:
>
> Prior to v6.1, the freezer will only wake a kernel thread from an
> uninterruptible sleep. Since we changed svc_get_next_xprt() to use and
> IDLE sleep the freezer cannot wake it. we need to tell the freezer to
> ignore it instead.
>
> To make this work with only upstream requests we would need
> Commit f5d39b020809 ("freezer,sched: Rewrite core freezer logic")
> which allows non-interruptible sleeps to be woken by the freezer.
>
> Fixes: 9b8a8e5e8129 ("nfsd: don't allow nfsd threads to be signalled.")
> Signed-off-by: NeilBrown <neilb@suse.de>
> ---
> fs/nfs/callback.c | 2 +-
> fs/nfsd/nfs4proc.c | 3 ++-
> net/sunrpc/svc_xprt.c | 4 ++--
> 3 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
> index 46a0a2d6962e..8fe143cad4a2 100644
> --- a/fs/nfs/callback.c
> +++ b/fs/nfs/callback.c
> @@ -124,7 +124,7 @@ nfs41_callback_svc(void *vrqstp)
> } else {
> spin_unlock_bh(&serv->sv_cb_lock);
> if (!kthread_should_stop())
> - schedule();
> + freezable_schedule();
> finish_wait(&serv->sv_cb_waitq, &wq);
> }
> }
> diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
> index 6779291efca9..e0ff2212866a 100644
> --- a/fs/nfsd/nfs4proc.c
> +++ b/fs/nfsd/nfs4proc.c
> @@ -38,6 +38,7 @@
> #include <linux/slab.h>
> #include <linux/kthread.h>
> #include <linux/namei.h>
> +#include <linux/freezer.h>
>
> #include <linux/sunrpc/addr.h>
> #include <linux/nfs_ssc.h>
> @@ -1322,7 +1323,7 @@ static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr,
>
> /* allow 20secs for mount/unmount for now - revisit */
> if (kthread_should_stop() ||
> - (schedule_timeout(20*HZ) == 0)) {
> + (freezable_schedule_timeout(20*HZ) == 0)) {
> finish_wait(&nn->nfsd_ssc_waitq, &wait);
> kfree(work);
> return nfserr_eagain;
> diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
> index b19592673eef..3cf53e3140a5 100644
> --- a/net/sunrpc/svc_xprt.c
> +++ b/net/sunrpc/svc_xprt.c
> @@ -705,7 +705,7 @@ static int svc_alloc_arg(struct svc_rqst *rqstp)
> set_current_state(TASK_RUNNING);
> return -EINTR;
> }
> - schedule_timeout(msecs_to_jiffies(500));
> + freezable_schedule_timeout(msecs_to_jiffies(500));
> }
> rqstp->rq_page_end = &rqstp->rq_pages[pages];
> rqstp->rq_pages[pages] = NULL; /* this might be seen in nfsd_splice_actor() */
> @@ -765,7 +765,7 @@ static struct svc_xprt *svc_get_next_xprt(struct svc_rqst *rqstp, long timeout)
> smp_mb__after_atomic();
>
> if (likely(rqst_should_sleep(rqstp)))
> - time_left = schedule_timeout(timeout);
> + time_left = freezable_schedule_timeout(timeout);
> else
> __set_current_state(TASK_RUNNING);
>
That did the trick! Suspend is now working again on top of v5.15.160-rc1
with this change.
Feel free to add my ...
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Thanks
Jon
--
nvpublic
next prev parent reply other threads:[~2024-05-30 12:16 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-23 13:12 [PATCH 5.15 00/23] 5.15.160-rc1 review Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 5.15 01/23] drm/amd/display: Fix division by zero in setup_dsc_config Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 5.15 02/23] pinctrl: core: handle radix_tree_insert() errors in pinctrl_register_one_pin() Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 5.15 03/23] nfsd: dont allow nfsd threads to be signalled Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 04/23] KEYS: trusted: Fix memory leak in tpm2_key_encode() Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 05/23] Revert "selftests: mm: fix map_hugetlb failure on 64K page size systems" Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 06/23] net: bcmgenet: synchronize EXT_RGMII_OOB_CTRL access Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 07/23] net: bcmgenet: synchronize UMAC_CMD access Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 08/23] tls: rx: simplify async wait Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 09/23] tls: extract context alloc/initialization out of tls_set_sw_offload Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 10/23] net: tls: factor out tls_*crypt_async_wait() Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 11/23] tls: fix race between async notify and socket close Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 12/23] net: tls: handle backlogging of crypto requests Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 13/23] netlink: annotate lockless accesses to nlk->max_recvmsg_len Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 14/23] netlink: annotate data-races around sk->sk_err Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 15/23] KVM: x86: Clear "has_error_code", not "error_code", for RM exception injection Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 16/23] drm/amdgpu: Fix possible NULL dereference in amdgpu_ras_query_error_status_helper() Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 17/23] binder: fix max_thread type inconsistency Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 18/23] usb: typec: ucsi: displayport: Fix potential deadlock Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 19/23] serial: kgdboc: Fix NMI-safety problems from keyboard reset code Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 20/23] remoteproc: mediatek: Make sure IPI buffer fits in L2TCM Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 21/23] KEYS: trusted: Do not use WARN when encode fails Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 22/23] admin-guide/hw-vuln/core-scheduling: fix return type of PR_SCHED_CORE_GET Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 5.15 23/23] docs: kernel_include.py: Cope with docutils 0.21 Greg Kroah-Hartman
2024-05-23 17:02 ` [PATCH 5.15 00/23] 5.15.160-rc1 review SeongJae Park
2024-05-23 18:20 ` Mark Brown
2024-05-23 18:50 ` Florian Fainelli
2024-05-24 6:54 ` Harshit Mogalapalli
2024-05-24 8:16 ` Anders Roxell
2024-05-24 14:36 ` Shuah Khan
2024-05-24 20:44 ` Ron Economos
2024-05-24 23:13 ` Jon Hunter
2024-05-25 14:20 ` Greg Kroah-Hartman
2024-05-28 9:04 ` Jon Hunter
2024-05-28 13:14 ` Chuck Lever III
2024-05-28 14:18 ` Jon Hunter
2024-05-28 20:38 ` Chris Packham
2024-05-28 20:55 ` Chuck Lever III
2024-05-28 22:01 ` NeilBrown
2024-05-28 23:33 ` Chuck Lever III
2024-05-28 23:44 ` NeilBrown
2024-05-29 0:13 ` Chuck Lever III
2024-05-28 23:42 ` NeilBrown
2024-05-29 8:59 ` Jon Hunter
2024-05-29 20:59 ` NeilBrown
2024-05-30 12:11 ` Jon Hunter [this message]
2024-06-06 14:32 ` Chuck Lever
2024-06-03 13:44 ` Chuck Lever III
2024-05-25 0:58 ` Kelsey Steele
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=b2dc17ff-faa6-4ada-a807-ce2a64c9fa29@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=Chris.Packham@alliedtelesis.co.nz \
--cc=akpm@linux-foundation.org \
--cc=allen.lkml@gmail.com \
--cc=broonie@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=conor@kernel.org \
--cc=f.fainelli@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lkft-triage@lists.linaro.org \
--cc=neilb@suse.de \
--cc=patches@kernelci.org \
--cc=patches@lists.linux.dev \
--cc=pavel@denx.de \
--cc=rwarsow@gmx.de \
--cc=shuah@kernel.org \
--cc=srw@sladewatkins.net \
--cc=stable@vger.kernel.org \
--cc=sudipm.mukherjee@gmail.com \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox