From: Will Deacon <will.deacon@arm.com>
To: Sodagudi Prasad <psodagud@codeaurora.org>
Cc: keescook@chromium.org, luto@amacapital.net, wad@chromium.org,
akpm@linux-foundation.org, riel@redhat.com, tglx@linutronix.de,
mingo@kernel.org, peterz@infradead.org, ebiggers@google.com,
fweisbec@gmail.com, sherryy@android.com,
vegard.nossum@oracle.com, cl@linux.com, aarcange@redhat.com,
alexander.levin@verizon.com, linux-kernel@vger.kernel.org,
torvalds@linux-foundation.org
Subject: Re: write_lock_irq(&tasklist_lock)
Date: Wed, 23 May 2018 14:05:48 +0100 [thread overview]
Message-ID: <20180523130547.GF26965@arm.com> (raw)
In-Reply-To: <0879f797135033e05e8e9166a3c85628@codeaurora.org>
Hi Prasad,
On Tue, May 22, 2018 at 12:40:05PM -0700, Sodagudi Prasad wrote:
> When following test is executed on 4.14.41 stable kernel, observed that one
> of the core is waiting for tasklist_lock for long time with IRQs disabled.
> ./stress-ng-64 --get 8 -t 3h --times --metrics-brief
>
> Every time when device is crashed, I observed that one the task stuck at
> fork system call and waiting for tasklist_lock as writer with irq disabled.
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/kernel/fork.c?h=linux-4.14.y#n1843
Please use a newer kernel. We've addressed this in mainline by moving
arm64 over to the qrwlock implementation which (after some other changes)
guarantees forward progress for well-behaved readers and writers.
To give an example from locktorture with 2 writers and 8 readers, after
a few seconds I see:
rwlock:
Writes: Total: 6725 Max/Min: 0/0 Fail: 0
Reads: Total: 5103727 Max/Min: 0/0 Fail: 0
qrwlock:
Writes: Total: 155284 Max/Min: 0/0 Fail: 0
Reads: Total: 767703 Max/Min: 0/0 Fail: 0
so the ratio is closer to ~6:1 rather than ~191:1 for this case. The
total locking throughput has dropped, but that's expected for this type
of lock where maximum throughput would be achieved by favouring readers.
Will
next prev parent reply other threads:[~2018-05-23 13:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-22 19:40 write_lock_irq(&tasklist_lock) Sodagudi Prasad
2018-05-22 20:27 ` write_lock_irq(&tasklist_lock) Linus Torvalds
2018-05-22 21:17 ` write_lock_irq(&tasklist_lock) Peter Zijlstra
2018-05-22 21:31 ` write_lock_irq(&tasklist_lock) Linus Torvalds
2018-05-23 8:19 ` write_lock_irq(&tasklist_lock) Peter Zijlstra
2018-05-23 13:05 ` Will Deacon [this message]
2018-05-23 15:25 ` write_lock_irq(&tasklist_lock) Linus Torvalds
2018-05-23 15:36 ` write_lock_irq(&tasklist_lock) Will Deacon
2018-05-23 16:26 ` write_lock_irq(&tasklist_lock) Linus Torvalds
2018-05-24 12:49 ` write_lock_irq(&tasklist_lock) Will Deacon
2018-05-24 13:51 ` write_lock_irq(&tasklist_lock) Boqun Feng
2018-05-24 17:37 ` write_lock_irq(&tasklist_lock) Sodagudi Prasad
2018-05-24 18:28 ` write_lock_irq(&tasklist_lock) Peter Zijlstra
2018-05-24 21:14 ` write_lock_irq(&tasklist_lock) Andrea Parri
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=20180523130547.GF26965@arm.com \
--to=will.deacon@arm.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.levin@verizon.com \
--cc=cl@linux.com \
--cc=ebiggers@google.com \
--cc=fweisbec@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=psodagud@codeaurora.org \
--cc=riel@redhat.com \
--cc=sherryy@android.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vegard.nossum@oracle.com \
--cc=wad@chromium.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