All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qemumips: Use 34Kf CPU emulation
@ 2020-07-29  2:28 Khem Raj
  2020-07-29  9:56 ` [OE-core] " Richard Purdie
       [not found] ` <162630A032FCBA1C.9067@lists.openembedded.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Khem Raj @ 2020-07-29  2:28 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj

Few years ago we switched to using mips32r2 tunings for qemumips however
the default CPU emulation still remained 24Kf which is not optimal for
mips32r2 ISA for qemu [1], therefore switch to recommended 32Kf for CPU
emulation when running qemu in system mode

Boot time to console is ~1s faster with this setting, hopefully this
should speed up qemumips in general

[1] https://www.qemu.org/docs/master/system/target-mips.html#preferred-cpu-models-for-mips-hosts

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/conf/machine/qemumips.conf | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/conf/machine/qemumips.conf b/meta/conf/machine/qemumips.conf
index 31ad754483..4617c3c7b6 100644
--- a/meta/conf/machine/qemumips.conf
+++ b/meta/conf/machine/qemumips.conf
@@ -12,3 +12,5 @@ KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
 SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1"
 
 QB_SYSTEM_NAME = "qemu-system-mips"
+
+QB_CPU = "-cpu 34Kf"
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH] qemumips: Use 34Kf CPU emulation
  2020-07-29  2:28 [PATCH] qemumips: Use 34Kf CPU emulation Khem Raj
@ 2020-07-29  9:56 ` Richard Purdie
       [not found] ` <162630A032FCBA1C.9067@lists.openembedded.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2020-07-29  9:56 UTC (permalink / raw)
  To: Khem Raj, openembedded-core

On Tue, 2020-07-28 at 19:28 -0700, Khem Raj wrote:
> Few years ago we switched to using mips32r2 tunings for qemumips however
> the default CPU emulation still remained 24Kf which is not optimal for
> mips32r2 ISA for qemu [1], therefore switch to recommended 32Kf for CPU
> emulation when running qemu in system mode
> 
> Boot time to console is ~1s faster with this setting, hopefully this
> should speed up qemumips in general
> 
> [1] https://www.qemu.org/docs/master/system/target-mips.html#preferred-cpu-models-for-mips-hosts
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/conf/machine/qemumips.conf | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/conf/machine/qemumips.conf b/meta/conf/machine/qemumips.conf
> index 31ad754483..4617c3c7b6 100644
> --- a/meta/conf/machine/qemumips.conf
> +++ b/meta/conf/machine/qemumips.conf
> @@ -12,3 +12,5 @@ KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
>  SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1"
>  
>  QB_SYSTEM_NAME = "qemu-system-mips"
> +
> +QB_CPU = "-cpu 34Kf"

Thanks!

I did run some tests locally, timing core-image-sato -c testimage
before and after this change. It took 999s before, 1018s after but the
difference looks like noise rather than any speedup or slowdown.

Its certainly worth a try to see if it helps the intermittent failures
though.

Cheers,

Richard


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH] qemumips: Use 34Kf CPU emulation
       [not found] ` <162630A032FCBA1C.9067@lists.openembedded.org>
@ 2020-07-29 10:13   ` Richard Purdie
  2020-07-29 17:58     ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2020-07-29 10:13 UTC (permalink / raw)
  To: Khem Raj, openembedded-core

On Wed, 2020-07-29 at 10:56 +0100, Richard Purdie via
lists.openembedded.org wrote:
> On Tue, 2020-07-28 at 19:28 -0700, Khem Raj wrote:
> > Few years ago we switched to using mips32r2 tunings for qemumips
> > however
> > the default CPU emulation still remained 24Kf which is not optimal
> > for
> > mips32r2 ISA for qemu [1], therefore switch to recommended 32Kf for
> > CPU
> > emulation when running qemu in system mode
> > 
> > Boot time to console is ~1s faster with this setting, hopefully
> > this
> > should speed up qemumips in general
> > 
> > [1] 
> > https://www.qemu.org/docs/master/system/target-mips.html#preferred-cpu-models-for-mips-hosts
> > 
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> >  meta/conf/machine/qemumips.conf | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/meta/conf/machine/qemumips.conf
> > b/meta/conf/machine/qemumips.conf
> > index 31ad754483..4617c3c7b6 100644
> > --- a/meta/conf/machine/qemumips.conf
> > +++ b/meta/conf/machine/qemumips.conf
> > @@ -12,3 +12,5 @@ KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
> >  SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1"
> >  
> >  QB_SYSTEM_NAME = "qemu-system-mips"
> > +
> > +QB_CPU = "-cpu 34Kf"
> 
> Thanks!
> 
> I did run some tests locally, timing core-image-sato -c testimage
> before and after this change. It took 999s before, 1018s after but
> the difference looks like noise rather than any speedup or slowdown.

Another try at "after" got 986s so who knows :)

Cheers,

Richard


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH] qemumips: Use 34Kf CPU emulation
  2020-07-29 10:13   ` Richard Purdie
@ 2020-07-29 17:58     ` Khem Raj
  0 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2020-07-29 17:58 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer

On Wed, Jul 29, 2020 at 3:13 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Wed, 2020-07-29 at 10:56 +0100, Richard Purdie via
> lists.openembedded.org wrote:
> > On Tue, 2020-07-28 at 19:28 -0700, Khem Raj wrote:
> > > Few years ago we switched to using mips32r2 tunings for qemumips
> > > however
> > > the default CPU emulation still remained 24Kf which is not optimal
> > > for
> > > mips32r2 ISA for qemu [1], therefore switch to recommended 32Kf for
> > > CPU
> > > emulation when running qemu in system mode
> > >
> > > Boot time to console is ~1s faster with this setting, hopefully
> > > this
> > > should speed up qemumips in general
> > >
> > > [1]
> > > https://www.qemu.org/docs/master/system/target-mips.html#preferred-cpu-models-for-mips-hosts
> > >
> > > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > > ---
> > >  meta/conf/machine/qemumips.conf | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/meta/conf/machine/qemumips.conf
> > > b/meta/conf/machine/qemumips.conf
> > > index 31ad754483..4617c3c7b6 100644
> > > --- a/meta/conf/machine/qemumips.conf
> > > +++ b/meta/conf/machine/qemumips.conf
> > > @@ -12,3 +12,5 @@ KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
> > >  SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1"
> > >
> > >  QB_SYSTEM_NAME = "qemu-system-mips"
> > > +
> > > +QB_CPU = "-cpu 34Kf"
> >
> > Thanks!
> >
> > I did run some tests locally, timing core-image-sato -c testimage
> > before and after this change. It took 999s before, 1018s after but
> > the difference looks like noise rather than any speedup or slowdown.
>
> Another try at "after" got 986s so who knows :)
>

Yeah I saw that first boot was slower but reboots were always 1s
faster, but hopefully it
will help with irregular timeouts on tests which is what we are looking for.

> Cheers,
>
> Richard
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-29 17:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29  2:28 [PATCH] qemumips: Use 34Kf CPU emulation Khem Raj
2020-07-29  9:56 ` [OE-core] " Richard Purdie
     [not found] ` <162630A032FCBA1C.9067@lists.openembedded.org>
2020-07-29 10:13   ` Richard Purdie
2020-07-29 17:58     ` Khem Raj

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.