linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Dave Martin <Dave.Martin@arm.com>
Cc: Julien Grall <julien.grall@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: Wed, 13 Feb 2019 17:50:34 +0100	[thread overview]
Message-ID: <20190213165034.mda5rdfwsxbcdtfa@linutronix.de> (raw)
In-Reply-To: <20190213153630.GK3567@e103592.cambridge.arm.com>

On 2019-02-13 15:36:30 [+0000], Dave Martin wrote:
> On Wed, Feb 13, 2019 at 03:30:29PM +0100, Sebastian Andrzej Siewior wrote:
> > On 2019-02-08 16:55:13 [+0000], Julien Grall wrote:
> > > When the kernel is compiled with CONFIG_KERNEL_MODE_NEON, some part of
> > > the kernel may be able to use FPSIMD/SVE. This is for instance the case
> > > for crypto code.
> > > 
> > > Any use of FPSIMD/SVE in the kernel are clearly marked by using the
> > > function kernel_neon_{begin, end}. Furthermore, this can only be used
> > > when may_use_simd() returns true.
> > 
> > This is equal what x86 is currently doing. The naming is slightly
> > different, there is irq_fpu_usable().
> 
> Yes, I think it's basically the same idea.
> 
> It's been evolving a bit on both sides, but is quite similar now.

I though that this is complicated and wanted to submit a patch to remove
irq_fpu_usable() and disable BH as part of kernel_fpu_begin() (but have
currently the onother FPU series ongoing which I want to finish first).

…
> "Usually" is probably not good enough if another task can run: if the
> preempting task enters userspace then the vector registers are needed
> for its use, which is tricky to arrange if the registers are currently
> in use by context switch logic running in the first task.

Yes.

> My current feeling is that we probably have to stick with
> preempt_disable() here, but hopefully we can get rid of
> local_bh_disable() (as proposed) with no ill effects...
> 
> Does that sound sensible?

If you want to stick with may_use_simd() then yes.

> Cheers
> ---Dave

Sebastian

  parent reply	other threads:[~2019-02-13 16:50 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 [this message]
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
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
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=20190213165034.mda5rdfwsxbcdtfa@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=Dave.Martin@arm.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=julien.grall@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;
as well as URLs for NNTP newsgroup(s).