Re: [PATCH v2 2/2] ACPI: sysfs: Expose BDAT data region
From: Rafael J. Wysocki (Intel)
Date: Tue Oct 13 2026 - 07:03:59 EST
On Tue, Oct 13, 2026 at 4:13 AM Jamie Nguyen <jamien@xxxxxxxxxx> wrote:
>
> The Sashiko review of this patch [1] notes that acpi_data_show() maps
> the whole data region on every read(), and that the unmaps are deferred
> by RCU, so repeated reads could pile up mappings and exhaust vmalloc
> space.
>
> That code isn't changed by this series. acpi_data_show() has mapped the
> whole region on every read since BERT support was added in 7dae6326ed76
> ("ACPI / sysfs: Extend ACPI sysfs to provide access to boot error
> region"), and BERT and CCEL use the same path.
>
> I measured it with v2 on an arm64 server, with 4K and 64K pages and the
> 90754-byte BDAT region:
>
> - Looping full-file reads, with 1 to 64 readers, kept at most about 4500
> deferred mappings (426 MiB) in flight. The count stayed flat and went
> back to baseline within 2 s of stopping.
> - The worst case, tight loops of 1-byte reads, peaked at about 34k
> mappings and 4.6 GiB of address space, and also drained within 2 s.
>
> At those rates, exhausting the 126 TiB of vmalloc space would need the
> deferred unmaps to stop completing for more than half an hour.
>
> If it's worth tightening anyway, acpi_data_show() could map only the
> range being read, which caps each mapping at two pages for all three
> tables. I can send that as a separate patch.
Yes, please!
> [1] https://sashiko.dev/#/patchset/20261012230632.3574987-1-jamien%40nvidia.com