From: Yao Zi <me@ziyao.cc>
To: guoren@kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com,
alex@ghiti.fr, leobras@redhat.com,
djordje.todorovic@htecgroup.com, aleksa.paunovic@htecgroup.com,
arnd@arndb.de, rabenda.cn@gmail.com
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-arch@vger.kernel.org, Han Gao <gaohan@iscas.ac.cn>,
Alexandre Ghiti <alexghiti@rivosinc.com>,
Paul Walmsley <pjw@kernel.org>
Subject: Re: [PATCH V3] riscv: errata: Add ERRATA_THEAD_WRITE_ONCE fixup
Date: Thu, 19 Feb 2026 08:04:42 +0000 [thread overview]
Message-ID: <aZbEGsqXSQzORQ__@pie> (raw)
In-Reply-To: <20260125063941.443777-1-guoren@kernel.org>
On Sun, Jan 25, 2026 at 01:39:41AM -0500, guoren@kernel.org wrote:
> From: "Guo Ren (Alibaba DAMO Academy)" <guoren@kernel.org>
>
> The early version of XuanTie C910 core has a store merge buffer
> delay problem. The store merge buffer could improve the store queue
> performance by merging multi-store requests, but when there are not
> continued store requests, the prior single store request would be
> waiting in the store queue for a long time. That would cause
> significant problems for communication between multi-cores. This
> problem was found on sg2042 & th1520 platforms with the qspinlock
> lock torture test.
>
> So appending a fence w.o could immediately flush the store merge
> buffer and let other cores see the write result.
>
> This will apply the WRITE_ONCE errata to handle the non-standard
> behavior via appending a fence w.o instruction for WRITE_ONCE().
>
> This problem is only observed on the sg2042 hardware platform by
> running the lock_torture test program for half an hour. The problem
> was not found in the user space application, because interrupt can
> break the livelock.
>
> Reviewed-by: Leonardo Bras <leobras@redhat.com>
> Tested-by: Han Gao <gaohan@iscas.ac.cn>
> Cc: Yao Zi <me@ziyao.cc>
> Cc: Alexandre Ghiti <alexghiti@rivosinc.com>
> Cc: Paul Walmsley <pjw@kernel.org>
> Signed-off-by: Guo Ren (Alibaba DAMO Academy) <guoren@kernel.org>
With the patch, I've run heavy multi-core compilation load on SG2042 for
more than 12 hours, and observed no stability issues.
Tested-by: Yao Zi <me@ziyao.cc>
Thanks,
Yao Zi
next prev parent reply other threads:[~2026-02-19 8:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-25 6:39 [PATCH V3] riscv: errata: Add ERRATA_THEAD_WRITE_ONCE fixup guoren
2026-02-18 12:06 ` Han Gao
2026-02-19 8:04 ` Yao Zi [this message]
2026-02-24 2:04 ` Guo Ren
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=aZbEGsqXSQzORQ__@pie \
--to=me@ziyao.cc \
--cc=aleksa.paunovic@htecgroup.com \
--cc=alex@ghiti.fr \
--cc=alexghiti@rivosinc.com \
--cc=arnd@arndb.de \
--cc=djordje.todorovic@htecgroup.com \
--cc=gaohan@iscas.ac.cn \
--cc=guoren@kernel.org \
--cc=leobras@redhat.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=pjw@kernel.org \
--cc=rabenda.cn@gmail.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