All of lore.kernel.org
 help / color / mirror / Atom feed
* qemu -display sdl,gl=on also eats CPU
@ 2020-08-17  4:42 Andrew Randrianasulu
       [not found] ` <202008170742.42032.randrianasulu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Randrianasulu @ 2020-08-17  4:42 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

I was testing Ilia's patches for ddx, and while they definitely helped for Xorg itself, 
qemu still eats a lot of CPU if launched like this

qemu-system-x86_64 -cdrom ~/Downloads/ISO/slax-English-US-7.0.8-x86_64.iso -m 1G -display sdl,gl=on -enable-kvm

and left for few hours.

top - 07:38:01 up 18:05,  2 users,  load average: 2,00, 1,89, 1,83
Tasks: 224 total,   3 running, 221 sleeping,   0 stopped,   0 zombie
%Cpu(s): 40,6 us,  6,1 sy,  0,3 ni, 49,2 id,  0,8 wa,  0,0 hi,  2,9 si,  0,0 st
MiB Mem :  11875,3 total,   3535,7 free,   3339,3 used,   5000,3 buff/cache
MiB Swap:   1145,0 total,   1131,2 free,     13,8 used.   4874,7 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 6215 guest     20   0 1455160 951768  45560 R  99,3   7,8 710:44.44 qemu-system-x86
12655 guest     20   0 2459848   1,5g 126708 R  59,1  12,6 217:53.21 seamonkey
 1991 root      20   0  178112 109500  28840 S  20,9   0,9 187:20.05 Xorg
 2068 guest     20   0  104932  51660  30764 S   5,6   0,4  54:08.99 ktorrent
 6031 root      20   0       0      0      0 I   2,0   0,0   0:20.24 kworker/0:3-events
 3697 guest     20   0  382432  20308  13696 S   1,7   0,2  91:38.13 xmms
 2064 guest     20   0   55868  37048  23976 S   1,3   0,3   2:38.47 konsole
 2319 guest     20   0   40160  21248  18548 S   1,3   0,2  12:36.63 gkrellm
 5853 root      20   0       0      0      0 I   0,7   0,0   0:07.21 kworker/2:2-events

opreport after  operf --pid 6215 said:

opreport
Using /home/guest/botva/src/xf86-video-nouveau/oprofile_data/samples/ for samples directory.
CPU: AMD64 family15h, speed 3800 MHz (estimated)
Counted CPU_CLK_UNHALTED events (CPU Clocks not Halted) with a unit mask of 0x00 (No unit mask) count 100000
CPU_CLK_UNHALT...|
  samples|      %|
------------------
   260163 100.000 qemu-system-x86_64
        CPU_CLK_UNHALT...|
          samples|      %|
        ------------------
           144120 55.3960 nouveau_dri.so
            87990 33.8211 libdrm_nouveau.so.2.0.0
            11783  4.5291 libpixman-1.so.0.38.0
             7884  3.0304 kallsyms
             5310  2.0410 libc-2.30.so
              689  0.2648 ld-2.30.so
              519  0.1995 nouveau
              501  0.1926 qemu-system-x86_64
              456  0.1753 ttm
              239  0.0919 kvm
              211  0.0811 kvm_amd
               81  0.0311 libpthread-2.30.so
               76  0.0292 drm
               49  0.0188 libSDL2-2.0.so.0.12.0
               43  0.0165 libxcb.so.1.1.0
               36  0.0138 libGL.so.1.2.0
               31  0.0119 libX11.so.6.3.0
               24  0.0092 snd_pcm
               23  0.0088 snd_hda_codec
               20  0.0077 libglib-2.0.so.0.5800.1
               11  0.0042 snd_timer
                9  0.0035 libglapi.so.0.0.0
                8  0.0031 libdrm.so.2.4.0
                7  0.0027 snd_aloop
                7  0.0027 snd_hda_intel
                7  0.0027 libxshmfence.so.1.0.0
                7  0.0027 libgcc_s.so.1
                5  0.0019 [vdso] (tgid:6215 range:0xf7f9f000-0xf7f9ffff)
                5  0.0019 snd_hda_core
                4  0.0015 r8169
                3  0.0012 libahci
                2 7.7e-04 ohci_hcd
                2 7.7e-04 libxcb-present.so.0.0.0
                1 3.8e-04 libatomic.so.1.1.0

so, may be similar fix needed for mesa, too?

ow, I started it in ddx src directory :} need to cleanup there. But at least data is 100

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

* Re: qemu -display sdl,gl=on also eats CPU
       [not found] ` <202008170742.42032.randrianasulu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2020-08-17  5:09   ` Ilia Mirkin
       [not found]     ` <CAKb7UvghBJ46xD9u6MJEFvmbMYgZziq5sLQyRhZxVkVxcHZJqw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Ilia Mirkin @ 2020-08-17  5:09 UTC (permalink / raw)
  To: Andrew Randrianasulu; +Cc: nouveau

The DDX eating CPU isn't intrinsically bad. Did you check where perf
says the CPU time is going? Could be doing copies/etc.

On Mon, Aug 17, 2020 at 12:52 AM Andrew Randrianasulu
<randrianasulu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> I was testing Ilia's patches for ddx, and while they definitely helped for Xorg itself,
> qemu still eats a lot of CPU if launched like this
>
> qemu-system-x86_64 -cdrom ~/Downloads/ISO/slax-English-US-7.0.8-x86_64.iso -m 1G -display sdl,gl=on -enable-kvm
>
> and left for few hours.
>
> top - 07:38:01 up 18:05,  2 users,  load average: 2,00, 1,89, 1,83
> Tasks: 224 total,   3 running, 221 sleeping,   0 stopped,   0 zombie
> %Cpu(s): 40,6 us,  6,1 sy,  0,3 ni, 49,2 id,  0,8 wa,  0,0 hi,  2,9 si,  0,0 st
> MiB Mem :  11875,3 total,   3535,7 free,   3339,3 used,   5000,3 buff/cache
> MiB Swap:   1145,0 total,   1131,2 free,     13,8 used.   4874,7 avail Mem
>
>   PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
>  6215 guest     20   0 1455160 951768  45560 R  99,3   7,8 710:44.44 qemu-system-x86
> 12655 guest     20   0 2459848   1,5g 126708 R  59,1  12,6 217:53.21 seamonkey
>  1991 root      20   0  178112 109500  28840 S  20,9   0,9 187:20.05 Xorg
>  2068 guest     20   0  104932  51660  30764 S   5,6   0,4  54:08.99 ktorrent
>  6031 root      20   0       0      0      0 I   2,0   0,0   0:20.24 kworker/0:3-events
>  3697 guest     20   0  382432  20308  13696 S   1,7   0,2  91:38.13 xmms
>  2064 guest     20   0   55868  37048  23976 S   1,3   0,3   2:38.47 konsole
>  2319 guest     20   0   40160  21248  18548 S   1,3   0,2  12:36.63 gkrellm
>  5853 root      20   0       0      0      0 I   0,7   0,0   0:07.21 kworker/2:2-events
>
> opreport after  operf --pid 6215 said:
>
> opreport
> Using /home/guest/botva/src/xf86-video-nouveau/oprofile_data/samples/ for samples directory.
> CPU: AMD64 family15h, speed 3800 MHz (estimated)
> Counted CPU_CLK_UNHALTED events (CPU Clocks not Halted) with a unit mask of 0x00 (No unit mask) count 100000
> CPU_CLK_UNHALT...|
>   samples|      %|
> ------------------
>    260163 100.000 qemu-system-x86_64
>         CPU_CLK_UNHALT...|
>           samples|      %|
>         ------------------
>            144120 55.3960 nouveau_dri.so
>             87990 33.8211 libdrm_nouveau.so.2.0.0
>             11783  4.5291 libpixman-1.so.0.38.0
>              7884  3.0304 kallsyms
>              5310  2.0410 libc-2.30.so
>               689  0.2648 ld-2.30.so
>               519  0.1995 nouveau
>               501  0.1926 qemu-system-x86_64
>               456  0.1753 ttm
>               239  0.0919 kvm
>               211  0.0811 kvm_amd
>                81  0.0311 libpthread-2.30.so
>                76  0.0292 drm
>                49  0.0188 libSDL2-2.0.so.0.12.0
>                43  0.0165 libxcb.so.1.1.0
>                36  0.0138 libGL.so.1.2.0
>                31  0.0119 libX11.so.6.3.0
>                24  0.0092 snd_pcm
>                23  0.0088 snd_hda_codec
>                20  0.0077 libglib-2.0.so.0.5800.1
>                11  0.0042 snd_timer
>                 9  0.0035 libglapi.so.0.0.0
>                 8  0.0031 libdrm.so.2.4.0
>                 7  0.0027 snd_aloop
>                 7  0.0027 snd_hda_intel
>                 7  0.0027 libxshmfence.so.1.0.0
>                 7  0.0027 libgcc_s.so.1
>                 5  0.0019 [vdso] (tgid:6215 range:0xf7f9f000-0xf7f9ffff)
>                 5  0.0019 snd_hda_core
>                 4  0.0015 r8169
>                 3  0.0012 libahci
>                 2 7.7e-04 ohci_hcd
>                 2 7.7e-04 libxcb-present.so.0.0.0
>                 1 3.8e-04 libatomic.so.1.1.0
>
> so, may be similar fix needed for mesa, too?
>
> ow, I started it in ddx src directory :} need to cleanup there. But at least data is 100
>
> _______________________________________________
> Nouveau mailing list
> Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau

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

* Re: qemu -display sdl,gl=on also eats CPU
       [not found]     ` <CAKb7UvghBJ46xD9u6MJEFvmbMYgZziq5sLQyRhZxVkVxcHZJqw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2020-08-17  5:35       ` Andrew Randrianasulu
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Randrianasulu @ 2020-08-17  5:35 UTC (permalink / raw)
  To: Ilia Mirkin, nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

В сообщении от Monday 17 August 2020 08:09:37 вы написали:
> The DDX eating CPU isn't intrinsically bad. Did you check where perf
> says the CPU time is going? Could be doing copies/etc.

I think Xorg ended up eating ~13% CPU  after I quit most programs, but it 
was definitely better than much higher CPU usage before your patches.

I saw no additional debug messages in X log, so probably you covered 
my specific case well.

qemu was eating CPU in  nouveau_dri.so/libdrm_nouveau.so.2.0.0,
so I suspected something like 'too many error reports from vblanks' 
may happen there, too.

Unfortunately, my standard build command for mesa included --strip,
so opreport -c was not giving any additional details ...

I just recompiled DDX again with if 0'ed debug message, will see how 
it works alone, and then retry mesa build/qemu long-uptime testing ...

> 
> On Mon, Aug 17, 2020 at 12:52 AM Andrew Randrianasulu
> <randrianasulu@gmail.com> wrote:
> >
> > I was testing Ilia's patches for ddx, and while they definitely helped for Xorg itself,
> > qemu still eats a lot of CPU if launched like this
> >
> > qemu-system-x86_64 -cdrom ~/Downloads/ISO/slax-English-US-7.0.8-x86_64.iso -m 1G -display sdl,gl=on -enable-kvm
> >
> > and left for few hours.
> >
> > top - 07:38:01 up 18:05,  2 users,  load average: 2,00, 1,89, 1,83
> > Tasks: 224 total,   3 running, 221 sleeping,   0 stopped,   0 zombie
> > %Cpu(s): 40,6 us,  6,1 sy,  0,3 ni, 49,2 id,  0,8 wa,  0,0 hi,  2,9 si,  0,0 st
> > MiB Mem :  11875,3 total,   3535,7 free,   3339,3 used,   5000,3 buff/cache
> > MiB Swap:   1145,0 total,   1131,2 free,     13,8 used.   4874,7 avail Mem
> >
> >   PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
> >  6215 guest     20   0 1455160 951768  45560 R  99,3   7,8 710:44.44 qemu-system-x86
> > 12655 guest     20   0 2459848   1,5g 126708 R  59,1  12,6 217:53.21 seamonkey
> >  1991 root      20   0  178112 109500  28840 S  20,9   0,9 187:20.05 Xorg
> >  2068 guest     20   0  104932  51660  30764 S   5,6   0,4  54:08.99 ktorrent
> >  6031 root      20   0       0      0      0 I   2,0   0,0   0:20.24 kworker/0:3-events
> >  3697 guest     20   0  382432  20308  13696 S   1,7   0,2  91:38.13 xmms
> >  2064 guest     20   0   55868  37048  23976 S   1,3   0,3   2:38.47 konsole
> >  2319 guest     20   0   40160  21248  18548 S   1,3   0,2  12:36.63 gkrellm
> >  5853 root      20   0       0      0      0 I   0,7   0,0   0:07.21 kworker/2:2-events
> >
> > opreport after  operf --pid 6215 said:
> >
> > opreport
> > Using /home/guest/botva/src/xf86-video-nouveau/oprofile_data/samples/ for samples directory.
> > CPU: AMD64 family15h, speed 3800 MHz (estimated)
> > Counted CPU_CLK_UNHALTED events (CPU Clocks not Halted) with a unit mask of 0x00 (No unit mask) count 100000
> > CPU_CLK_UNHALT...|
> >   samples|      %|
> > ------------------
> >    260163 100.000 qemu-system-x86_64
> >         CPU_CLK_UNHALT...|
> >           samples|      %|
> >         ------------------
> >            144120 55.3960 nouveau_dri.so
> >             87990 33.8211 libdrm_nouveau.so.2.0.0
> >             11783  4.5291 libpixman-1.so.0.38.0
> >              7884  3.0304 kallsyms
> >              5310  2.0410 libc-2.30.so
> >               689  0.2648 ld-2.30.so
> >               519  0.1995 nouveau
> >               501  0.1926 qemu-system-x86_64
> >               456  0.1753 ttm
> >               239  0.0919 kvm
> >               211  0.0811 kvm_amd
> >                81  0.0311 libpthread-2.30.so
> >                76  0.0292 drm
> >                49  0.0188 libSDL2-2.0.so.0.12.0
> >                43  0.0165 libxcb.so.1.1.0
> >                36  0.0138 libGL.so.1.2.0
> >                31  0.0119 libX11.so.6.3.0
> >                24  0.0092 snd_pcm
> >                23  0.0088 snd_hda_codec
> >                20  0.0077 libglib-2.0.so.0.5800.1
> >                11  0.0042 snd_timer
> >                 9  0.0035 libglapi.so.0.0.0
> >                 8  0.0031 libdrm.so.2.4.0
> >                 7  0.0027 snd_aloop
> >                 7  0.0027 snd_hda_intel
> >                 7  0.0027 libxshmfence.so.1.0.0
> >                 7  0.0027 libgcc_s.so.1
> >                 5  0.0019 [vdso] (tgid:6215 range:0xf7f9f000-0xf7f9ffff)
> >                 5  0.0019 snd_hda_core
> >                 4  0.0015 r8169
> >                 3  0.0012 libahci
> >                 2 7.7e-04 ohci_hcd
> >                 2 7.7e-04 libxcb-present.so.0.0.0
> >                 1 3.8e-04 libatomic.so.1.1.0
> >
> > so, may be similar fix needed for mesa, too?
> >
> > ow, I started it in ddx src directory :} need to cleanup there. But at least data is 100
> >
> > _______________________________________________
> > Nouveau mailing list
> > Nouveau@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/nouveau
> 


_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

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

* Re: qemu -display sdl,gl=on also eats CPU
@ 2020-08-17 13:44 Andrew Randrianasulu
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Randrianasulu @ 2020-08-17 13:44 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

I rebuild mesa with debug symbols, and now top functions using CPU looks like this:


CPU: AMD64 family15h, speed 3800 MHz (estimated)
Counted CPU_CLK_UNHALTED events (CPU Clocks not Halted) with a unit mask of 0x00 (No unit mask) count 100000
samples  %        image name               symbol name
-------------------------------------------------------------------------------
222978   45.1489  nouveau_dri.so           nv50_bufctx_fence
  222978   100.000  nouveau_dri.so           nv50_bufctx_fence [self]
-------------------------------------------------------------------------------
150576   30.4889  libdrm_nouveau.so.2.0.0  /usr/X11R7/lib/libdrm_nouveau.so.2.0.0
  150576   100.000  libdrm_nouveau.so.2.0.0  /usr/X11R7/lib/libdrm_nouveau.so.2.0.0 [self]
-------------------------------------------------------------------------------
39524     8.0029  libpixman-1.so.0.38.0    /usr/X11R7/lib/libpixman-1.so.0.38.0
  39524    100.000  libpixman-1.so.0.38.0    /usr/X11R7/lib/libpixman-1.so.0.38.0 [self]
-------------------------------------------------------------------------------
28094     5.6885  libc-2.30.so             memcpy
  28094    100.000  libc-2.30.so             memcpy [self]
-------------------------------------------------------------------------------
13758     2.7857  kallsyms                 dma_direct_alloc_pages
  13758    100.000  kallsyms                 dma_direct_alloc_pages [self]
-------------------------------------------------------------------------------
2508      0.5078  qemu-system-x86_64       /usr/bin/qemu-system-x86_64
  2508     100.000  qemu-system-x86_64       /usr/bin/qemu-system-x86_64 [self]
-------------------------------------------------------------------------------
1953      0.3954  ttm                      /ttm
  1953     100.000  ttm                      /ttm [self]
-------------------------------------------------------------------------------
1661      0.3363  nouveau                  /nouveau
  1661     100.000  nouveau                  /nouveau [self]
-------------------------------------------------------------------------------
1462      0.2960  kallsyms                 find_next_iomem_res
  1462     100.000  kallsyms                 find_next_iomem_res [self]
-------------------------------------------------------------------------------
1355      0.2744  kvm_amd                  /kvm_amd
  1355     100.000  kvm_amd                  /kvm_amd [self]
-------------------------------------------------------------------------------
1273      0.2578  kvm                      /kvm
  1273     100.000  kvm                      /kvm [self]
-------------------------------------------------------------------------------
1208      0.2446  ld-2.30.so               _dl_update_slotinfo
  1208     100.000  ld-2.30.so               _dl_update_slotinfo [self]
-------------------------------------------------------------------------------
1126      0.2280  kallsyms                 atomic_try_cmpxchg
  1126     100.000  kallsyms                 atomic_try_cmpxchg [self]
-------------------------------------------------------------------------------
992       0.2009  libc-2.30.so             cfree@GLIBC_2.0
  992      100.000  libc-2.30.so             cfree@GLIBC_2.0 [self]
-------------------------------------------------------------------------------
833       0.1687  libc-2.30.so             malloc
  833      100.000  libc-2.30.so             malloc [self]
-------------------------------------------------------------------------------
810       0.1640  libc-2.30.so             _int_free
  810      100.000  libc-2.30.so             _int_free [self]
-------------------------------------------------------------------------------
772       0.1563  kallsyms                 __x86_indirect_thunk_rax
  772      100.000  kallsyms                 __x86_indirect_thunk_rax [self]
-------------------------------------------------------------------------------


CPU usage rose from 40% to 80% (at 1.4Ghz) over 6 hours of guest's uptime.

----------  Пересланное сообщение  ----------

Тема: Re: [Nouveau] qemu -display sdl,gl=on also eats CPU
Дата: Понедельник 17 августа 2020
Отправитель: Andrew Randrianasulu <randrianasulu@gmail.com>
Получатель:  Ilia Mirkin <imirkin@alum.mit.edu>, nouveau@lists.freedesktop.org

В сообщении от Monday 17 August 2020 08:09:37 вы написали:
> The DDX eating CPU isn't intrinsically bad. Did you check where perf
> says the CPU time is going? Could be doing copies/etc.

I think Xorg ended up eating ~13% CPU  after I quit most programs, but it 
was definitely better than much higher CPU usage before your patches.

I saw no additional debug messages in X log, so probably you covered 
my specific case well.

qemu was eating CPU in  nouveau_dri.so/libdrm_nouveau.so.2.0.0,
so I suspected something like 'too many error reports from vblanks' 
may happen there, too.

Unfortunately, my standard build command for mesa included --strip,
so opreport -c was not giving any additional details ...

I just recompiled DDX again with if 0'ed debug message, will see how 
it works alone, and then retry mesa build/qemu long-uptime testing ...

> 
> On Mon, Aug 17, 2020 at 12:52 AM Andrew Randrianasulu
> <randrianasulu@gmail.com> wrote:
> >
> > I was testing Ilia's patches for ddx, and while they definitely helped for Xorg itself,
> > qemu still eats a lot of CPU if launched like this
> >
> > qemu-system-x86_64 -cdrom ~/Downloads/ISO/slax-English-US-7.0.8-x86_64.iso -m 1G -display sdl,gl=on -enable-kvm
> >
> > and left for few hours.
> >
> > top - 07:38:01 up 18:05,  2 users,  load average: 2,00, 1,89, 1,83
> > Tasks: 224 total,   3 running, 221 sleeping,   0 stopped,   0 zombie
> > %Cpu(s): 40,6 us,  6,1 sy,  0,3 ni, 49,2 id,  0,8 wa,  0,0 hi,  2,9 si,  0,0 st
> > MiB Mem :  11875,3 total,   3535,7 free,   3339,3 used,   5000,3 buff/cache
> > MiB Swap:   1145,0 total,   1131,2 free,     13,8 used.   4874,7 avail Mem
> >
> >   PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
> >  6215 guest     20   0 1455160 951768  45560 R  99,3   7,8 710:44.44 qemu-system-x86
> > 12655 guest     20   0 2459848   1,5g 126708 R  59,1  12,6 217:53.21 seamonkey
> >  1991 root      20   0  178112 109500  28840 S  20,9   0,9 187:20.05 Xorg
> >  2068 guest     20   0  104932  51660  30764 S   5,6   0,4  54:08.99 ktorrent
> >  6031 root      20   0       0      0      0 I   2,0   0,0   0:20.24 kworker/0:3-events
> >  3697 guest     20   0  382432  20308  13696 S   1,7   0,2  91:38.13 xmms
> >  2064 guest     20   0   55868  37048  23976 S   1,3   0,3   2:38.47 konsole
> >  2319 guest     20   0   40160  21248  18548 S   1,3   0,2  12:36.63 gkrellm
> >  5853 root      20   0       0      0      0 I   0,7   0,0   0:07.21 kworker/2:2-events
> >
> > opreport after  operf --pid 6215 said:
> >
> > opreport
> > Using /home/guest/botva/src/xf86-video-nouveau/oprofile_data/samples/ for samples directory.
> > CPU: AMD64 family15h, speed 3800 MHz (estimated)
> > Counted CPU_CLK_UNHALTED events (CPU Clocks not Halted) with a unit mask of 0x00 (No unit mask) count 100000
> > CPU_CLK_UNHALT...|
> >   samples|      %|
> > ------------------
> >    260163 100.000 qemu-system-x86_64
> >         CPU_CLK_UNHALT...|
> >           samples|      %|
> >         ------------------
> >            144120 55.3960 nouveau_dri.so
> >             87990 33.8211 libdrm_nouveau.so.2.0.0
> >             11783  4.5291 libpixman-1.so.0.38.0
> >              7884  3.0304 kallsyms
> >              5310  2.0410 libc-2.30.so
> >               689  0.2648 ld-2.30.so
> >               519  0.1995 nouveau
> >               501  0.1926 qemu-system-x86_64
> >               456  0.1753 ttm
> >               239  0.0919 kvm
> >               211  0.0811 kvm_amd
> >                81  0.0311 libpthread-2.30.so
> >                76  0.0292 drm
> >                49  0.0188 libSDL2-2.0.so.0.12.0
> >                43  0.0165 libxcb.so.1.1.0
> >                36  0.0138 libGL.so.1.2.0
> >                31  0.0119 libX11.so.6.3.0
> >                24  0.0092 snd_pcm
> >                23  0.0088 snd_hda_codec
> >                20  0.0077 libglib-2.0.so.0.5800.1
> >                11  0.0042 snd_timer
> >                 9  0.0035 libglapi.so.0.0.0
> >                 8  0.0031 libdrm.so.2.4.0
> >                 7  0.0027 snd_aloop
> >                 7  0.0027 snd_hda_intel
> >                 7  0.0027 libxshmfence.so.1.0.0
> >                 7  0.0027 libgcc_s.so.1
> >                 5  0.0019 [vdso] (tgid:6215 range:0xf7f9f000-0xf7f9ffff)
> >                 5  0.0019 snd_hda_core
> >                 4  0.0015 r8169
> >                 3  0.0012 libahci
> >                 2 7.7e-04 ohci_hcd
> >                 2 7.7e-04 libxcb-present.so.0.0.0
> >                 1 3.8e-04 libatomic.so.1.1.0
> >
> > so, may be similar fix needed for mesa, too?
> >
> > ow, I started it in ddx src directory :} need to cleanup there. But at least data is 100
> >
> > _______________________________________________
> > Nouveau mailing list
> > Nouveau@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/nouveau
> 



-------------------------------------------------------
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

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

* Re: qemu -display sdl,gl=on also eats CPU
@ 2020-08-18  7:51 Andrew Randrianasulu
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Randrianasulu @ 2020-08-18  7:51 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

[-- Attachment #1: Type: text/plain, Size: 10053 bytes --]

Update, after few hours of qemu uptime
I can see this oreport:

CPU: AMD64 family15h, speed 3800 MHz (estimated)
Counted CPU_CLK_UNHALTED events (CPU Clocks not Halted) with a unit mask of 0x00 (No unit mask) count 100000
samples  %        linenr info                 image name               symbol name
-------------------------------------------------------------------------------
385793   53.1157  nv50_context.c:409          nouveau_dri.so           nv50_bufctx_fence
  385793   100.000  nv50_context.c:409          nouveau_dri.so           nv50_bufctx_fence [self]
-------------------------------------------------------------------------------
151037   20.7947  pushbuf.c:482               libdrm_nouveau.so.2.0.0  pushbuf_validate
  151037   100.000  pushbuf.c:482               libdrm_nouveau.so.2.0.0  pushbuf_validate [self]
-------------------------------------------------------------------------------
83835    11.5423  pushbuf.c:149               libdrm_nouveau.so.2.0.0  pushbuf_kref
  83835    100.000  pushbuf.c:149               libdrm_nouveau.so.2.0.0  pushbuf_kref [self]
-------------------------------------------------------------------------------
44660     6.1488  (no location information)   libpixman-1.so.0.38.0    /usr/X11R7/lib/libpixman-1.so.0.38.0
  44660    100.000  (no location information)   libpixman-1.so.0.38.0    /usr/X11R7/lib/libpixman-1.so.0.38.0 [self]
-------------------------------------------------------------------------------
16662     2.2940  (no location information)   libc-2.30.so             memcpy
  16662    100.000  (no location information)   libc-2.30.so             memcpy [self]
-------------------------------------------------------------------------------
8587      1.1823  (no location information)   kallsyms                 dma_direct_alloc_pages
  8587     100.000  (no location information)   kallsyms                 dma_direct_alloc_pages [self]
-------------------------------------------------------------------------------
2276      0.3134  (no location information)   kallsyms                 ioread32
  2276     100.000  (no location information)   kallsyms                 ioread32 [self]
-------------------------------------------------------------------------------
2033      0.2799  (no location information)   qemu-system-x86_64       /usr/bin/qemu-system-x86_64
  2033     100.000  (no location information)   qemu-system-x86_64       /usr/bin/qemu-system-x86_64 [self]
-------------------------------------------------------------------------------
1925      0.2650  (no location information)   libdrm_nouveau.so.2.0.0  __x86.get_pc_thunk.si
  1925     100.000  (no location information)   libdrm_nouveau.so.2.0.0  __x86.get_pc_thunk.si [self]
-------------------------------------------------------------------------------
1765      0.2430  (no location information)   nouveau                  /nouveau
  1765     100.000  (no location information)   nouveau                  /nouveau [self]
-------------------------------------------------------------------------------
1453      0.2000  (no location information)   ttm                      /ttm
  1453     100.000  (no location information)   ttm                      /ttm [self]
-------------------------------------------------------------------------------
1286      0.1771  (no location information)   ld-2.30.so               _dl_update_slotinfo
  1286     100.000  (no location information)   ld-2.30.so               _dl_update_slotinfo [self]
-------------------------------------------------------------------------------
1038      0.1429  (no location information)   kallsyms                 atomic_try_cmpxchg
  1038     100.000  (no location information)   kallsyms                 atomic_try_cmpxchg [self]
-------------------------------------------------------------------------------
990       0.1363  (no location information)   kallsyms                 find_next_iomem_res
  990      100.000  (no location information)   kallsyms                 find_next_iomem_res [self]
-------------------------------------------------------------------------------
837       0.1152  (no location information)   libc-2.30.so             cfree@GLIBC_2.0
  837      100.000  (no location information)   libc-2.30.so             cfree@GLIBC_2.0 [self]
-------------------------------------------------------------------------------
741       0.1020  (no location information)   libc-2.30.so             _int_free
  741      100.000  (no location information)   libc-2.30.so             _int_free [self]
-------------------------------------------------------------------------------
590       0.0812  (no location information)   libc-2.30.so             malloc
  590      100.000  (no location information)   libc-2.30.so             malloc [self]
-------------------------------------------------------------------------------


while initially it was:

 opreport -c -g  --session-dir=./1/oprofile_data/ | less

CPU: AMD64 family15h, speed 3800 MHz (estimated)
Counted CPU_CLK_UNHALTED events (CPU Clocks not Halted) with a unit mask of 0x00 (No unit mask) count 100000
samples  %        linenr info                 image name               symbol name
-------------------------------------------------------------------------------
70223    33.8331  (no location information)   libc-2.30.so             memcpy
  70223    100.000  (no location information)   libc-2.30.so             memcpy [self]
-------------------------------------------------------------------------------
36385    17.5301  (no location information)   libpixman-1.so.0.38.0    /usr/X11R7/lib/libpixman-1.so.0.38.0
  36385    100.000  (no location information)   libpixman-1.so.0.38.0    /usr/X11R7/lib/libpixman-1.so.0.38.0 [self]
-------------------------------------------------------------------------------
35130    16.9255  (no location information)   kallsyms                 dma_direct_alloc_pages
  35130    100.000  (no location information)   kallsyms                 dma_direct_alloc_pages [self]
-------------------------------------------------------------------------------
3885      1.8718  (no location information)   ttm                      /ttm
  3885     100.000  (no location information)   ttm                      /ttm [self]
-------------------------------------------------------------------------------
3873      1.8660  (no location information)   kallsyms                 find_next_iomem_res
  3873     100.000  (no location information)   kallsyms                 find_next_iomem_res [self]
-------------------------------------------------------------------------------
3429      1.6521  (no location information)   qemu-system-x86_64       /usr/bin/qemu-system-x86_64
  3429     100.000  (no location information)   qemu-system-x86_64       /usr/bin/qemu-system-x86_64 [self]
-------------------------------------------------------------------------------
2883      1.3890  (no location information)   nouveau                  /nouveau
  2883     100.000  (no location information)   nouveau                  /nouveau [self]
-------------------------------------------------------------------------------
2119      1.0209  (no location information)   kallsyms                 atomic_try_cmpxchg
  2119     100.000  (no location information)   kallsyms                 atomic_try_cmpxchg [self]
-------------------------------------------------------------------------------
1812      0.8730  (no location information)   kvm_amd                  /kvm_amd
  1812     100.000  (no location information)   kvm_amd                  /kvm_amd [self]
-------------------------------------------------------------------------------
1759      0.8475  nv50_context.c:409          nouveau_dri.so           nv50_bufctx_fence
  1759     100.000  nv50_context.c:409          nouveau_dri.so           nv50_bufctx_fence [self]
-------------------------------------------------------------------------------
1681      0.8099  (no location information)   kvm                      /kvm
  1681     100.000  (no location information)   kvm                      /kvm [self]
-------------------------------------------------------------------------------
1668      0.8036  (no location information)   kallsyms                 __x86_indirect_thunk_rax
  1668     100.000  (no location information)   kallsyms                 __x86_indirect_thunk_rax [self]
-------------------------------------------------------------------------------
1564      0.7535  (no location information)   kallsyms                 page_fault
  1564     100.000  (no location information)   kallsyms                 page_fault [self]
-------------------------------------------------------------------------------
1314      0.6331  image.c:121                 nouveau_dri.so           _mesa_image_offset
  1314     100.000  image.c:121                 nouveau_dri.so           _mesa_image_offset [self]
-------------------------------------------------------------------------------
1249      0.6018  pushbuf.c:482               libdrm_nouveau.so.2.0.0  pushbuf_validate
  1249     100.000  pushbuf.c:482               libdrm_nouveau.so.2.0.0  pushbuf_validate [self]
-------------------------------------------------------------------------------
1123      0.5411  (no location information)   kallsyms                 unmap_page_range
  1123     100.000  (no location information)   kallsyms                 unmap_page_range [self]
-------------------------------------------------------------------------------
1088      0.5242  (no location information)   kallsyms                 atomic_sub_return.constprop.3
  1088     100.000  (no location information)   kallsyms                 atomic_sub_return.constprop.3 [self]
-------------------------------------------------------------------------------

pixman/memcpy dominating initial profile probably OK, because guest uses vesa driver and KDE4  with 1920x1200 
resolution, scaled down to my monitor resolution 1440x900 :}

I'll attach compressed oprofile directories with data (from oprofile 1.2.0)

[-- Attachment #2: 1-qemu-samples_fresh.tar.gz --]
[-- Type: application/x-tgz, Size: 92765 bytes --]

[-- Attachment #3: 2-qemu-samples_mid.tar.gz --]
[-- Type: application/x-tgz, Size: 95381 bytes --]

[-- Attachment #4: 3-qemu-samples_last.tar.gz --]
[-- Type: application/x-tgz, Size: 69855 bytes --]

[-- Attachment #5: Type: text/plain, Size: 182 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

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

end of thread, other threads:[~2020-08-18  7:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-17  4:42 qemu -display sdl,gl=on also eats CPU Andrew Randrianasulu
     [not found] ` <202008170742.42032.randrianasulu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-08-17  5:09   ` Ilia Mirkin
     [not found]     ` <CAKb7UvghBJ46xD9u6MJEFvmbMYgZziq5sLQyRhZxVkVxcHZJqw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-08-17  5:35       ` Andrew Randrianasulu
  -- strict thread matches above, loose matches on Subject: below --
2020-08-17 13:44 Andrew Randrianasulu
2020-08-18  7:51 Andrew Randrianasulu

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.