On Mon 11-08-25 17:13:43, Zihuan Zhang wrote: > > 在 2025/8/8 16:58, Michal Hocko 写道: [...] > > Also the interface seems to be really coarse grained and it can easily > > turn out insufficient for other usecases while it is not entirely clear > > to me how this could be extended for those. > We recognize that the current interface is relatively coarse-grained and > may not be sufficient for all scenarios. The present implementation is a > basic version. > > Our plan is to introduce a classification-based mechanism that assigns > different freeze priorities according to process categories. For example, > filesystem and graphics-related processes will be given higher default > freeze priority, as they are critical in the freezing workflow. This > classification approach helps target important processes more precisely. > > However, this requires further testing and refinement before full > deployment. We believe this incremental, category-based design will make the > mechanism more effective and adaptable over time while keeping it > manageable. Unless there is a clear path for a more extendable interface then introducing this one is a no-go. We do not want to grow different ways to establish freezing policies. But much more fundamentally. So far I haven't really seen any argument why different priorities help with the underlying problem other than the timing might be slightly different if you change the order of freezing. This to me sounds like the proposed scheme mostly works around the problem you are seeing and as such is not a really good candidate to be merged as a long term solution. Not to mention with a user API that needs to be maintained for ever. So NAK from me on the interface. > > I believe it would be more useful to find sources of those freezer > > blockers and try to address those. Making more blocked tasks > > __set_task_frozen compatible sounds like a general improvement in > > itself. > > we have already identified some causes of D-state tasks, many of which are > related to the filesystem. On some systems, certain processes frequently > execute ext4_sync_file, and under contention this can lead to D-state tasks. Please work with maintainers of those subsystems to find proper solutions. -- Michal Hocko SUSE Labs