From: Trond Myklebust <trondmy@hammerspace.com>
To: "horms@kernel.org" <horms@kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"chuck.lever@oracle.com" <chuck.lever@oracle.com>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"yangerkun@huawei.com" <yangerkun@huawei.com>,
"okorniev@redhat.com" <okorniev@redhat.com>,
"anna@kernel.org" <anna@kernel.org>,
"lilingfeng3@huawei.com" <lilingfeng3@huawei.com>,
"Dai.Ngo@oracle.com" <Dai.Ngo@oracle.com>,
"jlayton@kernel.org" <jlayton@kernel.org>,
"neilb@suse.de" <neilb@suse.de>,
"tom@talpey.com" <tom@talpey.com>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>
Cc: "lilingfeng@huaweicloud.com" <lilingfeng@huaweicloud.com>,
"houtao1@huawei.com" <houtao1@huawei.com>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"yukuai1@huaweicloud.com" <yukuai1@huaweicloud.com>,
"yi.zhang@huawei.com" <yi.zhang@huawei.com>
Subject: Re: [PATCH] SUNRPC: Set tk_rpc_status when RPC_TASK_SIGNALLED is detected
Date: Thu, 16 Jan 2025 20:52:36 +0000 [thread overview]
Message-ID: <642413c4bdbe296db722f0091ffa5190c992eb8e.camel@hammerspace.com> (raw)
In-Reply-To: <fed3cd85-0a15-ae30-b167-84881d6a5efd@huawei.com>
On Thu, 2025-01-16 at 19:43 +0800, yangerkun wrote:
> Hi,
>
> Thanks for the patch.
>
> Before 39494194f93b("SUNRPC: Fix races with rpc_killall_tasks()",
> every
> time we set RPC_TASK_SIGNALLED, when we go through __rpc_execute,
> this
> rpc_task will immediate break and exist.
>
> However after that, __rpc_execute won't judge RPC_TASK_SIGNNALED, so
> for
> the case like you point out below, even after your commit
> rpc_check_timeout will help break and exist eventually, but this
> rpc_task has already do some work. I prefer reintroduce judging
> RPC_TASK_SIGNNALED in __rpc_execute to help exist immediatly.
>
Better yet... Let's get rid of the RPC_TASK_SIGNALLED flag altogether
and just replace
#define RPC_TASK_SIGNALLED(task) (READ_ONCE(task->tk_rpc_status) == -ERESTARTSYS)
There is no good reason to try to maintain two completely separate
sources of truth to describe the same task state.
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com
next prev parent reply other threads:[~2025-01-16 20:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 14:41 [PATCH] SUNRPC: Set tk_rpc_status when RPC_TASK_SIGNALLED is detected Li Lingfeng
2025-01-16 11:43 ` yangerkun
2025-01-16 14:32 ` Li Lingfeng
2025-01-16 20:52 ` Trond Myklebust [this message]
2025-01-17 2:29 ` yangerkun
2025-01-17 3:15 ` Trond Myklebust
2025-01-17 12:16 ` yangerkun
2025-01-26 2:20 ` Li Lingfeng
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=642413c4bdbe296db722f0091ffa5190c992eb8e.camel@hammerspace.com \
--to=trondmy@hammerspace.com \
--cc=Dai.Ngo@oracle.com \
--cc=anna@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=houtao1@huawei.com \
--cc=jlayton@kernel.org \
--cc=kuba@kernel.org \
--cc=lilingfeng3@huawei.com \
--cc=lilingfeng@huaweicloud.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=netdev@vger.kernel.org \
--cc=okorniev@redhat.com \
--cc=pabeni@redhat.com \
--cc=tom@talpey.com \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
--cc=yukuai1@huaweicloud.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