From: Gustavo Arantes <dev.gustavoa@gmail.com>
To: marvin24@gmx.de
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
ac100@lists.launchpad.net, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org,
Gustavo Arantes <dev.gustavoa@gmail.com>
Subject: Re: [PATCH 0/2] staging: nvec_power: quiesce EC queries for system suspend
Date: Sun, 15 Mar 2026 18:48:51 -0300 [thread overview]
Message-ID: <20260315214851.15008-1-dev.gustavoa@gmail.com> (raw)
In-Reply-To: <233329fb-0ea9-d784-b56c-f078a329d370@gmx.de>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1680 bytes --]
Hello Marc,
thanks for reviewing.
On Sun, 15 Mar 2026, Marc Dietrich wrote:
> Reading out the battery info during boot takes some time as far as I
> remember, but I haven't tested your patches yet. Is the use of sync
> writes really required in order to realize a clean suspend?
You're right, I worked out some math on this, and I agree that the sync
conversion isn't strictly necessary.
The worst case with async writes during suspend is a reply arriving
after work has been cancelled. That reply would just be lost, and since
the poller refreshes everything on resume, there's no corruption or
crash — just one missed update.
The sync approach does avoid that window, but the cost is structural:
the battery metadata init serializes N queries, so the boot-time wall
time goes from roughly one EC round-trip to N * T_rt. With N = 3
(MANUFACTURER, MODEL, TYPE), the relative overhead is always 2x
regardless of how fast the EC is. Without hardware to measure T_rt
I can't tell whether that's 100ms or 2s of added latency, but either
way it's a cost with no real safety benefit.
> Are you able to test the change on real hardware?
Unfortunately I don't have access to Tegra 2 hardware, so this has
only been build-tested and reviewed by inspection. I'd appreciate it
if you or someone on the ac100 list could validate the v2 on a real
device.
If you think the lost-reply window during suspend is benign, I'd
prefer to drop patch 1 and send a v2 with just the PM hooks on top
of the existing async flow. Otherwise, I'm happy to keep the sync
conversion as-is.
Best regards,
Gustavo Arantes
prev parent reply other threads:[~2026-03-15 21:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 21:11 [PATCH 0/2] staging: nvec_power: quiesce EC queries for system suspend Gustavo Arantes
2026-03-12 21:11 ` [PATCH 1/2] staging: nvec_power: make EC queries synchronous Gustavo Arantes
2026-03-12 21:11 ` [PATCH 2/2] staging: nvec_power: stop EC queries during system suspend Gustavo Arantes
2026-03-15 20:48 ` [PATCH 0/2] staging: nvec_power: quiesce EC queries for " Marc Dietrich
2026-03-15 21:48 ` Gustavo Arantes [this message]
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=20260315214851.15008-1-dev.gustavoa@gmail.com \
--to=dev.gustavoa@gmail.com \
--cc=ac100@lists.launchpad.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linux-tegra@vger.kernel.org \
--cc=marvin24@gmx.de \
/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