Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1685699 > unrolled thread

Decreasing time for `rsa_init`

Started byPaul Menzel <pmenzel@molgen.mpg.de>
First post2017-07-12 13:10 +0200
Last post2017-07-13 20:30 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  Decreasing time for `rsa_init` Paul Menzel <pmenzel@molgen.mpg.de> - 2017-07-12 13:10 +0200
    Re: Decreasing time for `rsa_init` Stephan Müller <smueller@chronox.de> - 2017-07-12 19:30 +0200
      Re: Decreasing time for `rsa_init` Paul Menzel <pmenzel@molgen.mpg.de> - 2017-07-12 19:40 +0200
        Re: Decreasing time for `rsa_init` Paul Menzel <pmenzel@molgen.mpg.de> - 2017-07-13 20:30 +0200

#1685699 — Decreasing time for `rsa_init`

FromPaul Menzel <pmenzel@molgen.mpg.de>
Date2017-07-12 13:10 +0200
SubjectDecreasing time for `rsa_init`
Message-ID<u2nGO-7sP-19@gated-at.bofh.it>
Dear Linux crypto folks,


Building CRYPTO_RSA not as module, but into the Linux kernel, 
`rsa_init()` takes 130 ms on an ASRock E350M1.

(Timings are shown by adding `initcall_debug` to Linux command line [1]. 
The times are visualized by `analyze_boot.py` from pm-graph [2] or 
`systemd-bootchart`.)

This is quite a lot of time compared to other modules, and I wonder if 
there are ways to decrease that time other than building it as a module, 
and not signing modules?


Kind regards,

Paul


[1] http://elinux.org/Initcall_Debug
[2] https://github.com/01org/pm-graph

[toc] | [next] | [standalone]


#1685926

FromStephan Müller <smueller@chronox.de>
Date2017-07-12 19:30 +0200
Message-ID<u2tCy-2IA-15@gated-at.bofh.it>
In reply to#1685699
Am Mittwoch, 12. Juli 2017, 12:59:58 CEST schrieb Paul Menzel:

Hi Paul,

> Dear Linux crypto folks,
> 
> 
> Building CRYPTO_RSA not as module, but into the Linux kernel,
> `rsa_init()` takes 130 ms on an ASRock E350M1.
> 
> (Timings are shown by adding `initcall_debug` to Linux command line [1].
> The times are visualized by `analyze_boot.py` from pm-graph [2] or
> `systemd-bootchart`.)
> 
> This is quite a lot of time compared to other modules, and I wonder if
> there are ways to decrease that time other than building it as a module,
> and not signing modules?

Is the testmgr compiled? If yes, the self test may take that time.
> 
> 
> Kind regards,
> 
> Paul
> 
> 
> [1] http://elinux.org/Initcall_Debug
> [2] https://github.com/01org/pm-graph



Ciao
Stephan

[toc] | [prev] | [next] | [standalone]


#1685933

FromPaul Menzel <pmenzel@molgen.mpg.de>
Date2017-07-12 19:40 +0200
Message-ID<u2tMe-2LF-33@gated-at.bofh.it>
In reply to#1685926
Dear Stephan,


Thank you for the quick response.


On 07/12/17 19:28, Stephan Müller wrote:
> Am Mittwoch, 12. Juli 2017, 12:59:58 CEST schrieb Paul Menzel:

>> Building CRYPTO_RSA not as module, but into the Linux kernel,
>> `rsa_init()` takes 130 ms on an ASRock E350M1.
>>
>> (Timings are shown by adding `initcall_debug` to Linux command line [1].
>> The times are visualized by `analyze_boot.py` from pm-graph [2] or
>> `systemd-bootchart`.)
>>
>> This is quite a lot of time compared to other modules, and I wonder if
>> there are ways to decrease that time other than building it as a module,
>> and not signing modules?
> 
> Is the testmgr compiled? If yes, the self test may take that time.

It looks like it is, as the tests are not disabled.

```
$ grep MANAGER_DISABLE_TESTS .config
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
```

I’ll try an image without the tests, and will report back.


Kind regards,

Paul


>> [1] http://elinux.org/Initcall_Debug
>> [2] https://github.com/01org/pm-graph

[toc] | [prev] | [next] | [standalone]


#1686837

FromPaul Menzel <pmenzel@molgen.mpg.de>
Date2017-07-13 20:30 +0200
Message-ID<u2R2a-FW-25@gated-at.bofh.it>
In reply to#1685933
Dear Stephan,


Am Mittwoch, den 12.07.2017, 19:38 +0200 schrieb Paul Menzel:

> On 07/12/17 19:28, Stephan Müller wrote:
> > Am Mittwoch, 12. Juli 2017, 12:59:58 CEST schrieb Paul Menzel:
> > > Building CRYPTO_RSA not as module, but into the Linux kernel,
> > > `rsa_init()` takes 130 ms on an ASRock E350M1.
> > > 
> > > (Timings are shown by adding `initcall_debug` to Linux command
> > > line [1].
> > > The times are visualized by `analyze_boot.py` from pm-graph [2]
> > > or `systemd-bootchart`.)
> > > 
> > > This is quite a lot of time compared to other modules, and I
> > > wonder if
> > > there are ways to decrease that time other than building it as a
> > > module,
> > > and not signing modules?
> > 
> > Is the testmgr compiled? If yes, the self test may take that time.
> 
> It looks like it is, as the tests are not disabled.
> 
> ```
> $ grep MANAGER_DISABLE_TESTS .config
> # CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
> ```
> 
> I’ll try an image without the tests, and will report back.

Thank you. That was it. Disabling the tests reduces the time to 51 μs.

```
kernel: calling  rsa_init+0x0/0x40 @ 1
kernel: initcall rsa_init+0x0/0x40 returned 0 after 51 usecs
```

It’d be nice to be able to disable the testmgr during run-time by
adding an option to the Linux Kernel command line for example.


Kind regards,

Paul


> > > [1] http://elinux.org/Initcall_Debug
> > > [2] https://github.com/01org/pm-graph

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web