Re: Root filesystem read access for firmware load during hibernation image writing
From: Luis Chamberlain
Date: Fri Oct 11 2024 - 19:12:20 EST
On Sat, Oct 05, 2024 at 03:16:27PM +0200, Maciej S. Szmigiero wrote:
> The issue below still happens on kernel version 6.11.1.
>
> Created a kernel bugzilla entry for it:
> https://bugzilla.kernel.org/show_bug.cgi?id=219353
>
> It would be nice to at least know whether the filesystem read access supposed is
> to be working normally at PMSG_THAW hibernation stage to assign the issue accordingly.
No, there are races possible if you trigger IO to a fs before a suspend
is going on. If you have *more* IO ongoing, then you are likely to stall
suspend and not be able to recover.
> CC: request_firmware() maintainers
If IO is ongoing suspend is broken today because of the kthread freezer
which puts kthreads which should sleep idle, but if IO is ongoing we
can stall. This is work which we've been working to remove for years and
after its removal we can gracefully freeze filesystems [0] [1]
properly on suspend.
Other than that, obviously upon resume we want firmware to be present,
and to prevent races on resume we have a firmware cache. So on suspend
we cache used firmware so its available in cache on resume. See
device_cache_fw_images().
So.. we just now gotta respin the latest effort. I had stopped because
I know Darrick had some changes which he needed to get in sooner but
since this is low hanging fruit I never got around to it. So someone
just needs to respin the series.
[0] https://lwn.net/Articles/752588/
[1] https://lwn.net/Articles/935602/
Luis