I ran the following lspci commands to better understand the memory on-board a Nvidia GPU. This GPU is advertised to have 6144 MB memory.
- How do I derive 6144 MB from info from lspci -vs command?
- What are prefetchable and non-prefetchable memories?
- Does the 3 memory blocks relate to physical 3 different physical memories on-board the GPU?
- What does [virtual] Expansion ROM at 000c0000 [disabled] mean?
$ lspci | grep NVIDIA
01:00.0 VGA compatible controller: NVIDIA Corporation GK110 [GeForce GTX TITAN] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GK110 HDMI Audio (rev a1)
$ lspci -vs 01:00.0
01:00.0 VGA compatible controller: NVIDIA Corporation GK110 [GeForce GTX TITAN] (rev a1) (prog-if 00 [VGA controller])
Subsystem: ASUSTeK Computer Inc. GTXTITAN-6GD5
Flags: bus master, fast devsel, latency 0, IRQ 137
Memory at f6000000 (32-bit, non-prefetchable)
Memory at e8000000 (64-bit, prefetchable)
Memory at f0000000 (64-bit, prefetchable)
I/O ports at e000
[virtual] Expansion ROM at 000c0000 [disabled]
Capabilities: <access denied>
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nouveau, nvidia_396, nvidia_396_drm
AFAIK, you can’t derive the vmem size from pci registers, it’s simply irrelevant for that. Using low level access, you would have to parse the vbios. The memory regions shown are just the ‘windows’ for memory transfers. The expansion rom is just the possible expansion rom (bios extensions) that all expansion cards since ISA(?) can have (e.g. raid controllers setup). More info:
@generix. The use of the lspci method was from https://www.computerhope.com/issues/ch001307.htm#linux So it is a wrong info.
I found an explanation on prefetchable and non-prefetchable memories in the below link:
That lspci info was (mostly) right back in the pre-G80 days when that PCI aperture exposed a window into the physical framebuffer memory. Starting with G80 it’s virtualized so that any particular region in that 256 MB window can point pretty much anywhere (or nowhere) at any given time.
generix is right, you can’t derive the amount of video memory from the PCI configuration registers. The most reliable way is to query nvidia-smi or “nvidia-settings -q TotalDedicatedGPUMemory”