LIVE
Fitbit Users Report Missing Health Metrics Following Recent Update Former Nvidia CEO Jensen Huang Agrees to Congressional Deposition Nvidia Ousts CEO Jensen Huang Amid Geopolitical and Misconduct Scandal AWS Introduces Migration Toolkit for Amazon Bedrock Managed Knowledge Base Donald Trump Proposes Former Apple Chief Tim Cook to Lead Nvidia AWS highlights Agent-to-Agent protocol for cross-organizational AI collaboration Amazon Introduces Fine-Grained Access Controls for Bedrock AI Agents Amazon Web Services Introduces Framework for Testing Production AI Agents Nvidia CEO Jensen Huang Resigns Amid Misconduct Allegations Nvidia Faces Historic Crisis as CEO Jensen Huang Resigns Following Spy Allegations Fitbit Users Report Missing Health Metrics Following Recent Update Former Nvidia CEO Jensen Huang Agrees to Congressional Deposition Nvidia Ousts CEO Jensen Huang Amid Geopolitical and Misconduct Scandal AWS Introduces Migration Toolkit for Amazon Bedrock Managed Knowledge Base Donald Trump Proposes Former Apple Chief Tim Cook to Lead Nvidia AWS highlights Agent-to-Agent protocol for cross-organizational AI collaboration Amazon Introduces Fine-Grained Access Controls for Bedrock AI Agents Amazon Web Services Introduces Framework for Testing Production AI Agents Nvidia CEO Jensen Huang Resigns Amid Misconduct Allegations Nvidia Faces Historic Crisis as CEO Jensen Huang Resigns Following Spy Allegations

Hardware Enthusiast Overcomes Linux PCIe Memory Mapping Constraints

🔌 Chips & Hardware 2 min read 👁 0

A developer has released a custom Linux kernel module to manage Resizable BAR memory allocation for a high-density GPU setup.

Hardware Enthusiast Overcomes Linux PCIe Memory Mapping Constraints🔌Chips & Hardware

Photo: Hacker News Front Page

Key points

  • Custom Linux module enables 32 GB Resizable BAR mapping for six-GPU systems.
  • Kernel regression in memory window calculation prevents proper allocation for high-density PCIe switches.
  • Workaround forces manual BAR resizing and bus rescanning before driver initialization.

A hardware enthusiast has successfully configured a system featuring four AMD Radeon AI PRO R9700 GPUs and two NVIDIA RTX 3090s behind a single PCIe switch. To enable peer-to-peer communication, the setup requires each card to map its full 32 GB of memory via Resizable BAR (Base Address Register). However, current Linux kernel resource allocation logic fails to properly calculate the memory windows for such a high-density configuration, leading to boot failures.

The issue stems from the kernel's pbus_size_mem function, which incorrectly sums the required memory windows without accounting for necessary alignment gaps between the GPUs and their associated doorbell registers. This results in the system failing to allocate sufficient address space for all six cards. While a pending patch series from maintainer Ilpo Järvinen addresses the underlying regression, the hardware still requires manual intervention to resize BARs before GPU drivers initialize.

To resolve this, the developer created a custom kernel module, gpu-rebar-layout, which executes during the initramfs stage. The module manually sets the BAR size registers and triggers a bus rescan, effectively forcing the kernel to reallocate resources correctly. This workaround ensures that each GPU receives the necessary 32 GB window, enabling the system to function despite the limitations of the current BIOS and kernel implementation.

Source Hacker News Front Page — doug.sh/posts/gpu-bars-behind-a-pcie-switch/ ↗

Contact the newsroom

Got a tip, a proposal or a partnership question? Write to us and we will reply shortly.