From: Chuck Lever <cel@kernel.org>
To: linux-nfs@vger.kernel.org
Cc: NeilBrown <neilb@suse.de>, Chuck Lever <chuck.lever@oracle.com>
Subject: [PATCH v1 12/17] SUNRPC: rename some functions from rqst_ to svc_thread_
Date: Mon, 11 Sep 2023 10:39:50 -0400 [thread overview]
Message-ID: <169444319021.4327.4057172101389832628.stgit@bazille.1015granger.net> (raw)
In-Reply-To: <169444233785.4327.4365499966926096681.stgit@bazille.1015granger.net>
From: NeilBrown <neilb@suse.de>
Functions which directly manipulate a 'struct rqst', such as
svc_rqst_alloc() or svc_rqst_release_pages(), can reasonably
have "rqst" in there name.
However functions that act on the running thread, such as
XX_should_sleep() or XX_wait_for_work() should seem more
natural with a "svc_thread_" prefix.
So make those changes.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
net/sunrpc/svc_xprt.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index 17c43bde35c9..1b300a7889eb 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -699,7 +699,7 @@ static bool svc_alloc_arg(struct svc_rqst *rqstp)
}
static bool
-rqst_should_sleep(struct svc_rqst *rqstp)
+svc_thread_should_sleep(struct svc_rqst *rqstp)
{
struct svc_pool *pool = rqstp->rq_pool;
@@ -725,15 +725,15 @@ rqst_should_sleep(struct svc_rqst *rqstp)
return true;
}
-static void svc_rqst_wait_for_work(struct svc_rqst *rqstp)
+static void svc_thread_wait_for_work(struct svc_rqst *rqstp)
{
struct svc_pool *pool = rqstp->rq_pool;
- if (rqst_should_sleep(rqstp)) {
+ if (svc_thread_should_sleep(rqstp)) {
set_current_state(TASK_IDLE | TASK_FREEZABLE);
llist_add(&rqstp->rq_idle, &pool->sp_idle_threads);
- if (unlikely(!rqst_should_sleep(rqstp)))
+ if (unlikely(!svc_thread_should_sleep(rqstp)))
/* Work just became available. This thread cannot simply
* choose not to sleep as it *must* wait until removed.
* So wake the first waiter - whether it is this
@@ -850,7 +850,7 @@ void svc_recv(struct svc_rqst *rqstp)
if (!svc_alloc_arg(rqstp))
return;
- svc_rqst_wait_for_work(rqstp);
+ svc_thread_wait_for_work(rqstp);
clear_bit(SP_TASK_PENDING, &pool->sp_flags);
next prev parent reply other threads:[~2023-09-11 22:00 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-11 14:38 [PATCH v1 00/17] RPC service thread improvements Chuck Lever
2023-09-11 14:38 ` [PATCH v1 01/17] SUNRPC: move all of xprt handling into svc_xprt_handle() Chuck Lever
2023-09-11 14:38 ` [PATCH v1 02/17] SUNRPC: rename and refactor svc_get_next_xprt() Chuck Lever
2023-09-11 14:38 ` [PATCH v1 03/17] SUNRPC: Clean up bc_svc_process() Chuck Lever
2023-09-11 14:38 ` [PATCH v1 04/17] SUNRPC: integrate back-channel processing with svc_recv() Chuck Lever
2023-09-11 14:39 ` [PATCH v1 05/17] SUNRPC: change how svc threads are asked to exit Chuck Lever
2023-09-11 14:39 ` [PATCH v1 06/17] SUNRPC: add list of idle threads Chuck Lever
2023-09-11 14:39 ` [PATCH v1 07/17] SUNRPC: discard SP_CONGESTED Chuck Lever
2023-09-11 14:39 ` [PATCH v1 08/17] llist: add interface to check if a node is on a list Chuck Lever
2023-09-11 14:39 ` [PATCH v1 09/17] SUNRPC: change service idle list to be an llist Chuck Lever
2023-09-11 14:39 ` [PATCH v1 10/17] llist: add llist_del_first_this() Chuck Lever
2023-09-11 14:39 ` [PATCH v1 11/17] lib: add light-weight queuing mechanism Chuck Lever
2023-09-11 18:13 ` Andrew Morton
2023-09-11 20:30 ` Chuck Lever III
2023-09-11 21:04 ` Andrew Morton
2023-09-11 23:19 ` NeilBrown
2023-09-12 1:30 ` Andrew Morton
2023-09-14 14:05 ` Chuck Lever III
2023-09-15 1:51 ` NeilBrown
2023-09-15 2:22 ` [PATCH 11/17 SQUASH and replace commit message] " NeilBrown
2023-09-15 15:54 ` Chuck Lever III
2023-09-12 2:37 ` [PATCH v1 11/17] " Kees Cook
2023-09-12 4:08 ` NeilBrown
2023-09-11 14:39 ` Chuck Lever [this message]
2023-09-11 14:39 ` [PATCH v1 13/17] SUNRPC: only have one thread waking up at a time Chuck Lever
2023-09-11 14:40 ` [PATCH v1 14/17] SUNRPC: use lwq for sp_sockets - renamed to sp_xprts Chuck Lever
2023-09-11 14:40 ` [PATCH v1 15/17] SUNRPC: change sp_nrthreads to atomic_t Chuck Lever
2023-09-11 14:40 ` [PATCH v1 16/17] SUNRPC: discard sp_lock Chuck Lever
2023-09-11 14:40 ` [PATCH v1 17/17] SUNRPC: change the back-channel queue to lwq Chuck Lever
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=169444319021.4327.4057172101389832628.stgit@bazille.1015granger.net \
--to=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).