Originally posted by schmidtbag
View Post
Announcement
Collapse
No announcement yet.
AMD Smart Access Memory / Resizable BAR On Linux Still Ripe For Improvement
Collapse
X
-
Originally posted by MrCooper View Post
I was disappointed by this at first as well, but turns out "above 4G decoding" is enough for BAR resizing to work in Linux (I had to disable CSM as well though). The SAM specific option is only needed for Windows.
You can check for it working like this:
Code:> sudo dmesg|grep BAR= [drm] Detected VRAM RAM=8176M, BAR=8192M
csm on: [drm] Detected VRAM RAM=8176M, BAR=256M
csm off: [drm] Detected VRAM RAM=8176M, BAR=8192M
Here results:
b550 aorus pro, 3800xt, vega 56, all on stock, linux 5.10, mesa git 13 dec 2020.
bios csm: off, above 4G decoding: on
# dmesg | grep BAR
[ 0.280330] pci 0000:0c:00.0: BAR 0: assigned to efifb
[ 4.155501] amdgpu 0000:0c:00.0: BAR 2: releasing [mem 0x7ff0000000-0x7ff01fffff 64bit pref]
[ 4.155504] amdgpu 0000:0c:00.0: BAR 0: releasing [mem 0x7fe0000000-0x7fefffffff 64bit pref]
[ 4.155523] pcieport 0000:0b:00.0: BAR 15: releasing [mem 0x7fe0000000-0x7ff01fffff 64bit pref]
[ 4.155526] pcieport 0000:0a:00.0: BAR 15: releasing [mem 0x7fe0000000-0x7ff01fffff 64bit pref]
[ 4.155528] pcieport 0000:00:03.1: BAR 15: releasing [mem 0x7fe0000000-0x7ff01fffff 64bit pref]
[ 4.155537] pcieport 0000:00:03.1: BAR 15: assigned [mem 0x900000000-0xbffffffff 64bit pref]
[ 4.155539] pcieport 0000:0a:00.0: BAR 15: assigned [mem 0x900000000-0xbffffffff 64bit pref]
[ 4.155542] pcieport 0000:0b:00.0: BAR 15: assigned [mem 0x900000000-0xbffffffff 64bit pref]
[ 4.155545] amdgpu 0000:0c:00.0: BAR 0: assigned [mem 0xa00000000-0xbffffffff 64bit pref]
[ 4.155553] amdgpu 0000:0c:00.0: BAR 2: assigned [mem 0x900000000-0x9001fffff 64bit pref]
[ 4.155637] [drm] Detected VRAM RAM=8176M, BAR=8192M
$ vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
71851 frames in 5.0 seconds = 14370.048 FPS
76439 frames in 5.0 seconds = 15287.775 FPS
76745 frames in 5.0 seconds = 15348.868 FPS
Unigine Superposition v1.1:
preset high
result: 7915
fps min: 50.64, avg 59.20, max 71.16
GPU °C: Min 43.0 Max 66.0
Unigine Heaven 4.0:
1080p, ultra, extreme, 8x
fps: 73.1
Score: 1843
Min FPS: 11.3
Max FPS: 147.6
bios csm: off, above 4G decoding: off
# dmesg | grep BAR
[ 0.282549] pci 0000:0c:00.0: BAR 0: assigned to efifb
[ 4.249088] [drm] Detected VRAM RAM=8176M, BAR=256M
$ vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
98150 frames in 5.0 seconds = 19629.842 FPS
93457 frames in 5.0 seconds = 18691.219 FPS
94206 frames in 5.0 seconds = 18841.086 FPS
Unigine Superposition v1.1:
preset high
result: 7915
fps min: 50.53, avg 59.20, max 71.68
GPU °C: Min 46.0 Max 65.0
Unigine Heaven 4.0:
1080p, ultra, extreme, 8x
fps: 73.0
Score: 1838
Min FPS: 11.3
Max FPS: 146.5
b550 aorus pro, 3800xt 6 core 4775mhz, memory 3600mhz fclk 1800mhz, vega 56 1590sclk-900-mclk, linux 5.10, mesa git 13 dec 2020
counter-strike global offensive:
2560x1440, low quality
above 4G decoding off: 392 fps, 387 fps
above 4G decoding on: 385 fps, 399 fpsLast edited by kripteks; 14 December 2020, 05:38 PM.
Comment
-
Originally posted by schmidtbag View PostMakes me wonder how much of a difference SAM would make for this:
Swap on video RAM - ArchWiki (archlinux.org)
Comment
-
Originally posted by MrCooper View PostIt could only affect the "MTD Kernel Subsystem" method, and that one will be too slow to be usable even with PCIe (direct CPU reads from VRAM are on the order of tens of MB/s, no typo!).
Comment
-
New results (switch from 3800xt to 5600x)
b550 aorus pro, 5600x 6c12t (oc at 4.6ghz), vega 56 stock, linux 5.10.1 mesagit 13 dec 2020.
With my new 5600x the bios showup the menu: "re-size bar support" just after menu "above 4G decoding", with the ryzen 3800xt it was not listed.
bios csm: off, above 4G decoding: off, re-size bar support disabled:
# dmesg | grep BAR
pci 0000:0c:00.0: BAR 0: assigned to efifb
[drm] Detected VRAM RAM=8176M, BAR=256M
$ vblank_mode=0 glxgears
156142 frames in 5.0 seconds = 31228.395 FPS
155482 frames in 5.0 seconds = 31096.229 FPS
158799 frames in 5.0 seconds = 31759.801 FPS
Unigine Heaven 4.0:
1920x1080 ultra-extreme-8x
fps: 72.5
score: 1826
min fps: 12.8
max fps: 144.9
Counter-strike global offensive:
2560x1440 quality lowest: 514 fps
bios csm: off, above 4G decoding: on, re-size bar support auto (enable are not listed, gigabyte use auto instead enable):
# dmesg | grep BAR
pci 0000:0c:00.0: BAR 0: assigned to efifb
[drm] Detected VRAM RAM=8176M, BAR=8192M
$ vblank_mode=0 glxgears
116654 frames in 5.0 seconds = 23330.732 FPS
116385 frames in 5.0 seconds = 23276.818 FPS
112109 frames in 5.0 seconds = 22421.645 FPS
Unigine Heaven 4.0:
1920x1080 ultra-extreme-8x
fps: 72.5
score: 1826
min fps: 12.6
max fps: 145.4
Counter-strike global offensive:
2560x1440 quality lowest: 516 fps
Not benefice for my use for now.
glxgears show 1/3 less fps, maybe have also negative impact elsewhere i dont know.
Before with the ryzen 3800xt i was having this:
# dmesg | grep BAR
[ 0.280330] pci 0000:0c:00.0: BAR 0: assigned to efifb
[ 4.155501] amdgpu 0000:0c:00.0: BAR 2: releasing [mem 0x7ff0000000-0x7ff01fffff 64bit pref]
[ 4.155504] amdgpu 0000:0c:00.0: BAR 0: releasing [mem 0x7fe0000000-0x7fefffffff 64bit pref]
[ 4.155523] pcieport 0000:0b:00.0: BAR 15: releasing [mem 0x7fe0000000-0x7ff01fffff 64bit pref]
[ 4.155526] pcieport 0000:0a:00.0: BAR 15: releasing [mem 0x7fe0000000-0x7ff01fffff 64bit pref]
[ 4.155528] pcieport 0000:00:03.1: BAR 15: releasing [mem 0x7fe0000000-0x7ff01fffff 64bit pref]
[ 4.155537] pcieport 0000:00:03.1: BAR 15: assigned [mem 0x900000000-0xbffffffff 64bit pref]
[ 4.155539] pcieport 0000:0a:00.0: BAR 15: assigned [mem 0x900000000-0xbffffffff 64bit pref]
[ 4.155542] pcieport 0000:0b:00.0: BAR 15: assigned [mem 0x900000000-0xbffffffff 64bit pref]
[ 4.155545] amdgpu 0000:0c:00.0: BAR 0: assigned [mem 0xa00000000-0xbffffffff 64bit pref]
[ 4.155553] amdgpu 0000:0c:00.0: BAR 2: assigned [mem 0x900000000-0x9001fffff 64bit pref]
[ 4.155637] [drm] Detected VRAM RAM=8176M, BAR=8192M
Now with the ryzen 5600x i have only this:
# dmesg | grep BAR
pci 0000:0c:00.0: BAR 0: assigned to efifb
[drm] Detected VRAM RAM=8176M, BAR=8192M
Same bios version, just going from linux 5.10 to 5.10.1 (and debian bullseye latest updates)Last edited by kripteks; 17 December 2020, 02:43 PM.
Comment
-
Originally posted by kripteks View PostNew results (switch from 3800xt to 5600x)
b550 aorus pro, 5600x 6c12t (oc at 4.6ghz), vega 56 stock, linux 5.10.1 mesagit 13 dec 2020.
With my new 5600x the bios showup the menu: "re-size bar support" just after menu "above 4G decoding", with the ryzen 3800xt it was not listed.
bios csm: off, above 4G decoding: off, re-size bar support disabled:
# dmesg | grep BAR
pci 0000:0c:00.0: BAR 0: assigned to efifb
[drm] Detected VRAM RAM=8176M, BAR=256M
$ vblank_mode=0 glxgears
156142 frames in 5.0 seconds = 31228.395 FPS
155482 frames in 5.0 seconds = 31096.229 FPS
158799 frames in 5.0 seconds = 31759.801 FPS
Unigine Heaven 4.0:
1920x1080 ultra-extreme-8x
fps: 72.5
score: 1826
min fps: 12.8
max fps: 144.9
Counter-strike global offensive:
2560x1440 quality lowest: 514 fps
bios csm: off, above 4G decoding: on, re-size bar support auto (enable are not listed, gigabyte use auto instead enable):
# dmesg | grep BAR
pci 0000:0c:00.0: BAR 0: assigned to efifb
[drm] Detected VRAM RAM=8176M, BAR=8192M
$ vblank_mode=0 glxgears
116654 frames in 5.0 seconds = 23330.732 FPS
116385 frames in 5.0 seconds = 23276.818 FPS
112109 frames in 5.0 seconds = 22421.645 FPS
Unigine Heaven 4.0:
1920x1080 ultra-extreme-8x
fps: 72.5
score: 1826
min fps: 12.6
max fps: 145.4
Counter-strike global offensive:
2560x1440 quality lowest: 516 fps
Not benefice for my use for now.
glxgears show 1/3 less fps, maybe have also negative impact elsewhere i dont know.
Before with the ryzen 3800xt i was having this:
# dmesg | grep BAR
[ 0.280330] pci 0000:0c:00.0: BAR 0: assigned to efifb
[ 4.155501] amdgpu 0000:0c:00.0: BAR 2: releasing [mem 0x7ff0000000-0x7ff01fffff 64bit pref]
[ 4.155504] amdgpu 0000:0c:00.0: BAR 0: releasing [mem 0x7fe0000000-0x7fefffffff 64bit pref]
[ 4.155523] pcieport 0000:0b:00.0: BAR 15: releasing [mem 0x7fe0000000-0x7ff01fffff 64bit pref]
[ 4.155526] pcieport 0000:0a:00.0: BAR 15: releasing [mem 0x7fe0000000-0x7ff01fffff 64bit pref]
[ 4.155528] pcieport 0000:00:03.1: BAR 15: releasing [mem 0x7fe0000000-0x7ff01fffff 64bit pref]
[ 4.155537] pcieport 0000:00:03.1: BAR 15: assigned [mem 0x900000000-0xbffffffff 64bit pref]
[ 4.155539] pcieport 0000:0a:00.0: BAR 15: assigned [mem 0x900000000-0xbffffffff 64bit pref]
[ 4.155542] pcieport 0000:0b:00.0: BAR 15: assigned [mem 0x900000000-0xbffffffff 64bit pref]
[ 4.155545] amdgpu 0000:0c:00.0: BAR 0: assigned [mem 0xa00000000-0xbffffffff 64bit pref]
[ 4.155553] amdgpu 0000:0c:00.0: BAR 2: assigned [mem 0x900000000-0x9001fffff 64bit pref]
[ 4.155637] [drm] Detected VRAM RAM=8176M, BAR=8192M
Now with the ryzen 5600x i have only this:
# dmesg | grep BAR
pci 0000:0c:00.0: BAR 0: assigned to efifb
[drm] Detected VRAM RAM=8176M, BAR=8192M
Same bios version, just going from linux 5.10 to 5.10.1 (and debian bullseye latest updates)
Also, I'm at least fairly certain this resizable bar support will show the most gain on workloads that have to move data between system memory and graphics memory, perhaps things like compute workloads. I don't think many games will move data between CPU and GPU too much, so its doubtful whether games will ever see much improvement from this.
Comment
Comment