From: Joe Korty <joe.korty@concurrent-rt.com>
To: lgoncalv@redhat.com
Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org
Subject: [PATCH 5.10.162-rt78] Restore initialization of wake_q_sleeper.next in fork.c
Date: Mon, 20 Mar 2023 15:37:31 -0400 [thread overview]
Message-ID: <20230320193731.GA36840@zipoli.concurrent-rt.com> (raw)
In the transition from 5.10.158-rt77 to 5.10.162-rt78,
the initialization of task_struct::wake_q_sleeper.next
was dropped. Restore it.
This appears to be only a problem in 5.10. 5.15 does not
have wake_q_sleeper; 4.19 does have it but its initialization
there is still present.
The 5.10.162-rt78 patch that damaged fork.c is:
0170-locking-rtmutex-add-sleeping-lock-implementation.patch
I do not have a simple test that brings out this problem.
My test consists of a shell script and eight binaries,
all of which were written in Ada. strace shows that it
does a few thousand forks in rapid succession. One of the
forks stalls out, after which no fork after that returns.
Eventually the 122 second stallout occurs and a large
number of threads are shown to be waiting for tasklist
lock, either in do_exit or in copy_process. The kernel
.config has rt and many debug features enabled, lockdep
included.
Signed-off-by: Joe Korty <joe.korty@concurrent-rt.com
Index: b/kernel/fork.c
===================================================================
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -960,6 +960,7 @@ static struct task_struct *dup_task_stru
tsk->splice_pipe = NULL;
tsk->task_frag.page = NULL;
tsk->wake_q.next = NULL;
+ tsk->wake_q_sleeper.next = NULL;
tsk->pf_io_worker = NULL;
account_kernel_stack(tsk, 1);
next reply other threads:[~2023-03-20 19:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 19:37 Joe Korty [this message]
2023-03-20 20:00 ` [PATCH 5.10.162-rt78] Restore initialization of wake_q_sleeper.next in fork.c Luis Claudio R. Goncalves
2023-03-20 20:04 ` Joe Korty
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=20230320193731.GA36840@zipoli.concurrent-rt.com \
--to=joe.korty@concurrent-rt.com \
--cc=lgoncalv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.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