Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
142 user(s) are online (42 user(s) are browsing Forums)

Members: 0
Guests: 142

more...

Support us!

Headlines

 
  Register To Post  

« 1 2 (3) 4 5 6 ... 12 »
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Quite a regular
Quite a regular


See User information
@nikitas
I think perf inject is not supported by QEMU and not sure --call-graph makes sense with perf mem so maybe try only perf mem record -z --pid=<QEMU's PId> to capture a memory access profile and export that with perf mem report --stdio. The files you've sent don't show anything that could explain the slow access but I don't know if these were mangled by --call-graph or inject so retry without those.

Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Just popping in
Just popping in


See User information
@balaton

I see,

so, I'm sending you the results of this one:
sudo perf mem record ---pid 5717


Converted with:
sudo perf mem report --stdio perf-mem.data.txt

Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Just popping in
Just popping in


See User information
@balaton

Also, I've installed DebianPPC v8.11.0 as per QEMU doc page, in order to see if the VFIOed RX550 adapts better there.

The problem is I can't even get it booted.


My QEMU command is:
sudo taskset -c 13 qemu-system-ppc \
-machine pegasos2 \
-bios pegasos2.rom \
-rtc base=localtime \
-drive if=none,id=DH0,file=hd.img,format=raw -device ide-hd,drive=DH0,bus=ide.0 \
-device rtl8139,netdev=ETH0 -netdev user,id=ETH0 \
-device bochs-display \
-vga none \
-device VGA,romfile="" \
-serial stdio


Which yields (the well-known...):
UNHANDLED INT 10 FUNCTION 0300 WITHIN EMULATION
UNHANDLED INT 10 
FUNCTION 1301 WITHIN EMULATION
UNHANDLED INT 10 
FUNCTION 0300 WITHIN EMULATION
UNHANDLED INT 10 
FUNCTION 1301 WITHIN EMULATION
entering main read
/eval loop...
UNHANDLED INT 10 FUNCTION 0300 WITHIN EMULATION
UNHANDLED INT 10 
FUNCTION 1301 WITHIN EMULATION
UNHANDLED INT 10 
FUNCTION 0300 WITHIN EMULATION
UNHANDLED INT 10 
FUNCTION 1301 WITHIN EMULATION


Then I blindly type:
" /failsafe" io

To get the firmware's "ok" back.

Then I tried the following which did not work:
boot hd:0 vmlinuz

It can't follow the symlink?

Anyway, then I tried the following:
boot hd:0 vmlinuz-3.16.0-6-powerpc root=/dev/sda2



Which tries to boot but it ends up with a Kernel panic error:
zImage startingloaded at 0x00400000 (sp0x00762fa0)
Allocating 0x8a1ec0 bytes for kernel ...
OF version 'Pegasos2,1.1'
Trying to claim from 0x400000 to 0x76edfc (0x36edfcgot 400000
gunzipping 
(0x01800000 <- 0x0040c000:0x00761c62)...done 0x743000 bytes

Linux
/PowerPC loadroot=/dev/sda2
Finalizing device tree
... using OF tree (promptr=01003ad0)
OF stdout device is: /failsafe
Preparing to boot Linux version 3.16.0
-6-powerpc (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 Debian 3.16.56-1+deb8u1 (2018-05-08)
Detected machine type00000500
command line
root=/dev/sda2
memory layout at init
:
  
memory_limit 00000000 (16 MB aligned)
  
alloc_bottom 020a6000
  alloc_top    
20000000
  alloc_top_hi 
20000000
  rmo_top      
20000000
  ram_top      
20000000
instantiating rtas at 0x0fbfd000
... done
Fixing up missing ISA range on Pegasos
...
Fixing up IDE interrupt on Pegasos...
Fixing up IDE class-code on Pegasos...
copying OF device tree...
Building dt strings...
Building dt structure...
Device tree strings 0x020a7000 -> 0x020a7746
Device tree struct  0x020a8000 
-> 0x020b3000
Calling quiesce
...
returning from prom_init

Linux
/PPC 3.16.0

arch
: exit
             
  
Have fun!    [    0.000000Using CHRP machine description
[    0.000000Total memory 512MBusing 1024kB for hash table (at cff00000)
[    
0.000000Initializing cgroup subsys cpuset
[    0.000000Initializing cgroup subsys cpu
[    0.000000Initializing cgroup subsys cpuacct
[    0.000000Linux version 3.16.0-6-powerpc (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 Debian 3.16.56-1+deb8u1 (2018-05-08)
[    0.000000chrp type [Genesi Pegasos]
[    
0.000000Pegasos l2cr L2 cache was not activeactivating
[    0.000000PCI bus 0 controlled by /pci@80000000 at 80000000
[    0.000000PCI host bridge /pci@80000000 (primaryranges:
[    
0.000000]   IO 0x00000000fe000000..0x00000000fe00ffff -> 0x0000000000000000
[    0.000000]  MEM 0x0000000080000000..0x00000000bfffffff -> 0x0000000080000000 
[    0.000000PCI bus 0 controlled by /pci@C0000000 at c0000000
[    0.000000PCI host bridge /pci@C0000000  ranges:
[    
0.000000]   IO 0x00000000f8000000..0x00000000f800ffff -> 0x0000000000000000
[    0.000000]  MEM 0x00000000c0000000..0x00000000dfffffff -> 0x00000000c0000000 
[    0.000000Zone ranges:
[    
0.000000]   DMA      [mem 0x00000000-0x1fffffff]
[    
0.000000]   Normal   empty
[    
0.000000]   HighMem  empty
[    
0.000000Movable zone start for each node
[    0.000000Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x1fffffff]
[    
0.000000Built 1 zonelists in Zone ordermobility grouping on.  Total pages130048
[    0.000000Kernel command lineroot=/dev/sda2
[    0.000000PID hash table entries2048 (order18192 bytes)
[    
0.000000Dentry cache hash table entries65536 (order6262144 bytes)
[    
0.000000Inode-cache hash table entries32768 (order5131072 bytes)
[    
0.000000Sorting __ex_table...
[    
0.000000Memory509756K/524288K available (5164K kernel code424K rwdata1428K rodata404K init1403K bss14532K reserved0K highmem)
[    
0.000000Kernel virtual memory layout:
[    
0.000000]   * 0xfffcf000..0xfffff000  fixmap
[    0.000000]   * 0xff800000..0xffc00000  highmem PTEs
[    0.000000]   * 0xff7e0000..0xff800000  early ioremap
[    0.000000]   * 0xe1000000..0xff7e0000  vmalloc ioremap
[    0.000000NR_IRQS:512 nr_irqs:512 16
[    0.000000i8259 legacy interrupt controller initialized
[    0.000581clocksourcetimebase mult[1e000005shift[24registered
[    0.008751Consolecolour dummy device 80x25
[    0.009941pid_max: default: 32768 minimum301
[    0.010588Security Framework initialized
[    0.014226AppArmorAppArmor disabled by boot time parameter
[    0.014266Yamadisabled by default; enable with sysctl kernel.yama.*
[    
0.015430Mount-cache hash table entries1024 (order04096 bytes)
[    
0.015457Mountpoint-cache hash table entries1024 (order04096 bytes)
[    
0.025745Initializing cgroup subsys memory
[    0.026074Initializing cgroup subsys devices
[    0.026208Initializing cgroup subsys freezer
[    0.026302Initializing cgroup subsys net_cls
[    0.026393Initializing cgroup subsys blkio
[    0.026467Initializing cgroup subsys perf_event
[    0.026529Initializing cgroup subsys net_prio
[    0.026979ftraceallocating 17989 entries in 53 pages
[    0.061317MPC7450 family performance monitor hardware support registered
[    0.081325devtmpfsinitialized
[    0.087127futex hash table entries256 (order: -13072 bytes)
[    
0.094963NETRegistered protocol family 16
[    0.111697PCIProbing PCI hardware
[    0.112838PCI host bridge to bus 0000:00
[    0.113276pci_bus 0000:00root bus resource [io  0x0000-0xffff]
[    
0.113363pci_bus 0000:00root bus resource [mem 0x80000000-0xbfffffff]
[    
0.113616pci_bus 0000:00root bus resource [bus 00-ff]
[    
0.280689PCI host bridge to bus 0001:01
[    0.280744pci_bus 0001:01root bus resource [io  0xffff0000-0xffffffff] (bus address [0x0000-0xffff])
[    
0.280770pci_bus 0001:01root bus resource [mem 0xc0000000-0xdfffffff]
[    
0.280802pci_bus 0001:01root bus resource [bus 01-ff]
[    
0.323889vgaarbdevice addedPCI:0000:00:03.0,decodes=io+mem,owns=none,locks=none
[    0.323940vgaarbloaded
[    0.323980vgaarbbridge control possible 0000:00:03.0
[    0.325428SCSI subsystem initialized
[    0.334704Switched to clocksource timebase
[    0.374372NETRegistered protocol family 2
[    0.379722TCP established hash table entries4096 (order216384 bytes)
[    
0.379809TCP bind hash table entries4096 (order216384 bytes)
[    
0.379986TCPHash tables configured (established 4096 bind 4096)
[    
0.380806TCPreno registered
[    0.380880UDP hash table entries256 (order04096 bytes)
[    
0.381007UDP-Lite hash table entries256 (order04096 bytes)
[    
0.383804NETRegistered protocol family 1
[    0.385802pci 0000:00:0c.1Fixing VIA IDEforce legacy mode on
[    0.398965Thermal assist unit not available
[    0.400344] ------------[ cut here ]------------
[    
0.400369WARNINGat /build/linux-aecbOt/linux-3.16.56/kernel/resource.c:638
[    0.400426Modules linked in:
[    
0.400684CPU0 PID1 Commswapper Not tainted 3.16.0-6-powerpc #1 Debian 3.16.56-1+deb8u1
[    0.400786taskdf81e800 tidf83a000 task.tidf83a000
[    0.400806NIPc0047678 LRc004765c CTR00000000
[    0.400828REGSdf83bd50 TRAP0700   Not tainted  (3.16.0-6-powerpc Debian 3.16.56-1+deb8u1)
[    
0.400842MSR: 00029032 <EE,ME,IR,DR,RI>  CR84000028  XER00000000
[    0.400961
[    
0.400961GPR00c004765c df83be00 df81e800 c06df368 c06df368 c05ce55c f1003fff c06df37c 
[    0.400961GPR08f1003fff 00000001 c06df368 00000000 84000084 00000000 c0004a8c 00000000 
[    0.400961GPR1600000000 00000000 00000000 00000000 00000000 00000000 c07435b0 0000006a 
[    0.400961GPR24c066f814 c0740000 df995420 c06e0000 c06e0000 c06df058 c06e1150 c06df368 
[    0.401146NIP [c0047678__insert_resource+0x4c/0x1b0
[    0.401165LR [c004765c__insert_resource+0x30/0x1b0
[    0.401210Call Trace:
[    
0.401286] [df83be00] [c004765c__insert_resource+0x30/0x1b0 (unreliable)
[    
0.401365] [df83be10] [c00484b8insert_resource+0x1c/0x3c
[    0.401378] [df83be20] [c03600f0platform_device_add+0xb8/0x294
[    0.401390] [df83be40] [c0360c24platform_add_devices+0x48/0xac
[    0.401401] [df83be60] [c0684230mv643xx_eth_add_pds+0x40/0x15c
[    0.401411] [df83be80] [c00043c0do_one_initcall+0xd0/0x240
[    0.401423] [df83bef0] [c067757ckernel_init_freeable+0x15c/0x1f8
[    0.401433] [df83bf30] [c0004ab0kernel_init+0x24/0x114
[    0.401444] [df83bf40] [c0015420ret_from_kernel_thread+0x5c/0x64
[    0.401494Instruction dump:
[    
0.4015867c7e1b78 7c9f2378 7fc3f378 7fe4fb78 4bfffacd 7c6a1b79 7d49fa78 7f8af040 
[    0.4016167d290034 5529d97e 41820060 419e013c <0f0900002f890000 409e0154 810a0000 
[    0.401729] ---[ end trace 02ae67b83e3b81b5 ]---
[    
0.401870platform orion-mdiofailed to claim resource 0
[    0.403505Device 'mv643xx_eth.0' does not have a release() function, it is broken and must be fixed.
[    
0.403537] ------------[ cut here ]------------
[    
0.403546WARNINGat /build/linux-aecbOt/linux-3.16.56/drivers/base/core.c:250
[    0.403552Modules linked in:
[    
0.403622CPU0 PID1 Commswapper TaintedG        W     3.16.0-6-powerpc #1 Debian 3.16.56-1+deb8u1
[    0.403632taskdf81e800 tidf83a000 task.tidf83a000
[    0.403639NIPc0358730 LRc0358730 CTR00000000
[    0.403648REGSdf83bd50 TRAP0700   TaintedG        W      (3.16.0-6-powerpc Debian 3.16.56-1+deb8u1)
[    
0.403653MSR: 00029032 <EE,ME,IR,DR,RI>  CR42008022  XER00000000
[    0.403674
[    
0.403674GPR00c0358730 df83be00 df81e800 0000005a 00000000 00000000 c0851650 000000a4 
[    0.403674GPR08c073143c c0730000 c073143c 000000a4 22008022 00000000 c0004a8c 00000000 
[    0.403674GPR1600000000 00000000 00000000 00000000 00000000 00000000 c07435b0 0000006a 
[    0.403674GPR24c066f814 c0740000 df995420 c06ba190 df995420 df97a040 c06df1e8 c06df1f0 
[    0.403746NIP [c0358730device_release+0xa8/0xb8
[    0.403756LR [c0358730device_release+0xa8/0xb8
[    0.403761Call Trace:
[    
0.403770] [df83be00] [c0358730device_release+0xa8/0xb8 (unreliable)
[    
0.403784] [df83be20] [c0273c34kobject_cleanup+0xa4/0x1d8
[    0.403796] [df83be40] [c0360c48platform_add_devices+0x6c/0xac
[    0.403807] [df83be60] [c0684230mv643xx_eth_add_pds+0x40/0x15c
[    0.403817] [df83be80] [c00043c0do_one_initcall+0xd0/0x240
[    0.403828] [df83bef0] [c067757ckernel_init_freeable+0x15c/0x1f8
[    0.403839] [df83bf30] [c0004ab0kernel_init+0x24/0x114
[    0.403848] [df83bf40] [c0015420ret_from_kernel_thread+0x5c/0x64
[    0.403854Instruction dump:
[    
0.403861813f0148 2f890000 419e0010 81290020 2f890000 409effb0 809f0024 2f840000 
[    0.403880419e0018 3c60c061 38634bc4 481ac1b9 <0fe000004bffff9c 809f0000 4bffffe8 
[    0.403913] ---[ end trace 02ae67b83e3b81b6 ]---
[    
0.407839auditinitializing netlink subsys (disabled)
[    
0.408870audittype=2000 audit(1718315221.379:1): initialized
[    0.413575zbudloaded
[    0.414598VFSDisk quotas dquot_6.5.2
[    0.414735Dquot-cache hash table entries1024 (order 04096 bytes)
[    
0.415886msgmni has been set to 997
[    0.432062algNo test for stdrng (krng)
[    
0.432341Block layer SCSI generic (bsgdriver version 0.4 loaded (major 252)
[    
0.432965io scheduler noop registered
[    0.433021io scheduler deadline registered
[    0.433338io scheduler cfq registered (default)
[    
0.436891Serial8250/16550 driver4 portsIRQ sharing disabled
[    0.441791console [ttyS0disabled
[    0.465045serial8250.0ttyS0 at I/O 0x2f8 (irq 0base_baud 115200is a 16550A
[    0.500401console [ttyS0enabled
[    0.501238pmac_zilog0.6 (Benjamin Herrenschmidt <benh@kernel.crashing.org>)
[    
0.501607SerialMPC52xx PSC UART driver
[    0.501926Generic non-volatile memory driver v1.1
[    0.502528Linux agpgart interface v0.103
[    0.503897Warningno ADB interface detected
[    0.505265mousedevPS/2 mouse device common for all mice
[    0.507134rtc-generic rtc-genericrtc coreregistered rtc-generic as rtc0
[    0.508021ledtrig-cpuregistered to indicate activity on CPUs
[    0.508774TCPcubic registered
[    0.509146NETRegistered protocol family 10
[    0.515909mip6Mobile IPv6
[    0.516196NETRegistered protocol family 17
[    0.516529mpls_gsoMPLS GSO support
[    0.517976registered taskstats version 1
[    0.526068rtc-generic rtc-genericsetting system clock to 2024-06-13 21:47:02 UTC (1718315222)
[    
0.533644] List of all partitions:
[    
0.533855No filesystem could mount roottried
[    
0.534188Kernel panic not syncingVFSUnable to mount root fs on unknown-block(0,0)
[    
0.534581CPU0 PID1 Commswapper TaintedG        W     3.16.0-6-powerpc #1 Debian 3.16.56-1+deb8u1
[    0.534964Call Trace:
[    
0.535076] [df83bdc0] [c000966cshow_stack+0xf8/0x1b0 (unreliable)
[    
0.535337] [df83be10] [c0504124panic+0xdc/0x240
[    0.535539] [df83be70] [c06779f4mount_root+0x0/0x68
[    0.535746] [df83bed0] [c0677bb0prepare_namespace+0x154/0x19c
[    0.535982] [df83bef0] [c0677604kernel_init_freeable+0x1e4/0x1f8
[    0.536226] [df83bf30] [c0004ab0kernel_init+0x24/0x114
[    0.536439] [df83bf40] [c0015420ret_from_kernel_thread+0x5c/0x64
[    0.537083] ---[ end Kernel panic not syncingVFSUnable to mount root fs on unknown-block(0,0)


When I try without the failsafe trick. And I blindly type:
boot hd:0 vmlinuz-3.16.0-6-powerpc root=/dev/sda2

(Not the easiest thing to type without seeing what you are writing.)

It yields a "Segmentation fault" and the process is terminated:
PegasosII Boot Strap (c2002-2003 bplan GmbH
Running on CPU PVR
:80020102
Enable L1 ICache
...                                                    Done.
Clean/Flush Block enabled
Reading W83194 
:                                                       FAILED.
Setting Front Side Bus to 133MHz...                                    FAILED.
Configuring DDR...                                                     Done.
Configuring PCI0...                                                    Done.
Configuring PCI1...                                                    Done.
Configuring ETH...                                                     Done.
Releasing IDE reset ...                                                Done.
Configuring Legacy Devices
Segmentation fault


Any ideas?


Edited by nikitas on 2024/6/13 20:16:34
Edited by nikitas on 2024/6/13 20:17:50
Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Quite a regular
Quite a regular


See User information
@nikitas
Are you sure you're running the right Linux kernel version for pegasos2? Or does it need an initrd which has the necessary drivers? It looks like it lacks the IDE driver that's why it cannot read the root volume. I don't know how this Debian version is supposed to work on pegasos2 but is there a boot loader such as grub or yaboot that you should boot with? There should be some install guide somewhere on the CD that documents this but I haven't checked.

The perf mem profile at least looks like a valid profile now but nothing stands out to me in it. There are some AltiVec instructions at the top so maybe try if -cpu 750cxe changes anything (is is slower/faster with that or no change). I still don't understand why it's slow and to me it looks like it's not slowing down within QEMU but I can't tell what could be the cause of slowness.

Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Just popping in
Just popping in


See User information
@balaton

Ok, so, we leave the VFIO RX550 + AOS4.1FE experiment here, I suppose.

Things I forgot to mention:
- In AOS4 ScreenMode if you check "Enable Interrupts" the system is even more slow and it eventually freezes.
- In AOS4 ScreenMode if you check "Allow Fake Modes", a warning appears in the serial output when using RadeonRX.chip.debug. And the option never gets saved (even after the required reboot).
- IN AOS4 Ranger I get the CPU synchronized at 999Mhz. In other systems I've seen in this forum or in youtube videos, the Cpu clock syncs at 1.2Ghz or more.
- IN AOS4 Ranger --> Exec --> Resources, the RadeonRX_RM.resource & RadeonRX_DPM.resource are the only ones to have the Type as "Unkonwn" instead of "Resource". If it means something. (Ranger screenshot: https://ibb.co/vQZ7S49).

In general the guest system is stable. Programs working properly, MPEG videos are playing in Emotion Player with FORCESOFTWARE=FALSE. But everything very very slow, and the video works with very frequent "hiccups" both audio & graphical. And of course as I already wrote before in every single thing I do the CPU is 100%. If I let it idle drops to 61% or 40%.


Regarding the DebianPPC, I've downloaded/installed the iso that has the exact same name as in QEMU docs and initiated the "install/pegasos" file. The installation was completed successfully. 3 partitions have been created. Anyway, I'll see what I can do, hopefully I'll get it working.


Edited by nikitas on 2024/6/13 22:59:54
Edited by nikitas on 2024/6/13 23:00:35
Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Quite a regular
Quite a regular


See User information
@nikitas
Quote:
Ok, so, we leave the VFIO RX550 + AOS4.1FE experiment here, I suppose.

I haven't given up but don't have any more ideas currently on how to find the cause of the issue with AmigaOS so maybe reproducing it with Linux guest could help.
Quote:

Things I forgot to mention:
- In AOS4 ScreenMode if you check "Enable Interrupts" the system is even more slow and it eventually freezes.

I think it's supposed to be faster not slower with IRQs but if it also freezes then maybe there's some issue with handling IRQs from different PCI buses. I've said before that I think all devices on default bus=pci.1 should work better, bus=pci.0 is not well tested but I think you tried that and it did not work for some reason so had to use pci.0. But with IRQs disabled this should not be a problem.
Quote:

- In AOS4 ScreenMode if you check "Allow Fake Modes", a warning appears in the serial output when using RadeonRX.chip.debug. And the option never gets saved (even after the required reboot).

I don't know what this does, where it tries to save it and what error you got so I have no idea.
Quote:

- IN AOS4 Ranger I get the CPU synchronized at 999Mhz. In other systems I've seen in this forum or in youtube videos, the Cpu clock syncs at 1.2Ghz or more.

I also don't know where this comes from. Are you using any -cpu options? I think it depends on that and maybe on the pegasos2.rom version but otherwise is probably not related to actual speed of emulated CPU which only depends on your host CPU.
Quote:

- IN AOS4 Ranger --> Exec --> Resources, the RadeonRX_RM.resource & RadeonRX_DPM.resource are the only ones to have the Type as "Unkonwn" instead of "Resource". If it means something. (Ranger screenshot: https://ibb.co/vQZ7S49).

In general the guest system is stable. Programs working properly, MPEG videos are playing in Emotion Player with FORCESOFTWARE=FALSE. But everything very very slow, and the video works with very frequent "hiccups" both audio & graphical. And of course as I already wrote before in every single thing I do the CPU is 100%. If I let it idle drops to 61% or 40%.

Is this CPU usage in the guest or on the host? If in the guest why it did not show on the Tequila or whatever top like tool you tried which showed ~60% idle if I remember correctly.

Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Just can't stay away
Just can't stay away


See User information
@balaton
Quote:
I haven't given up but don't have any more ideas currently on how to find the cause of the issue with AmigaOS so maybe reproducing it with Linux guest could help.
First of all you need to get host speed, for example with the method Georg mentioned here and here (vesa X11 framebuffer driver with ShadowFB 0 and compositor disabled).

All guest results are useless as long as you have nothing to compare them to.

Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Quite a regular
Quite a regular


See User information
@joerg
Quote:
All guest results are useless as long as you have nothing to compare them to.

Not necessarily. If the problem does not reproduce with Linux guest then we know it's likely something that AmigaOS does differently than the Linux driver. If the problem reproduces then we need host results to compare to or at least we know what the driver is doing so we could investigate more easily than with AmigaOS.

To get host results somebody would need to remove vfio and configure the card on the host then do some tests. Then set up vfio and repeat same tests with a Linux guest. It would be best if this could be done by somebody who ran Linux and X on real machine so can be tested with a known working setup. Otherwise we don't even know if the Debian 8.11 we know at least should boot was working with real pegasos2. Does anybody know what Linux versions worked on real pegasos2?

Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Home away from home
Home away from home


See User information
@Balaton
Quote:

Does anybody know what Linux versions worked on real pegasos2?


Debian 8.11 is the one i install and use 2 months ago on my real pegasos when we test bridges in peg2/radeonhd thread you may remember. But you should not use netinstall.iso as it have bug on installation (not fully finished post install steps resulting in non booting system), so you had to use the one called debian-8.11.0-powerpc-DVD-1.iso instead, which installs and works fine on my real peg2

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Just can't stay away
Just can't stay away


See User information
@balaton
Quote:
Not necessarily. If the problem does not reproduce with Linux guest then we know it's likely something that AmigaOS does differently than the Linux driver.
Of course X11 and the Linux amdgpu drivers are working completely different to the AmigaOS gfx API and it's Radeon drivers, the results are not comparable at all.
For example on Linux GART can be used to speed up copies between DRAM and VRAM by using large DMA transfers, on AmigaOS it can't be used because 2D rendering and such copies aren't done by the GPU but by the CPU.

For comparing Linux guest to AmigaOS guest you have to do exactly the same as you have to do on the Linux host to get VRAM speed and compare that to the VRAM speed on AmigaOS:
vesa framebuffer driver instead of amdgpu/radeon driver, ShadowFB, compositor, and anything else which may result in DRAM cached accesses instead of direct VRAM accesses, disabled.

Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Not too shy to talk
Not too shy to talk


See User information
@balaton

The PPC linux kernel(s) do not support the RadeonRX GPU`S at all.
PPC Kernel support stopped somewhere around the HD7950 (SI series). Few newer cards like the R7 250 can use PPC linux using the FBdev driver (so no GL hardware acceleration) Radeon RX support for PPC Linux is just a no go. I would opt for using a Radeon HD regarding the Qemu stuff.

AmigaOne X5000 -> 2GHz / 16GB RAM / Radeon RX 550 / ATI X1950 / M-Audio 5.1 -> AmigaOS 4.1 FE / Linux / MorphOS
Amiga 1200 -> Recapped / 68ec020 ACA 1221ec / CF HDD / RetroNET connected to the NET
Vampire V4SE TrioBoot
RPI4 AmiKit XE
Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Just can't stay away
Just can't stay away


See User information
@Skateman
Linux radeon/amdgpu drivers must not be used anyway if you want to use Linux guest VRAM speed as reference to the AmigaOS guest VRAM speed.
You have to use for example the vesa framebuffer driver instead (which is of course as unusable slow as AmigaOS is on QEmu G3/G4 with VFIO gfx cards), which should still work on Linux PPC?

Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Not too shy to talk
Not too shy to talk


See User information
@joerg

Without kernel support for the RX cards i dont think you will even get any output on your monitor... (besides your Bios output at post)

AmigaOne X5000 -> 2GHz / 16GB RAM / Radeon RX 550 / ATI X1950 / M-Audio 5.1 -> AmigaOS 4.1 FE / Linux / MorphOS
Amiga 1200 -> Recapped / 68ec020 ACA 1221ec / CF HDD / RetroNET connected to the NET
Vampire V4SE TrioBoot
RPI4 AmiKit XE
Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Quite a regular
Quite a regular


See User information
@Skateman
You won't get 3D or advanced features but getting just plain frame buffer working may enough to do the tests. But true it might not be as easy as with contemporary cards as the RX card is newer than what that Debian version supported and doing it on PPC is additional complexity as it might need some x86 emulation for the VGA BIOS. But I had no better idea than trying to test this under Linux guest as we could not find out the cause with AmigaOS.

In the other thread it came up that AltiVec may be used on G4 CPU for some copies and I've seen it used in a profile so maybe try AmigaOS with -cpu 750cxe and see if there's any difference in speed with that.

Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Just popping in
Just popping in


See User information
@balaton @Skateman

Yes, indeed, I managed to install Debian 8.11.0 on QEMU Pegasos2 using the DVD image (as @kas1e said). The RX550 is passed through, I see it with lspci, but there is no amdgpu driver so when I try to start X Server with "radeon", "ati" "fbdev" drivers it fails with several different errors. I could post xorg log file, if it would be useful.

@balaton
Regarding the CPU 100% thing I maybe mislead you. On the host is always 100%. On guest, using cpu_watcher I get CPU 100% & CPU 60% load when I remove the focus from the cpu_watcher window. Using tequila there is idle task 70%.

The QEMU documentation page reports only the Debian-8.11.0 that can work with Pegasos2.

I read that Pegasos2 (real machine), is supported also by:
- Void Linux PPC
- Gentoo Linux

I don't know if it is worthy to try though. If they are maintained or just include the "amdgpu" driver.

Regarding the Debian 8.11.0 which comes with Kernel 3.16, I don't know if I can upgrade the Kernel to 4.20, which, I read, that contains the "amdgpu" driver.

@balaton
Regarding the -cpu 750cxe option, it might improve the performance a little or it might be a placebo effect, can't be sure.

The fact that when I "Enable Interrupts" on AmigasOS4 "ScreenMode", and the performance is getting even slower rather than faster (as expected to be faster), what this could mean, I wonder.

Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Quite a regular
Quite a regular


See User information
@nikitas
Quote:
Yes, indeed, I managed to install Debian 8.11.0 on QEMU Pegasos2 using the DVD image (as @kas1e said). The RX550 is passed through, I see it with lspci, but there is no amdgpu driver so when I try to start X Server with "radeon", "ati" "fbdev" drivers it fails with several different errors. I could post xorg log file, if it would be useful.

I think radeon and ati drivers don't support RX cards so those won't work, fbdev might work but I don't know how to set it up. I think it may need some Linux FB driver. There's also vesa driver that might work but probably needs to boot with nomodeset Linux kernel option and don't know if it works on non-x86 machines as it might need the card's ROM. Maybe fbdev also needs nomodeset and installing some Linux FB driver which may not be compiled in Debian 8.11.
Quote:
@balaton
Regarding the CPU 100% thing I maybe mislead you. On the host is always 100%. On guest, using cpu_watcher I get CPU 100% & CPU 60% load when I remove the focus from the cpu_watcher window. Using tequila there is idle task 70%.

If something busy waits in the guest you'd get 100% CPU usage on the host but this does not mean it's slowing down just there's always some guest code running. If you get 70% idle in the guest then there's still free CPU to run tasks.
Quote:
The QEMU documentation page reports only the Debian-8.11.0 that can work with Pegasos2.

I read that Pegasos2 (real machine), is supported also by:
- Void Linux PPC
- Gentoo Linux

I don't know if it is worthy to try though. If they are maintained or just include the "amdgpu" driver.

I've only written about Debian 8.11 in QEMU because that's the only one I've tested. If others work on real machine they should also work on QEMU but I haven't tried them. If those are newer maybe it's better to try those.
Quote:
Regarding the Debian 8.11.0 which comes with Kernel 3.16, I don't know if I can upgrade the Kernel to 4.20, which, I read, that contains the "amdgpu" driver.

It might be difficult unless there are some packages for it as it may have some dependencies or you may also need newer Xorg which will then be difficult to compile. So if there's a newer distro that supports pegasos2 then trying that should be easier. Two recent PPC Linux distros I know about are Finnix and Adélie but these may not support pegasos2 only other PPC machines.
Quote:
@balaton
Regarding the -cpu 750cxe option, it might improve the performance a little or it might be a placebo effect, can't be sure.

You'd need to repeat the benchmark test to compare the numbers to see if VRAM access is faster without AltiVec or the same.
Quote:

The fact that when I "Enable Interrupts" on AmigasOS4 "ScreenMode", and the performance is getting even slower rather than faster (as expected to be faster), what this could mean, I wonder.

I don't know what that option does or what does the driver use it for. Maybe @Hans can tell but if the problem is because of slow VRAM access then this option may not do much about that.

Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Just popping in
Just popping in


See User information
@balaton

Yes, those OpenSuse, Gentoo PegasosPPC versions seem to be much older than Debian Jessie.

- Finnix distro seems incompatible.

- Adelie distro QEMU command I tried is:
qemu-system-ppc \
-machine pegasos2 \
-cpu G4 \
-bios pegasos2.rom \
-rtc base=localtime \
-drive if=none,id=CD0,file=adelie.iso,format=raw -device ide-cd,drive=CD0,bus=ide.1 \
-drive if=none,id=DH0,file=hd.img,format=raw -device ide-hd,drive=DH0,bus=ide.0 \
-device VGA,romfile="" \
-serial stdio \
-d guest_errors,unimp


Then, in Pegasos2 bios:
boot cd boot/grubcore.img


It yields this:
OF stdout device is: /failsafe
Preparing to boot Linux version 5.15.132
-mc6-easy (builder@ppc64) (gcc (Adelie 8.5.08.5.0GNU ld (GNU Binutils2.41#1 SMP Sun Nov 12 07:51:09 UTC 2023
Detected machine type00000500
command line
BOOT_IMAGE=(ieee1275/ide0)/kernel-ppc root=live:LABEL=Adelie-ppc rd.live.dir=/ rd.live.squashimg=ppc.squashfs
memory layout at init
:
  
memory_limit 00000000 (16 MB aligned)
  
alloc_bottom 05e0e000
  alloc_top    
20000000
  alloc_top_hi 
20000000
  rmo_top      
20000000
  ram_top      
20000000
instantiating rtas at 0x0fbfd000
... done
boot cpu hw idx 0
Fixing up missing ISA range on Pegasos
...
Fixing up IDE interrupt on Pegasos...
Fixing up IDE class-code on Pegasos...
copying OF device tree...
Building dt strings...
Building dt structure...
Device tree strings 0x05e0f000 -> 0x05e0e0a4
Device tree struct  0x05e10000 
-> 0x00000000
Quiescing Open Firmware 
...
Booting Linux via __start() @ 0x03800000 ...

Linux/PPC 5.15.1


But it stays there forever. At the end of the serial output there is an:
Invalid form of CMPI at 0x0020001c1

Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Quite a regular
Quite a regular


See User information
@nikitas
I think Adélie also does not support pegasos2, mainly only PPC Macs maybe. So what you could try for now is measure the card on the host as @Georg described to know if it's limited by PCIe access or is there some overhead somewhere else. I think it's still not completely proven that the cause is slow VRAM access through PCIe but it seems likely. The test with vesafb and ShadowFB off seems to reproduce that access pattern so that could be used to check this. If you get the same speed on the host than with passed through then there's not much that can be done without changing AmigaOS which is not really possible so then the only way may be to look for other cards or hosts where direct VRAM access is faster. Maybe there are some measurements somewhere that show which cards are better in this and which are slower that could give a hint what cards to try. It may also depend on the host so your options may be trying other cards or trying the same card on other host machine.

When I'll have time I can try to improve PCIe emulation on sam460ex to be able to test with that too but that might take a while so we'll have to come back to this then.

Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Just can't stay away
Just can't stay away


See User information
@balaton
Quote:
When I'll have time I can try to improve PCIe emulation on sam460ex to be able to test with that too but that might take a while so we'll have to come back to this then.
It can only help if you additionally can change the 4x0 DMA emulation from memmove() to host DMA.
Without that the much larger DMA copies between VRAM and DRAM used by AmigaOS will still be split into tiny, slow 64 bit host CPU accesses on QEmu and it can't be faster than G3 emulation.

Go to top
Re: Qemu + VFIO GPU RadeonRX 550 + AmigaOS4 extremely slow
Quite a regular
Quite a regular


See User information
@joerg
You are basing your analysis on unproven assumptions. Without knowledge on how AmigaOS accesses the card I'm not sure yet the problem is really because of fine grained access to VRAM so this is still something to verify. The ways for that could be measuring host performance with x11perf and see if it reproduces with that and trying different cards and hosts which have different access speed and see if the AmigaOS performance with pass through correlates to that. Otherwise we just assume that's the problem because we know this case is slow but it could be anything else with the pass through card.

I'm also not sure the PPC440 DMA engine on sam460ex is used for this. I know it uses it for something because I had to add emulation of that because I saw AmigaOS using it sometimes but it only uses it infrequently, e.g. you can boot AmigaOS without it accessing the DMA engine at all and it only happens with some programs so I don't know if this is really used for graphics. That's another unproven assumption which could be tested if I fix the PCIe emulation to work (or find out why the PCI bus fails on sam460ex) so the point of fixing it would be to test it not because I think that would solve the problem. I don't know what causes to problem so I also don't know what would fix it. But at least sam460ex might give more possibilies also because it could support newer cards but the CPU emulation is slower so not ideal in any case.

Go to top

  Register To Post
« 1 2 (3) 4 5 6 ... 12 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project