€•o®Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”(hhŒparent”hubaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ+/translations/zh_CN/power/freezing-of-tasks”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”(hhhh2ubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/zh_TW/power/freezing-of-tasks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”(hhhhFubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/it_IT/power/freezing-of-tasks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”(hhhhZubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/ja_JP/power/freezing-of-tasks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”(hhhhnubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/ko_KR/power/freezing-of-tasks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”(hhhh‚ubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/sp_SP/power/freezing-of-tasks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒFreezing of tasks”h]”hŒFreezing of tasks”…””}”(hhªhh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒE/var/lib/git/docbuild/linux/Documentation/power/freezing-of-tasks.rst”h KubhŒenumerated_list”“”)”}”(hhh]”hŒ list_item”“”)”}”(hŒ*2007 Rafael J. Wysocki , GPL ”h]”hŒ paragraph”“”)”}”(hŒ)2007 Rafael J. Wysocki , GPL”h]”(hŒ2007 Rafael J. Wysocki <”…””}”(hŒ2007 Rafael J. Wysocki <”hhÄhžhhŸNh NubhŒ reference”“”)”}”(hŒ rjw@sisk.pl”h]”hŒ rjw@sisk.pl”…””}”(hhhhÏhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:rjw@sisk.pl”uh1hÍhhÄubhŒ>, GPL”…””}”(hŒ>, GPL”hhÄhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khh¾ubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hh¹hžhhŸh¶h Nubah}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œ upperalpha”Œprefix”Œ(”Œsuffix”Œ)”Œstart”Kuh1h·hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ!I. What is the freezing of tasks?”h]”hŒ!I. What is the freezing of tasks?”…””}”(hjhjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hhýhžhhŸh¶h KubhÃ)”}”(hŒ¬The freezing of tasks is a mechanism by which user space processes and some kernel threads are controlled during hibernation or system-wide suspend (on some architectures).”h]”hŒ¬The freezing of tasks is a mechanism by which user space processes and some kernel threads are controlled during hibernation or system-wide suspend (on some architectures).”…””}”(hjhjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K hhýhžhubeh}”(h]”Œi-what-is-the-freezing-of-tasks”ah ]”h"]”Œ!i. what is the freezing of tasks?”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒII. How does it work?”h]”hŒII. How does it work?”…””}”(hj)hj'hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj$hžhhŸh¶h KubhÃ)”}”(hXÜThere is one per-task flag (PF_NOFREEZE) and three per-task states (TASK_FROZEN, TASK_FREEZABLE and __TASK_FREEZABLE_UNSAFE) used for that. The tasks that have PF_NOFREEZE unset (all user space tasks and some kernel threads) are regarded as 'freezable' and treated in a special way before the system enters a sleep state as well as before a hibernation image is created (hibernation is directly covered by what follows, but the description applies to system-wide suspend too).”h]”hXàThere is one per-task flag (PF_NOFREEZE) and three per-task states (TASK_FROZEN, TASK_FREEZABLE and __TASK_FREEZABLE_UNSAFE) used for that. The tasks that have PF_NOFREEZE unset (all user space tasks and some kernel threads) are regarded as ‘freezable’ and treated in a special way before the system enters a sleep state as well as before a hibernation image is created (hibernation is directly covered by what follows, but the description applies to system-wide suspend too).”…””}”(hj7hj5hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khj$hžhubhÃ)”}”(hXûNamely, as the first step of the hibernation procedure the function freeze_processes() (defined in kernel/power/process.c) is called. A system-wide static key freezer_active (as opposed to a per-task flag or state) is used to indicate whether the system is to undergo a freezing operation. And freeze_processes() sets this static key. After this, it executes try_to_freeze_tasks() that sends a fake signal to all user space processes, and wakes up all the kernel threads. All freezable tasks must react to that by calling try_to_freeze(), which results in a call to __refrigerator() (defined in kernel/freezer.c), which changes the task's state to TASK_FROZEN, and makes it loop until it is woken by an explicit TASK_FROZEN wakeup. Then, that task is regarded as 'frozen' and so the set of functions handling this mechanism is referred to as 'the freezer' (these functions are defined in kernel/power/process.c, kernel/freezer.c & include/linux/freezer.h). User space tasks are generally frozen before kernel threads.”h]”hXNamely, as the first step of the hibernation procedure the function freeze_processes() (defined in kernel/power/process.c) is called. A system-wide static key freezer_active (as opposed to a per-task flag or state) is used to indicate whether the system is to undergo a freezing operation. And freeze_processes() sets this static key. After this, it executes try_to_freeze_tasks() that sends a fake signal to all user space processes, and wakes up all the kernel threads. All freezable tasks must react to that by calling try_to_freeze(), which results in a call to __refrigerator() (defined in kernel/freezer.c), which changes the task’s state to TASK_FROZEN, and makes it loop until it is woken by an explicit TASK_FROZEN wakeup. Then, that task is regarded as ‘frozen’ and so the set of functions handling this mechanism is referred to as ‘the freezer’ (these functions are defined in kernel/power/process.c, kernel/freezer.c & include/linux/freezer.h). User space tasks are generally frozen before kernel threads.”…””}”(hjEhjChžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khj$hžhubhÃ)”}”(hŒÑ__refrigerator() must not be called directly. Instead, use the try_to_freeze() function (defined in include/linux/freezer.h), that checks if the task is to be frozen and makes the task enter __refrigerator().”h]”hŒÑ__refrigerator() must not be called directly. Instead, use the try_to_freeze() function (defined in include/linux/freezer.h), that checks if the task is to be frozen and makes the task enter __refrigerator().”…””}”(hjShjQhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K(hj$hžhubhÃ)”}”(hXÍFor user space processes try_to_freeze() is called automatically from the signal-handling code, but the freezable kernel threads need to call it explicitly in suitable places or use the wait_event_freezable() or wait_event_freezable_timeout() macros (defined in include/linux/wait.h) that put the task to sleep (TASK_INTERRUPTIBLE) or freeze it (TASK_FROZEN) if freezer_active is set. The main loop of a freezable kernel thread may look like the following one::”h]”hXÌFor user space processes try_to_freeze() is called automatically from the signal-handling code, but the freezable kernel threads need to call it explicitly in suitable places or use the wait_event_freezable() or wait_event_freezable_timeout() macros (defined in include/linux/wait.h) that put the task to sleep (TASK_INTERRUPTIBLE) or freeze it (TASK_FROZEN) if freezer_active is set. The main loop of a freezable kernel thread may look like the following one:”…””}”(hXÌFor user space processes try_to_freeze() is called automatically from the signal-handling code, but the freezable kernel threads need to call it explicitly in suitable places or use the wait_event_freezable() or wait_event_freezable_timeout() macros (defined in include/linux/wait.h) that put the task to sleep (TASK_INTERRUPTIBLE) or freeze it (TASK_FROZEN) if freezer_active is set. The main loop of a freezable kernel thread may look like the following one:”hj_hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K,hj$hžhubhŒ literal_block”“”)”}”(hX­set_freezable(); while (true) { struct task_struct *tsk = NULL; wait_event_freezable(oom_reaper_wait, oom_reaper_list != NULL); spin_lock_irq(&oom_reaper_lock); if (oom_reaper_list != NULL) { tsk = oom_reaper_list; oom_reaper_list = tsk->oom_reaper_list; } spin_unlock_irq(&oom_reaper_lock); if (tsk) oom_reap_task(tsk); }”h]”hX­set_freezable(); while (true) { struct task_struct *tsk = NULL; wait_event_freezable(oom_reaper_wait, oom_reaper_list != NULL); spin_lock_irq(&oom_reaper_lock); if (oom_reaper_list != NULL) { tsk = oom_reaper_list; oom_reaper_list = tsk->oom_reaper_list; } spin_unlock_irq(&oom_reaper_lock); if (tsk) oom_reap_task(tsk); }”…””}”(hhhjpubah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jnhŸh¶h K4hj$hžhubhÃ)”}”(hŒ#(from mm/oom_kill.c::oom_reaper()).”h]”hŒ#(from mm/oom_kill.c::oom_reaper()).”…””}”(hj‚hj€hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KEhj$hžhubhÃ)”}”(hXmIf a freezable kernel thread is not put to the frozen state after the freezer has initiated a freezing operation, the freezing of tasks will fail and the entire system-wide transition will be cancelled. For this reason, freezable kernel threads must call try_to_freeze() somewhere or use one of the wait_event_freezable() and wait_event_freezable_timeout() macros.”h]”hXmIf a freezable kernel thread is not put to the frozen state after the freezer has initiated a freezing operation, the freezing of tasks will fail and the entire system-wide transition will be cancelled. For this reason, freezable kernel threads must call try_to_freeze() somewhere or use one of the wait_event_freezable() and wait_event_freezable_timeout() macros.”…””}”(hjhjŽhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KGhj$hžhubhÃ)”}”(hXAfter the system memory state has been restored from a hibernation image and devices have been reinitialized, the function thaw_processes() is called in order to wake up each frozen task. Then, the tasks that have been frozen leave __refrigerator() and continue running.”h]”hXAfter the system memory state has been restored from a hibernation image and devices have been reinitialized, the function thaw_processes() is called in order to wake up each frozen task. Then, the tasks that have been frozen leave __refrigerator() and continue running.”…””}”(hjžhjœhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KMhj$hžhubh¢)”}”(hhh]”(h§)”}”(hŒIRationale behind the functions dealing with freezing and thawing of tasks”h]”hŒIRationale behind the functions dealing with freezing and thawing of tasks”…””}”(hj¯hj­hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjªhžhhŸh¶h KTubhŒdefinition_list”“”)”}”(hhh]”(hŒdefinition_list_item”“”)”}”(hŒ3freeze_processes(): - freezes only userspace tasks ”h]”(hŒterm”“”)”}”(hŒfreeze_processes():”h]”hŒfreeze_processes():”…””}”(hjÊhjÈhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÆhŸh¶h KWhjÂubhŒ definition”“”)”}”(hhh]”hŒ bullet_list”“”)”}”(hhh]”h½)”}”(hŒfreezes only userspace tasks ”h]”hÃ)”}”(hŒfreezes only userspace tasks”h]”hŒfreezes only userspace tasks”…””}”(hjæhjähžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KWhjàubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hjÝubah}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jÛhŸh¶h KWhjØubah}”(h]”h ]”h"]”h$]”h&]”uh1jÖhjÂubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÀhŸh¶h KWhj½ubjÁ)”}”(hŒ’freeze_kernel_threads(): - freezes all tasks (including kernel threads) because we can't freeze kernel threads without freezing userspace tasks ”h]”(jÇ)”}”(hŒfreeze_kernel_threads():”h]”hŒfreeze_kernel_threads():”…””}”(hjhjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÆhŸh¶h K[hj ubj×)”}”(hhh]”jÜ)”}”(hhh]”h½)”}”(hŒufreezes all tasks (including kernel threads) because we can't freeze kernel threads without freezing userspace tasks ”h]”hÃ)”}”(hŒtfreezes all tasks (including kernel threads) because we can't freeze kernel threads without freezing userspace tasks”h]”hŒvfreezes all tasks (including kernel threads) because we can’t freeze kernel threads without freezing userspace tasks”…””}”(hj*hj(hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KZhj$ubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hj!ubah}”(h]”h ]”h"]”h$]”h&]”jþjÿuh1jÛhŸh¶h KZhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÖhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÀhŸh¶h K[hj½hžhubjÁ)”}”(hŒôthaw_kernel_threads(): - thaws only kernel threads; this is particularly useful if we need to do anything special in between thawing of kernel threads and thawing of userspace tasks, or if we want to postpone the thawing of userspace tasks ”h]”(jÇ)”}”(hŒthaw_kernel_threads():”h]”hŒthaw_kernel_threads():”…””}”(hjThjRhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÆhŸh¶h K`hjNubj×)”}”(hhh]”jÜ)”}”(hhh]”h½)”}”(hŒ×thaws only kernel threads; this is particularly useful if we need to do anything special in between thawing of kernel threads and thawing of userspace tasks, or if we want to postpone the thawing of userspace tasks ”h]”hÃ)”}”(hŒÖthaws only kernel threads; this is particularly useful if we need to do anything special in between thawing of kernel threads and thawing of userspace tasks, or if we want to postpone the thawing of userspace tasks”h]”hŒÖthaws only kernel threads; this is particularly useful if we need to do anything special in between thawing of kernel threads and thawing of userspace tasks, or if we want to postpone the thawing of userspace tasks”…””}”(hjlhjjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K^hjfubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hjcubah}”(h]”h ]”h"]”h$]”h&]”jþjÿuh1jÛhŸh¶h K^hj`ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÖhjNubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÀhŸh¶h K`hj½hžhubjÁ)”}”(hŒ‡thaw_processes(): - thaws all tasks (including kernel threads) because we can't thaw userspace tasks without thawing kernel threads ”h]”(jÇ)”}”(hŒthaw_processes():”h]”hŒthaw_processes():”…””}”(hj–hj”hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÆhŸh¶h Kehjubj×)”}”(hhh]”jÜ)”}”(hhh]”h½)”}”(hŒqthaws all tasks (including kernel threads) because we can't thaw userspace tasks without thawing kernel threads ”h]”hÃ)”}”(hŒothaws all tasks (including kernel threads) because we can't thaw userspace tasks without thawing kernel threads”h]”hŒqthaws all tasks (including kernel threads) because we can’t thaw userspace tasks without thawing kernel threads”…””}”(hj®hj¬hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Kchj¨ubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hj¥ubah}”(h]”h ]”h"]”h$]”h&]”jþjÿuh1jÛhŸh¶h Kchj¢ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÖhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÀhŸh¶h Kehj½hžhubeh}”(h]”h ]”h"]”h$]”h&]”uh1j»hjªhžhhŸNh Nubeh}”(h]”ŒIrationale-behind-the-functions-dealing-with-freezing-and-thawing-of-tasks”ah ]”h"]”ŒIrationale behind the functions dealing with freezing and thawing of tasks”ah$]”h&]”uh1h¡hj$hžhhŸh¶h KTubeh}”(h]”Œii-how-does-it-work”ah ]”h"]”Œii. how does it work?”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ(III. Which kernel threads are freezable?”h]”hŒ(III. Which kernel threads are freezable?”…””}”(hjíhjëhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjèhžhhŸh¶h KhubhÃ)”}”(hX@Kernel threads are not freezable by default. However, a kernel thread may clear PF_NOFREEZE for itself by calling set_freezable() (the resetting of PF_NOFREEZE directly is not allowed). From this point it is regarded as freezable and must call try_to_freeze() or variants of wait_event_freezable() in a suitable place.”h]”hX@Kernel threads are not freezable by default. However, a kernel thread may clear PF_NOFREEZE for itself by calling set_freezable() (the resetting of PF_NOFREEZE directly is not allowed). From this point it is regarded as freezable and must call try_to_freeze() or variants of wait_event_freezable() in a suitable place.”…””}”(hjûhjùhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Kjhjèhžhubeh}”(h]”Œ&iii-which-kernel-threads-are-freezable”ah ]”h"]”Œ(iii. which kernel threads are freezable?”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Khubh¢)”}”(hhh]”(h§)”}”(hŒIV. Why do we do that?”h]”hŒIV. Why do we do that?”…””}”(hjhjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjhžhhŸh¶h KqubhÃ)”}”(hŒNGenerally speaking, there is a couple of reasons to use the freezing of tasks:”h]”hŒNGenerally speaking, there is a couple of reasons to use the freezing of tasks:”…””}”(hj"hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Kshjhžhubh¸)”}”(hhh]”(h½)”}”(hXÔThe principal reason is to prevent filesystems from being damaged after hibernation. At the moment we have no simple means of checkpointing filesystems, so if there are any modifications made to filesystem data and/or metadata on disks, we cannot bring them back to the state from before the modifications. At the same time each hibernation image contains some filesystem-related information that must be consistent with the state of the on-disk data and metadata after the system memory state has been restored from the image (otherwise the filesystems will be damaged in a nasty way, usually making them almost impossible to repair). We therefore freeze tasks that might cause the on-disk filesystems' data and metadata to be modified after the hibernation image has been created and before the system is finally powered off. The majority of these are user space processes, but if any of the kernel threads may cause something like this to happen, they have to be freezable. ”h]”hÃ)”}”(hXÓThe principal reason is to prevent filesystems from being damaged after hibernation. At the moment we have no simple means of checkpointing filesystems, so if there are any modifications made to filesystem data and/or metadata on disks, we cannot bring them back to the state from before the modifications. At the same time each hibernation image contains some filesystem-related information that must be consistent with the state of the on-disk data and metadata after the system memory state has been restored from the image (otherwise the filesystems will be damaged in a nasty way, usually making them almost impossible to repair). We therefore freeze tasks that might cause the on-disk filesystems' data and metadata to be modified after the hibernation image has been created and before the system is finally powered off. The majority of these are user space processes, but if any of the kernel threads may cause something like this to happen, they have to be freezable.”h]”hXÕThe principal reason is to prevent filesystems from being damaged after hibernation. At the moment we have no simple means of checkpointing filesystems, so if there are any modifications made to filesystem data and/or metadata on disks, we cannot bring them back to the state from before the modifications. At the same time each hibernation image contains some filesystem-related information that must be consistent with the state of the on-disk data and metadata after the system memory state has been restored from the image (otherwise the filesystems will be damaged in a nasty way, usually making them almost impossible to repair). We therefore freeze tasks that might cause the on-disk filesystems’ data and metadata to be modified after the hibernation image has been created and before the system is finally powered off. The majority of these are user space processes, but if any of the kernel threads may cause something like this to happen, they have to be freezable.”…””}”(hj7hj5hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Kuhj1ubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hj.hžhhŸh¶h Nubh½)”}”(hX;Next, to create the hibernation image we need to free a sufficient amount of memory (approximately 50% of available RAM) and we need to do that before devices are deactivated, because we generally need them for swapping out. Then, after the memory for the image has been freed, we don't want tasks to allocate additional memory and we prevent them from doing that by freezing them earlier. [Of course, this also means that device drivers should not allocate substantial amounts of memory from their .suspend() callbacks before hibernation, but this is a separate issue.] ”h]”hÃ)”}”(hX:Next, to create the hibernation image we need to free a sufficient amount of memory (approximately 50% of available RAM) and we need to do that before devices are deactivated, because we generally need them for swapping out. Then, after the memory for the image has been freed, we don't want tasks to allocate additional memory and we prevent them from doing that by freezing them earlier. [Of course, this also means that device drivers should not allocate substantial amounts of memory from their .suspend() callbacks before hibernation, but this is a separate issue.]”h]”hX<Next, to create the hibernation image we need to free a sufficient amount of memory (approximately 50% of available RAM) and we need to do that before devices are deactivated, because we generally need them for swapping out. Then, after the memory for the image has been freed, we don’t want tasks to allocate additional memory and we prevent them from doing that by freezing them earlier. [Of course, this also means that device drivers should not allocate substantial amounts of memory from their .suspend() callbacks before hibernation, but this is a separate issue.]”…””}”(hjOhjMhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K„hjIubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hj.hžhhŸh¶h Nubh½)”}”(hXrThe third reason is to prevent user space processes and some kernel threads from interfering with the suspending and resuming of devices. A user space process running on a second CPU while we are suspending devices may, for example, be troublesome and without the freezing of tasks we would need some safeguards against race conditions that might occur in such a case. ”h]”hÃ)”}”(hXqThe third reason is to prevent user space processes and some kernel threads from interfering with the suspending and resuming of devices. A user space process running on a second CPU while we are suspending devices may, for example, be troublesome and without the freezing of tasks we would need some safeguards against race conditions that might occur in such a case.”h]”hXqThe third reason is to prevent user space processes and some kernel threads from interfering with the suspending and resuming of devices. A user space process running on a second CPU while we are suspending devices may, for example, be troublesome and without the freezing of tasks we would need some safeguards against race conditions that might occur in such a case.”…””}”(hjghjehžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khjaubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hj.hžhhŸh¶h Nubeh}”(h]”h ]”h"]”h$]”h&]”höŒarabic”høhhúŒ.”uh1h·hjhžhhŸh¶h KuubhÃ)”}”(hŒÅAlthough Linus Torvalds doesn't like the freezing of tasks, he said this in one of the discussions on LKML (https://lore.kernel.org/r/alpine.LFD.0.98.0704271801020.9964@woody.linux-foundation.org):”h]”(hŒnAlthough Linus Torvalds doesn’t like the freezing of tasks, he said this in one of the discussions on LKML (”…””}”(hŒlAlthough Linus Torvalds doesn't like the freezing of tasks, he said this in one of the discussions on LKML (”hjhžhhŸNh NubhÎ)”}”(hŒWhttps://lore.kernel.org/r/alpine.LFD.0.98.0704271801020.9964@woody.linux-foundation.org”h]”hŒWhttps://lore.kernel.org/r/alpine.LFD.0.98.0704271801020.9964@woody.linux-foundation.org”…””}”(hhhjŠhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jŒuh1hÍhjubhŒ):”…””}”(hŒ):”hjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K“hjhžhubhÃ)”}”(hŒB"RJW:> Why we freeze tasks at all or why we freeze kernel threads?”h]”hŒD“RJW:> Why we freeze tasks at all or why we freeze kernel threads?”…””}”(hj¦hj¤hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K–hjhžhubhÃ)”}”(hŒLinus: In many ways, 'at all'.”h]”hŒ"Linus: In many ways, ‘at all’.”…””}”(hj´hj²hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K˜hjhžhubhÃ)”}”(hX:I **do** realize the IO request queue issues, and that we cannot actually do s2ram with some devices in the middle of a DMA. So we want to be able to avoid *that*, there's no question about that. And I suspect that stopping user threads and then waiting for a sync is practically one of the easier ways to do so.”h]”(hŒI ”…””}”(hŒI ”hjÀhžhhŸNh NubhŒstrong”“”)”}”(hŒ**do**”h]”hŒdo”…””}”(hhhjËhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÉhjÀubhŒ• realize the IO request queue issues, and that we cannot actually do s2ram with some devices in the middle of a DMA. So we want to be able to avoid ”…””}”(hŒ• realize the IO request queue issues, and that we cannot actually do s2ram with some devices in the middle of a DMA. So we want to be able to avoid ”hjÀhžhhŸNh NubhŒemphasis”“”)”}”(hŒ*that*”h]”hŒthat”…””}”(hhhjàhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÞhjÀubhŒ™, there’s no question about that. And I suspect that stopping user threads and then waiting for a sync is practically one of the easier ways to do so.”…””}”(hŒ—, there's no question about that. And I suspect that stopping user threads and then waiting for a sync is practically one of the easier ways to do so.”hjÀhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KšhjhžhubhÃ)”}”(hŒ„So in practice, the 'at all' may become a 'why freeze kernel threads?' and freezing user threads I don't find really objectionable."”h]”hŒSo in practice, the ‘at all’ may become a ‘why freeze kernel threads?’ and freezing user threads I don’t find really objectionable.—…””}”(hjûhjùhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K hjhžhubhÃ)”}”(hXýStill, there are kernel threads that may want to be freezable. For example, if a kernel thread that belongs to a device driver accesses the device directly, it in principle needs to know when the device is suspended, so that it doesn't try to access it at that time. However, if the kernel thread is freezable, it will be frozen before the driver's .suspend() callback is executed and it will be thawed after the driver's .resume() callback has run, so it won't be accessing the device while it's suspended.”h]”hXStill, there are kernel threads that may want to be freezable. For example, if a kernel thread that belongs to a device driver accesses the device directly, it in principle needs to know when the device is suspended, so that it doesn’t try to access it at that time. However, if the kernel thread is freezable, it will be frozen before the driver’s .suspend() callback is executed and it will be thawed after the driver’s .resume() callback has run, so it won’t be accessing the device while it’s suspended.”…””}”(hj hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K£hjhžhubh¸)”}”(hhh]”h½)”}”(hXÐAnother reason for freezing tasks is to prevent user space processes from realizing that hibernation (or suspend) operation takes place. Ideally, user space processes should not notice that such a system-wide operation has occurred and should continue running without any problems after the restore (or resume from suspend). Unfortunately, in the most general case this is quite difficult to achieve without the freezing of tasks. Consider, for example, a process that depends on all CPUs being online while it's running. Since we need to disable nonboot CPUs during the hibernation, if this process is not frozen, it may notice that the number of CPUs has changed and may start to work incorrectly because of that. ”h]”hÃ)”}”(hXÏAnother reason for freezing tasks is to prevent user space processes from realizing that hibernation (or suspend) operation takes place. Ideally, user space processes should not notice that such a system-wide operation has occurred and should continue running without any problems after the restore (or resume from suspend). Unfortunately, in the most general case this is quite difficult to achieve without the freezing of tasks. Consider, for example, a process that depends on all CPUs being online while it's running. Since we need to disable nonboot CPUs during the hibernation, if this process is not frozen, it may notice that the number of CPUs has changed and may start to work incorrectly because of that.”h]”hXÑAnother reason for freezing tasks is to prevent user space processes from realizing that hibernation (or suspend) operation takes place. Ideally, user space processes should not notice that such a system-wide operation has occurred and should continue running without any problems after the restore (or resume from suspend). Unfortunately, in the most general case this is quite difficult to achieve without the freezing of tasks. Consider, for example, a process that depends on all CPUs being online while it’s running. Since we need to disable nonboot CPUs during the hibernation, if this process is not frozen, it may notice that the number of CPUs has changed and may start to work incorrectly because of that.”…””}”(hjhjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K«hjubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hjhžhhŸh¶h Nubah}”(h]”h ]”h"]”h$]”h&]”höjhøhhúj€hüKuh1h·hjhžhhŸh¶h K«ubeh}”(h]”Œiv-why-do-we-do-that”ah ]”h"]”Œiv. why do we do that?”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kqubh¢)”}”(hhh]”(h§)”}”(hŒ;V. Are there any problems related to the freezing of tasks?”h]”hŒ;V. Are there any problems related to the freezing of tasks?”…””}”(hjChjAhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj>hžhhŸh¶h K·ubhÃ)”}”(hŒYes, there are.”h]”hŒYes, there are.”…””}”(hjQhjOhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K¹hj>hžhubhÃ)”}”(hX†First of all, the freezing of kernel threads may be tricky if they depend one on another. For example, if kernel thread A waits for a completion (in the TASK_UNINTERRUPTIBLE state) that needs to be done by freezable kernel thread B and B is frozen in the meantime, then A will be blocked until B is thawed, which may be undesirable. That's why kernel threads are not freezable by default.”h]”hXˆFirst of all, the freezing of kernel threads may be tricky if they depend one on another. For example, if kernel thread A waits for a completion (in the TASK_UNINTERRUPTIBLE state) that needs to be done by freezable kernel thread B and B is frozen in the meantime, then A will be blocked until B is thawed, which may be undesirable. That’s why kernel threads are not freezable by default.”…””}”(hj_hj]hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K»hj>hžhubhÃ)”}”(hŒ]Second, there are the following two problems related to the freezing of user space processes:”h]”hŒ]Second, there are the following two problems related to the freezing of user space processes:”…””}”(hjmhjkhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KÁhj>hžhubh¸)”}”(hhh]”(h½)”}”(hŒJPutting processes into an uninterruptible sleep distorts the load average.”h]”hÃ)”}”(hj~h]”hŒJPutting processes into an uninterruptible sleep distorts the load average.”…””}”(hj~hj€hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KÄhj|ubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hjyhžhhŸh¶h Nubh½)”}”(hXNow that we have FUSE, plus the framework for doing device drivers in userspace, it gets even more complicated because some userspace processes are now doing the sorts of things that kernel threads do (https://lists.linux-foundation.org/pipermail/linux-pm/2007-May/012309.html). ”h]”hÃ)”}”(hXNow that we have FUSE, plus the framework for doing device drivers in userspace, it gets even more complicated because some userspace processes are now doing the sorts of things that kernel threads do (https://lists.linux-foundation.org/pipermail/linux-pm/2007-May/012309.html).”h]”(hŒÊNow that we have FUSE, plus the framework for doing device drivers in userspace, it gets even more complicated because some userspace processes are now doing the sorts of things that kernel threads do (”…””}”(hŒÊNow that we have FUSE, plus the framework for doing device drivers in userspace, it gets even more complicated because some userspace processes are now doing the sorts of things that kernel threads do (”hj—hžhhŸNh NubhÎ)”}”(hŒJhttps://lists.linux-foundation.org/pipermail/linux-pm/2007-May/012309.html”h]”hŒJhttps://lists.linux-foundation.org/pipermail/linux-pm/2007-May/012309.html”…””}”(hhhj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j¢uh1hÍhj—ubhŒ).”…””}”(hŒ).”hj—hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KÅhj“ubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hjyhžhhŸh¶h Nubeh}”(h]”h ]”h"]”h$]”h&]”höjhøhhúj€uh1h·hj>hžhhŸh¶h KÄubhÃ)”}”(hXBThe problem 1. seems to be fixable, although it hasn't been fixed so far. The other one is more serious, but it seems that we can work around it by using hibernation (and suspend) notifiers (in that case, though, we won't be able to avoid the realization by the user space processes that the hibernation is taking place).”h]”hXFThe problem 1. seems to be fixable, although it hasn’t been fixed so far. The other one is more serious, but it seems that we can work around it by using hibernation (and suspend) notifiers (in that case, though, we won’t be able to avoid the realization by the user space processes that the hibernation is taking place).”…””}”(hjÈhjÆhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KÊhj>hžhubhÃ)”}”(hXãThere are also problems that the freezing of tasks tends to expose, although they are not directly related to it. For example, if request_firmware() is called from a device driver's .resume() routine, it will timeout and eventually fail, because the user land process that should respond to the request is frozen at this point. So, seemingly, the failure is due to the freezing of tasks. Suppose, however, that the firmware file is located on a filesystem accessible only through another device that hasn't been resumed yet. In that case, request_firmware() will fail regardless of whether or not the freezing of tasks is used. Consequently, the problem is not really related to the freezing of tasks, since it generally exists anyway.”h]”hXçThere are also problems that the freezing of tasks tends to expose, although they are not directly related to it. For example, if request_firmware() is called from a device driver’s .resume() routine, it will timeout and eventually fail, because the user land process that should respond to the request is frozen at this point. So, seemingly, the failure is due to the freezing of tasks. Suppose, however, that the firmware file is located on a filesystem accessible only through another device that hasn’t been resumed yet. In that case, request_firmware() will fail regardless of whether or not the freezing of tasks is used. Consequently, the problem is not really related to the freezing of tasks, since it generally exists anyway.”…””}”(hjÖhjÔhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KÐhj>hžhubhÃ)”}”(hX A driver must have all firmwares it may need in RAM before suspend() is called. If keeping them is not practical, for example due to their size, they must be requested early enough using the suspend notifier API described in Documentation/driver-api/pm/notifiers.rst.”h]”hX A driver must have all firmwares it may need in RAM before suspend() is called. If keeping them is not practical, for example due to their size, they must be requested early enough using the suspend notifier API described in Documentation/driver-api/pm/notifiers.rst.”…””}”(hjähjâhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KÛhj>hžhubeh}”(h]”Œ9v-are-there-any-problems-related-to-the-freezing-of-tasks”ah ]”h"]”Œ;v. are there any problems related to the freezing of tasks?”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K·ubh¢)”}”(hhh]”(h§)”}”(hŒGVI. Are there any precautions to be taken to prevent freezing failures?”h]”hŒGVI. Are there any precautions to be taken to prevent freezing failures?”…””}”(hjýhjûhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjøhžhhŸh¶h KáubhÃ)”}”(hŒYes, there are.”h]”hŒYes, there are.”…””}”(hj hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KãhjøhžhubhÃ)”}”(hXVFirst of all, grabbing the 'system_transition_mutex' lock to mutually exclude a piece of code from system-wide sleep such as suspend/hibernation is not encouraged. If possible, that piece of code must instead hook onto the suspend/hibernation notifiers to achieve mutual exclusion. Look at the CPU-Hotplug code (kernel/cpu.c) for an example.”h]”hXZFirst of all, grabbing the ‘system_transition_mutex’ lock to mutually exclude a piece of code from system-wide sleep such as suspend/hibernation is not encouraged. If possible, that piece of code must instead hook onto the suspend/hibernation notifiers to achieve mutual exclusion. Look at the CPU-Hotplug code (kernel/cpu.c) for an example.”…””}”(hjhjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KåhjøhžhubhÃ)”}”(hXHowever, if that is not feasible, and grabbing 'system_transition_mutex' is deemed necessary, it is strongly discouraged to directly call mutex_[un]lock(&system_transition_mutex) since that could lead to freezing failures, because if the suspend/hibernate code successfully acquired the 'system_transition_mutex' lock, and hence that other entity failed to acquire the lock, then that task would get blocked in TASK_UNINTERRUPTIBLE state. As a consequence, the freezer would not be able to freeze that task, leading to freezing failure.”h]”hX However, if that is not feasible, and grabbing ‘system_transition_mutex’ is deemed necessary, it is strongly discouraged to directly call mutex_[un]lock(&system_transition_mutex) since that could lead to freezing failures, because if the suspend/hibernate code successfully acquired the ‘system_transition_mutex’ lock, and hence that other entity failed to acquire the lock, then that task would get blocked in TASK_UNINTERRUPTIBLE state. As a consequence, the freezer would not be able to freeze that task, leading to freezing failure.”…””}”(hj'hj%hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KëhjøhžhubhÃ)”}”(hXÄHowever, the [un]lock_system_sleep() APIs are safe to use in this scenario, since they ask the freezer to skip freezing this task, since it is anyway "frozen enough" as it is blocked on 'system_transition_mutex', which will be released only after the entire suspend/hibernation sequence is complete. So, to summarize, use [un]lock_system_sleep() instead of directly using mutex_[un]lock(&system_transition_mutex). That would prevent freezing failures.”h]”hXÌHowever, the [un]lock_system_sleep() APIs are safe to use in this scenario, since they ask the freezer to skip freezing this task, since it is anyway “frozen enough†as it is blocked on ‘system_transition_mutex’, which will be released only after the entire suspend/hibernation sequence is complete. So, to summarize, use [un]lock_system_sleep() instead of directly using mutex_[un]lock(&system_transition_mutex). That would prevent freezing failures.”…””}”(hj5hj3hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Kôhjøhžhubeh}”(h]”ŒEvi-are-there-any-precautions-to-be-taken-to-prevent-freezing-failures”ah ]”h"]”ŒGvi. are there any precautions to be taken to prevent freezing failures?”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Káubh¢)”}”(hhh]”(h§)”}”(hŒV. Miscellaneous”h]”hŒV. Miscellaneous”…””}”(hjNhjLhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjIhžhhŸh¶h KüubhÃ)”}”(hŒÜ/sys/power/pm_freeze_timeout controls how long it will cost at most to freeze all user space processes or all freezable kernel threads, in unit of millisecond. The default value is 20000, with range of unsigned integer.”h]”hŒÜ/sys/power/pm_freeze_timeout controls how long it will cost at most to freeze all user space processes or all freezable kernel threads, in unit of millisecond. The default value is 20000, with range of unsigned integer.”…””}”(hj\hjZhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KþhjIhžhubeh}”(h]”Œv-miscellaneous”ah ]”h"]”Œv. miscellaneous”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Küubeh}”(h]”Œfreezing-of-tasks”ah ]”h"]”Œfreezing of tasks”ah$]”h&]”uh1h¡hhhžhhŸh¶h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h¶uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¦NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j›Œerror_encoding”ŒUTF-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h¶Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œ embed_images”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jujrj!jjåjâjÝjÚj j j;j8jõjòjFjCjmjjuŒ nametypes”}”(juNj!NjåNjÝNj Nj;NjõNjFNjmNuh}”(jrh£jhýjâj$jÚjªj jèj8jjòj>jCjøjjjIuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”(hŒsystem_message”“”)”}”(hhh]”hÃ)”}”(hŒ:Enumerated list start value not ordinal-1: "C" (ordinal 3)”h]”hŒ>Enumerated list start value not ordinal-1: “C†(ordinal 3)”…””}”(hhhjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhjubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”h¶Œline”Kuh1jþhh£hžhhŸh¶h Kubjÿ)”}”(hhh]”hÃ)”}”(hŒ:Enumerated list start value not ordinal-1: "4" (ordinal 4)”h]”hŒ>Enumerated list start value not ordinal-1: “4†(ordinal 4)”…””}”(hhhjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhjubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”jŒsource”h¶Œline”Kuh1jþhjhžhhŸh¶h K«ubeŒtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.