From: Jamie Nguyen <jamien@nvidia.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Len Brown <lenb@kernel.org>, Tony Luck <tony.luck@intel.com>,
"Punit Agrawal" <punitagrawal@gmail.com>,
<linux-acpi@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] ACPI: sysfs: Expose BDAT data region
Date: Mon, 12 Oct 2026 19:12:58 -0700 [thread overview]
Message-ID: <20261013021258.3843871-1-jamien@nvidia.com> (raw)
In-Reply-To: <20261012230632.3574987-3-jamien@nvidia.com>
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.
[1] https://sashiko.dev/#/patchset/20261012230632.3574987-1-jamien%40nvidia.com
Jamie
next prev parent reply other threads:[~2026-10-13 2:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 23:06 [PATCH v2 0/2] " Jamie Nguyen
2026-10-12 23:06 ` [PATCH v2 1/2] ACPI: sysfs: Fix data_attr leak when creating a data file fails Jamie Nguyen
2026-10-12 23:06 ` [PATCH v2 2/2] ACPI: sysfs: Expose BDAT data region Jamie Nguyen
2026-10-13 2:12 ` Jamie Nguyen [this message]
2026-10-13 10:53 ` Rafael J. Wysocki (Intel)
2026-10-13 18:11 ` Jamie Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261013021258.3843871-1-jamien@nvidia.com \
--to=jamien@nvidia.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=punitagrawal@gmail.com \
--cc=rafael@kernel.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®