On Fri 13-06-25 10:37:42, Zihuan Zhang wrote:
Hi David,How do you define reasonable time?
Thanks for your advice!
在 2025/6/10 18:50, David Hildenbrand 写道:
Let me revisit the core issue for clarity. Under normal conditions, most
Can't this problem be mitigated by simply not scheduling the new fork'ed
process while the system is frozen?
Or what exact scenario are you worried about?
processes in the system are in a sleep state, and only a few are runnable.
So even with thousands of processes, the freezer generally works reliably
and completes within a reasonable time
In our test scenario, although new processes can indeed be created during the usleep_range() intervals between freeze iterations, it’s actually difficult to make the freezer fail outright. This is because user processes are forcibly frozen: when they return to user space and check for pending signals, they enter try_to_freeze() and transition into the refrigerator.However, in our fork-based test scenario, we observed repeated freezeDoes this represent any real life scenario that happens on your system?
retries.
In other words how often do you miss your "reasonable time" treshold
while running a regular workload. Does the freezer ever fail?
[...]
At this stage, our focus is mainly on the global freezer during system suspend and hibernate (S3/S4). However, the patch itself is based on the generic freezing() and freeze_task() logic, so it should also work with the cgroup freezer as well.You’re right — blocking fork() is quite intrusive, so it’s worth exploringJust curious, are you interested in global freezer only or is the cgroup
alternatives. We’ll try implementing your idea of preventing the newly
forked process from being scheduled while the system is freezing, rather
than failing the fork() call outright.
freezer involved as well?