From: patchwork-bot+linux-riscv@kernel.org
To: Charlie Jenkins <charlie@rivosinc.com>
Cc: linux-riscv@lists.infradead.org, paul.walmsley@sifive.com,
palmer@dabbelt.com, aou@eecs.berkeley.edu,
alexghiti@rivosinc.com, atishp@rivosinc.com,
samuel.holland@sifive.com, parri.andrea@gmail.com,
palmer@rivosinc.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] riscv: Disable preemption while handling PR_RISCV_CTX_SW_FENCEI_OFF
Date: Wed, 11 Sep 2024 15:30:33 +0000 [thread overview]
Message-ID: <172606863325.959689.12181957139773137657.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20240903-fix_fencei_optimization-v2-1-8025f20171fc@rivosinc.com>
Hello:
This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer@rivosinc.com>:
On Tue, 03 Sep 2024 15:52:34 -0700 you wrote:
> The icache will be flushed in switch_to() if force_icache_flush is true,
> or in flush_icache_deferred() if icache_stale_mask is set. Between
> setting force_icache_flush to false and calculating the new
> icache_stale_mask, preemption needs to be disabled. There are two
> reasons for this:
>
> 1. If CPU migration happens between force_icache_flush = false, and the
> icache_stale_mask is set, an icache flush will not be emitted.
> 2. smp_processor_id() is used in set_icache_stale_mask() to mark the
> current CPU as not needing another flush since a flush will have
> happened either by userspace or by the kernel when performing the
> migration. smp_processor_id() is currently called twice with preemption
> enabled which causes a race condition. It allows
> icache_stale_mask to be populated with inconsistent CPU ids.
>
> [...]
Here is the summary with links:
- [v2] riscv: Disable preemption while handling PR_RISCV_CTX_SW_FENCEI_OFF
https://git.kernel.org/riscv/c/7c1e5b9690b0
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
prev parent reply other threads:[~2024-09-11 15:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 22:52 [PATCH v2] riscv: Disable preemption while handling PR_RISCV_CTX_SW_FENCEI_OFF Charlie Jenkins
2024-09-11 15:30 ` patchwork-bot+linux-riscv [this message]
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=172606863325.959689.12181957139773137657.git-patchwork-notify@kernel.org \
--to=patchwork-bot+linux-riscv@kernel.org \
--cc=alexghiti@rivosinc.com \
--cc=aou@eecs.berkeley.edu \
--cc=atishp@rivosinc.com \
--cc=charlie@rivosinc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=palmer@rivosinc.com \
--cc=parri.andrea@gmail.com \
--cc=paul.walmsley@sifive.com \
--cc=samuel.holland@sifive.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