[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emulate Rpi with QEMU fails
From: |
Paul Zimmerman |
Subject: |
Re: Emulate Rpi with QEMU fails |
Date: |
Thu, 8 Oct 2020 19:21:50 -0700 |
Running 'top -H' (to show individual threads) I see qemu is using 6 to 7
threads while running, and each thread is taking from 15% to 70% or so
of cpu time. So probably qemu is not able to spread the work among the
threads evenly enough to use all the cpu time available.
Might be an interesting area of investigation for someone motivated
enough :)
- Paul
On Thu, Oct 8, 2020 at 2:07 PM Paul Zimmerman <pauldzim@gmail.com> wrote:
>
> Hi Thomas,
>
> What does 'top' say while the emulation is running? I have an 8 cpu-thread
> system, yet 'top' never shows more than about 300% cpu. I would have
> thought it would get closer to 800% cpu. And running qemu as root with
> nice -20 doesn't seem to make much difference.
>
> - Paul
>
> On Thu, Oct 8, 2020 at 12:00 AM Thomas <74cmonty@gmail.com> wrote:
> >
> > Interesting enough is: my top figure reported by perf is like yours:
> >
> > Samples: 6M of event 'cycles:u', Event count (approx.): 1936571734942
> > Overhead Command Shared Object Symbol
> > 7,95% qemu-system-arm qemu-system-arm [.]
> > helper_lookup_tb_ptr
> > ◆
> > 4,16% qemu-system-arm qemu-system-arm [.]
> > cpu_get_tb_cpu_state
> > ▒
> > 2,52% qemu-system-arm libpthread-2.32.so [.]
> > __pthread_mutex_lock
> > ▒
> > 2,06% qemu-system-arm qemu-system-arm [.]
> > qht_lookup_custom
> > ▒
> > 1,66% qemu-system-arm qemu-system-arm [.]
> > tlb_set_page_with_attrs
> > ▒
> > 1,61% qemu-system-arm libpthread-2.32.so [.]
> > __pthread_mutex_unlock_usercnt
> > ▒
> > 1,59% qemu-system-arm qemu-system-arm [.]
> > get_phys_addr
> > ▒
> > 1,27% qemu-system-arm qemu-system-arm [.]
> > cpu_exec
> > ▒
> > 1,23% qemu-system-arm qemu-system-arm [.]
> > object_class_dynamic_cast_assert
> > ▒
> > 0,98% qemu-system-arm libc-2.32.so [.]
> > _int_malloc
> > ▒
> > 0,95% qemu-system-arm qemu-system-arm [.]
> > object_dynamic_cast_assert
> > ▒
> > 0,95% qemu-system-arm qemu-system-arm [.]
> > tb_htable_lookup
> > ▒
> > 0,92% qemu-system-arm qemu-system-arm [.]
> > tcg_gen_code
> > ▒
> > 0,91% qemu-system-arm qemu-system-arm [.]
> > qemu_mutex_lock_impl
> > ▒
> > 0,75% qemu-system-arm qemu-system-arm [.]
> > get_page_addr_code_hostp
> > ▒
> > 0,73% qemu-system-arm qemu-system-arm [.]
> > tcg_optimize
> > ▒
> > 0,71% qemu-system-arm qemu-system-arm [.]
> > qemu_mutex_unlock_impl
> > ▒
> > 0,69% qemu-system-arm libc-2.32.so [.]
> > _int_free
> > ▒
> > 0,64% qemu-system-arm qemu-system-arm [.]
> > tb_flush_jmp_cache
> > ▒
> > 0,63% qemu-system-arm qemu-system-arm [.]
> > address_space_ldl_le
> > ▒
> > 0,62% qemu-system-arm libpthread-2.32.so [.]
> > __lll_lock_wait
> > ▒
> > 0,58% qemu-system-arm libpthread-2.32.so [.]
> > pthread_cond_wait@@GLIBC_2.3.2
> > ▒
> > 0,52% qemu-system-arm qemu-system-arm [.]
> > cpu_reset_interrupt
> > ▒
> > 0,52% qemu-system-arm libc-2.32.so [.]
> > cfree@GLIBC_2.2.5
> > ▒
> > 0,52% qemu-system-arm qemu-system-arm [.]
> > qemu_set_irq
> > ▒
> >
> > However the absolute time is 3-4 minutes.
> > And I don't know where I should start optimization now.
> >
> >
> >
> > Am 07.10.20 um 14:02 schrieb Alex Bennée:
> > > Thomas Schneider <74cmonty@gmail.com> writes:
> > >
> > >> Are you referring to this tool?
> > >> https://github.com/stefano-garzarella/qemu-boot-time
> > >> <https://github.com/stefano-garzarella/qemu-boot-time>
> > > No - just plain perf:
> > >
> > > perf record $QEMU $ARGS
> > >
> > > Then a "perf report" which will show you the hotspots, for example:
> > >
> > > 8.92% qemu-system-aar qemu-system-aarch64 [.]
> > > helper_lookup_tb_ptr
> > > 4.76% qemu-system-aar qemu-system-aarch64 [.] liveness_pass_1
> > > 3.69% qemu-system-aar qemu-system-aarch64 [.] tcg_gen_code
> > > 2.95% qemu-system-aar qemu-system-aarch64 [.] qht_lookup_custom
> > > 2.93% qemu-system-aar qemu-system-aarch64 [.] tcg_optimize
> > > 1.28% qemu-system-aar qemu-system-aarch64 [.]
> > > tcg_out_opc.isra.15
> > > 1.09% qemu-system-aar qemu-system-aarch64 [.] get_phys_addr_lpae
> > > 1.09% qemu-system-aar [kernel.kallsyms] [k]
> > > isolate_freepages_block
> > > 1.05% qemu-system-aar qemu-system-aarch64 [.]
> > > cpu_get_tb_cpu_state
> > > 0.98% qemu-system-aar [kernel.kallsyms] [k] do_syscall_64
> > > 0.94% qemu-system-aar qemu-system-aarch64 [.] tb_lookup_cmp
> > > 0.78% qemu-system-aar qemu-system-aarch64 [.] init_ts_info
> > > 0.73% qemu-system-aar qemu-system-aarch64 [.] tb_htable_lookup
> > > 0.73% qemu-system-aar qemu-system-aarch64 [.] tb_gen_code
> > > 0.73% qemu-system-aar qemu-system-aarch64 [.]
> > > tlb_set_page_with_attrs
> > >
> > >>
> > >> Am 07.10.2020 um 13:00 schrieb Alex Bennée:
> > >>> perf to record your boot
> > >
> >
- Re: Emulate Rpi with QEMU fails, (continued)
- Re: Emulate Rpi with QEMU fails, Paul Zimmerman, 2020/10/06
- Re: Emulate Rpi with QEMU fails, Alex Bennée, 2020/10/06
- Re: Emulate Rpi with QEMU fails, Thomas, 2020/10/07
- Re: Emulate Rpi with QEMU fails, Paul Zimmerman, 2020/10/07
- Re: Emulate Rpi with QEMU fails, Thomas Schneider, 2020/10/07
- Re: Emulate Rpi with QEMU fails, Alex Bennée, 2020/10/07
- Re: Emulate Rpi with QEMU fails, Thomas Schneider, 2020/10/07
- Re: Emulate Rpi with QEMU fails, Alex Bennée, 2020/10/07
- Re: Emulate Rpi with QEMU fails, Thomas, 2020/10/08
- Re: Emulate Rpi with QEMU fails, Paul Zimmerman, 2020/10/08
- Re: Emulate Rpi with QEMU fails,
Paul Zimmerman <=
- Re: Emulate Rpi with QEMU fails, Alex Bennée, 2020/10/09