From: Alexander Aring <aahringo@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH v6.3-rc1 02/12] fs: dlm: add unbound flag to dlm_io workqueue
Date: Mon, 6 Mar 2023 15:48:09 -0500 [thread overview]
Message-ID: <20230306204819.2747646-3-aahringo@redhat.com> (raw)
In-Reply-To: <20230306204819.2747646-1-aahringo@redhat.com>
This patch will add the WQ_UNBOUND flag to the lowcomms dlm_io workqueue
which handles socket io handling to send and receive dlm messages.
The amount of sockets will be 2 for a 3 node cluster. Each socket has
two different workers for doing send and receive work by calling socket
API functionality. Each worker will do their task in order to send dlm
messages in a ordered stream based socket communication. On receive
side the receive buffer will be queued up for an ordered dlm_process
workqueue to parse received dlm messages. The parsing need to be done
currently in an ordered synchronized way because the dlm message processing
is not being made to parse parallel.
After explaining all those workqueue behaviours in lowcomms, the dlm_io
workqueue is only being used for socket handling. Each socket handling
has 2 workers (send and receive). In a 3 cluster node we will end up
with 4 workers. Without the WQ_UNBOUND flag the workers are tight to a
CPU and can never switch, this could be an advantage because local CPU
execution. However with dlm_locktorture testcase I expierenced not all
workers are always in use and my assumption is that some workers are
bound to the same CPU. We should always send or receive when we are
ready to do so, one reason why we disable nigel algorithm on sockets.
We should be safe to do the socket io handling on any CPU which can be
switched during runtime. There is no assumption that the worker stays on
the same CPU. There is no need to respect any workqueue concurrency
model that each worker can only run on one CPU. Lowcomms queue_work()
mechanism has an higher level flag to be sure that it can't schedule
work if the previous worker did not signal it to keep ordered socket
handling. Therefore this patch sets the WQ_UNBOUND flag to allow workers
being executed by any available CPU.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
---
fs/dlm/lowcomms.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index a9b14f81d655..c06dd1988259 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -1717,8 +1717,8 @@ static void work_stop(void)
static int work_start(void)
{
- io_workqueue = alloc_workqueue("dlm_io", WQ_HIGHPRI | WQ_MEM_RECLAIM,
- 0);
+ io_workqueue = alloc_workqueue("dlm_io", WQ_HIGHPRI | WQ_MEM_RECLAIM |
+ WQ_UNBOUND, 0);
if (!io_workqueue) {
log_print("can't start dlm_io");
return -ENOMEM;
--
2.31.1
next prev parent reply other threads:[~2023-03-06 20:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-06 20:48 [Cluster-devel] [PATCHv2 v6.3-rc1 00/12] fs: dlm: pending patches for v6.3-rc1 Alexander Aring
2023-03-06 20:48 ` [Cluster-devel] [PATCH v6.3-rc1 01/12] fs: dlm: fix DLM_IFL_CB_PENDING gets overwritten Alexander Aring
2023-03-06 20:48 ` Alexander Aring [this message]
2023-03-06 20:48 ` [Cluster-devel] [PATCH v6.3-rc1 03/12] DLM: increase socket backlog to avoid hangs with 16 nodes Alexander Aring
2023-03-06 20:48 ` [Cluster-devel] [PATCH v6.3-rc1 04/12] fs: dlm: remove deprecated code parts Alexander Aring
2023-03-06 20:48 ` [Cluster-devel] [PATCH v6.3-rc1 05/12] fs: dlm: rename stub to local message flag Alexander Aring
2023-03-06 20:48 ` [Cluster-devel] [PATCH v6.3-rc1 06/12] fs: dlm: remove DLM_IFL_LOCAL_MS flag Alexander Aring
2023-03-06 20:48 ` [Cluster-devel] [PATCH v6.3-rc1 07/12] fs: dlm: store lkb distributed flags into own value Alexander Aring
2023-03-06 20:48 ` [Cluster-devel] [PATCH v6.3-rc1 08/12] fs: dlm: change dflags to use atomic bits Alexander Aring
2023-03-06 20:48 ` [Cluster-devel] [PATCH v6.3-rc1 09/12] fs: dlm: move internal flags to atomic ops Alexander Aring
2023-03-06 20:48 ` [Cluster-devel] [PATCH v6.3-rc1 10/12] fs: dlm: rsb hash table flag value " Alexander Aring
2023-03-06 20:48 ` [Cluster-devel] [PATCH v6.3-rc1 11/12] fs: dlm: switch lkb_sbflags " Alexander Aring
2023-03-06 20:48 ` [Cluster-devel] [PATCH v6.3-rc1 12/12] fs: dlm: switch ls_exflags " Alexander Aring
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=20230306204819.2747646-3-aahringo@redhat.com \
--to=aahringo@redhat.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;
as well as URLs for NNTP newsgroup(s).