From: Julien Grall <julien.grall@arm.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Dave Martin <Dave.Martin@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-rt-users@vger.kernel.org, catalin.marinas@arm.com,
will.deacon@arm.com, ard.biesheuvel@linaro.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] arm64/fpsimd: Don't disable softirq when touching FPSIMD/SVE state
Date: Fri, 5 Apr 2019 16:17:50 +0100 [thread overview]
Message-ID: <dabf5b36-d22e-e8a3-c01f-6b0f5b3be710@arm.com> (raw)
In-Reply-To: <20190405143942.xtpq5443qbc4gziy@linutronix.de>
Hi,
On 05/04/2019 15:39, Sebastian Andrzej Siewior wrote:
> On 2019-04-05 10:02:45 [+0100], Julien Grall wrote:
>> RT folks already saw this corruption because local_bh_disable() does not
>> preempt on RT. They are carrying a patch (see "arm64: fpsimd: use
>> preemp_disable in addition to local_bh_disable()") to disable preemption
>> along with local_bh_disable().
>>
>> Alternatively, Julia suggested to introduce a per-cpu lock to protect the
>> state. I am thinking to defer this for a follow-up patch. The changes in
>> this patch should make it easier because we now have helper to mark the
>> critical section.
>
> A per-CPU lock? It has to be a raw_spinlock_t because a normal
> spin_lock() / local_lock() would allow scheduling and might be taken as
> part of the context switch or soon after.
raw_spinlock_t would not work here without disabling preemption. Otherwise you
may end up to recurse on the lock and therefore deadlock. But then it raise the
question of the usefulness of the lock here.
However, I don't really understand why allowing the scheduling would be a
problem here. Is it a concern because we will waste cycle trying to restore/save
a context that will be scratched as soon as we release the lock?
Cheers,
--
Julien Grall
next prev parent reply other threads:[~2019-04-05 15:17 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-08 16:55 [RFC PATCH] arm64/fpsimd: Don't disable softirq when touching FPSIMD/SVE state Julien Grall
2019-02-12 17:13 ` Julia Cartwright
2019-02-18 14:07 ` Julien Grall
2019-02-13 14:30 ` Sebastian Andrzej Siewior
2019-02-13 15:36 ` Dave Martin
2019-02-13 15:40 ` Ard Biesheuvel
2019-02-13 15:42 ` Dave Martin
2019-02-13 16:52 ` Sebastian Andrzej Siewior
2019-02-14 10:34 ` Dave Martin
2019-02-18 15:07 ` Julien Grall
2019-03-04 17:25 ` Sebastian Andrzej Siewior
2019-03-14 18:07 ` Julien Grall
2019-03-15 10:06 ` Dave Martin
2019-03-15 10:22 ` Julien Grall
2019-02-13 16:50 ` Sebastian Andrzej Siewior
2019-02-18 14:33 ` Julien Grall
2019-02-18 16:32 ` Julien Grall
2019-04-04 10:52 ` Dave Martin
2019-04-05 9:02 ` Julien Grall
2019-04-05 14:39 ` Sebastian Andrzej Siewior
2019-04-05 15:17 ` Julien Grall [this message]
2019-04-05 15:42 ` Sebastian Andrzej Siewior
2019-04-11 15:12 ` Julien Grall
2019-04-05 15:07 ` Dave Martin
2019-04-11 15:58 ` Julien Grall
2019-04-11 16:34 ` Dave Martin
2019-04-11 16:50 ` Julien Grall
2019-04-11 14:10 ` Julien Grall
-- strict thread matches above, loose matches on Subject: below --
2019-02-08 17:03 [PATCH 0/3] Remove reference of TIF_USEDFPU on arch not using it Julien Grall
2019-02-08 17:03 ` [RFC PATCH] arm64/fpsimd: Don't disable softirq when touching FPSIMD/SVE state Julien Grall
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=dabf5b36-d22e-e8a3-c01f-6b0f5b3be710@arm.com \
--to=julien.grall@arm.com \
--cc=Dave.Martin@arm.com \
--cc=ard.biesheuvel@linaro.org \
--cc=bigeasy@linutronix.de \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=will.deacon@arm.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