mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Martin <Dave.Martin@arm.com>
To: Julien Grall <julien.grall@arm.com>
Cc: ard.biesheuvel@linaro.org, marc.zyngier@arm.com,
	catalin.marinas@arm.com, julien.thierry@arm.com,
	will.deacon@arm.com, linux-kernel@vger.kernel.org,
	christoffer.dall@arm.com, james.morse@arm.com,
	linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com
Subject: Re: [PATCH v2 3/3] arm64/fpsimd: Don't disable softirq when touching FPSIMD/SVE state
Date: Tue, 23 Apr 2019 12:23:19 +0100	[thread overview]
Message-ID: <20190423112317.GK3567@e103592.cambridge.arm.com> (raw)
In-Reply-To: <80c6b8cd-5ea9-7fa3-7a3b-8b3af686f737@arm.com>

On Tue, Apr 23, 2019 at 11:59:44AM +0100, Julien Grall wrote:
> Hi Dave,
> 
> On 4/17/19 3:01 PM, Dave Martin wrote:
> >On Wed, Apr 17, 2019 at 12:37:57PM +0100, Julien Grall wrote:
> >>Hi Dave,
> >>
> >>On 16/04/2019 13:30, Dave Martin wrote:
> >>>On Fri, Apr 12, 2019 at 06:14:20PM +0100, Julien Grall wrote:

[...]

> >>>>@@ -1125,19 +1194,18 @@ static void fpsimd_flush_cpu_state(void)
> >>>>  /*
> >>>>   * Save the FPSIMD state to memory and invalidate cpu view.
> >>>>- * This function must be called with softirqs (and preemption) disabled.
> >>>>+ * This function must be called with preemption disabled.
> >>>>   */
> >>>>  void fpsimd_save_and_flush_cpu_state(void)
> >>>>  {
> >>>>+	__get_cpu_fpsimd_context();
> >>>>  	fpsimd_save();
> >>>>  	fpsimd_flush_cpu_state();
> >>>>+	__put_cpu_fpsimd_context();
> >>>
> >>>It may be cleaner to avoid the assumption about preemption already being
> >>>disabled here.  fpsimd_thread_switch() is rather a special case, but for
> >>>this one is this really used on a hot path that justifies the assumption?
> >>
> >>It is currently only called with preemption disabled. So I thought it would
> >>be better to avoid disabling preemption again. But I am happy to use the
> >>non-__ version if you think it is better.
> >
> >Hmmm, this works either way.  Since this is not fast-path and has an
> >external caller, it might be worth adding a WARN_ON(preemptible()) here
> >if you want to stick with the __ functions.
> 
> As it is not a fastpath, I will use the non-underscore version.

OK, either is good for me.

Cheers
---Dave

      reply	other threads:[~2019-04-23 11:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12 17:14 [PATCH v2 0/3] " Julien Grall
2019-04-12 17:14 ` [PATCH v2 1/3] arm64/fpsimd: Remove the prototype for sve_flush_cpu_state() Julien Grall
2019-04-16 11:41   ` Dave Martin
2019-04-12 17:14 ` [PATCH v2 2/3] arch/arm64: fpsimd: Introduce fpsimd_save_and_flush_cpu_state() and use it Julien Grall
2019-04-16 11:53   ` Dave Martin
2019-04-16 12:07     ` Julien Grall
2019-04-12 17:14 ` [PATCH v2 3/3] arm64/fpsimd: Don't disable softirq when touching FPSIMD/SVE state Julien Grall
2019-04-16 12:30   ` Dave Martin
2019-04-17 11:37     ` Julien Grall
2019-04-17 14:01       ` Dave Martin
2019-04-23 10:59         ` Julien Grall
2019-04-23 11:23           ` Dave Martin [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=20190423112317.GK3567@e103592.cambridge.arm.com \
    --to=dave.martin@arm.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=christoffer.dall@arm.com \
    --cc=james.morse@arm.com \
    --cc=julien.grall@arm.com \
    --cc=julien.thierry@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=suzuki.poulose@arm.com \
    --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

all inboxes | Powered by JetHome®