All of lore.kernel.org
 help / color / mirror / Atom feed
From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v3 0/4] Simplify kernel-mode NEON
Date: Wed, 31 May 2017 11:07:56 +0000	[thread overview]
Message-ID: <CAKv+Gu_V41O67etpYErj_xX1JG+RcSxkq25WpFwTvyBNDETa8w@mail.gmail.com> (raw)
In-Reply-To: <20170531100758.GA30160@e103592.cambridge.arm.com>

On 31 May 2017 at 10:08, Dave Martin <Dave.Martin@arm.com> wrote:
> On Wed, May 31, 2017 at 08:41:01AM +0000, Ard Biesheuvel wrote:
>> On 30 May 2017 at 18:02, Dave Martin <Dave.Martin@arm.com> wrote:
>> > On Thu, May 25, 2017 at 07:24:57PM +0100, Dave Martin wrote:
>> >> This series aims to simplify kernel-mode NEON.
>> >
>> > Hi Ard, do you have any further comments on this series?
>> >
>> > I'd like to have it finalised as far as possible (modulo minor tweaks
>> > and bugfixes) so that I can port the SVE patches on top of it.
>> >
>> > Also, how do you think we should handle merging of this change?  There's
>> > a flag-day issue here, since the kernel_mode_neon() API is being changed
>> > in an incompatible way.
>> >
>>
>> I think the patches look fine now. The best way to merge these imo is
>> to start with the changes in the clients, i.e., add an arm64 specific
>> asm/simd.h that defines may_use_simd() as { return true; }, update all
>> the crypto code with the fallbacks, and put this stuff on top of that.
>
> Yes, that sounds feasible.
>
> Something like [1] below?  Either way, it probably makes sense for that
> stub function to be added by your series.
>

Pretty much, yeah. But don't forget to remove simd.h from
arch/arm64/include/asm/Kbuild

>> That way, there is a small window where the 'hint' is interpreted
>> differently in the sha256 code, but apart from that, we should be
>> bisection proof without a flag day AFAICT.
>>
>> BTW I got my ZD1211 working on my MacchiatioBin board. The performance
>> is terrible, but that should not matter: if I can saturate a CPU doing
>
> Do you mean that my series causes a performance regression here, or is
> the performance terrible anyway?
>

No, the performance is terrible, which shouldn't matter per se, but it
would be nice if the load induced by the mac80211 were visible in
'top' as wait, sys or whatever-it-is-called time. Currently, the 3
Mbit/s throughput combined with the 2.2 cycles per byte performance of
the AES-CCM code makes the code unnoticeable.

>> NEON from userland and/or kernel process context, the softirq
>> interruptions by the mac80211 code should exercise the updated code
>> paths. I haven't tried that yet: let me get the code changes out
>> today, so you can put your stuff on top. Then we can give it a good
>> spin.
>
> That would be great, thanks.
>

I have updated my branch here:
https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/log/?h=kernel-mode-neon

I removed all kernel_neon_begin_partial() invocations as well.

-- 
Ard.

  reply	other threads:[~2017-05-31 11:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-25 18:24 [RFC PATCH v3 0/4] Simplify kernel-mode NEON Dave Martin
2017-05-25 18:24 ` [RFC PATCH v3 1/4] arm64: neon: Add missing header guard in <asm/neon.h> Dave Martin
2017-05-31 11:41   ` Ard Biesheuvel
2017-05-25 18:24 ` [RFC PATCH v3 2/4] arm64: fpsimd: Consistently use __this_cpu_ ops where appropriate Dave Martin
2017-05-31 11:43   ` Ard Biesheuvel
2017-05-25 18:25 ` [RFC PATCH v3 3/4] arm64: neon: Remove support for nested or hardirq kernel-mode NEON Dave Martin
2017-05-31 11:51   ` Ard Biesheuvel
2017-05-25 18:25 ` [RFC PATCH v3 4/4] arm64: neon: Add backwards compatibility kernel_neon_begin_partial() Dave Martin
2017-05-30 18:02 ` [RFC PATCH v3 0/4] Simplify kernel-mode NEON Dave Martin
2017-05-31  8:41   ` Ard Biesheuvel
2017-05-31 10:08     ` Dave Martin
2017-05-31 11:07       ` Ard Biesheuvel [this message]
2017-05-31 11:33         ` Dave Martin

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=CAKv+Gu_V41O67etpYErj_xX1JG+RcSxkq25WpFwTvyBNDETa8w@mail.gmail.com \
    --to=ard.biesheuvel@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.