€•)FŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ)/translations/zh_CN/core-api/housekeeping”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/zh_TW/core-api/housekeeping”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/it_IT/core-api/housekeeping”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/ja_JP/core-api/housekeeping”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/ko_KR/core-api/housekeeping”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/sp_SP/core-api/housekeeping”Œ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Œ Housekeeping”h]”hŒ Housekeeping”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒC/var/lib/git/docbuild/linux/Documentation/core-api/housekeeping.rst”h KubhŒ paragraph”“”)”}”(hŒÎCPU Isolation moves away kernel work that may otherwise run on any CPU. The purpose of its related features is to reduce the OS jitter that some extreme workloads can't stand, such as in some DPDK usecases.”h]”hŒÐCPU Isolation moves away kernel work that may otherwise run on any CPU. The purpose of its related features is to reduce the OS jitter that some extreme workloads can’t stand, such as in some DPDK usecases.”…””}”(hh¹hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubh¸)”}”(hŒéThe kernel work moved away by CPU isolation is commonly described as "housekeeping" because it includes ground work that performs cleanups, statistics maintainance and actions relying on them, memory release, various deferrals etc...”h]”hŒíThe kernel work moved away by CPU isolation is commonly described as “housekeeping†because it includes ground work that performs cleanups, statistics maintainance and actions relying on them, memory release, various deferrals etc...”…””}”(hhÇhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K hh£hžhubh¸)”}”(hX.Sometimes housekeeping is just some unbound work (unbound workqueues, unbound timers, ...) that gets easily assigned to non-isolated CPUs. But sometimes housekeeping is tied to a specific CPU and requires elaborated tricks to be offloaded to non-isolated CPUs (RCU_NOCB, remote scheduler tick, etc...).”h]”hX.Sometimes housekeeping is just some unbound work (unbound workqueues, unbound timers, ...) that gets easily assigned to non-isolated CPUs. But sometimes housekeeping is tied to a specific CPU and requires elaborated tricks to be offloaded to non-isolated CPUs (RCU_NOCB, remote scheduler tick, etc...).”…””}”(hhÕhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubh¸)”}”(hXThus, a housekeeping CPU can be considered as the reverse of an isolated CPU. It is simply a CPU that can execute housekeeping work. There must always be at least one online housekeeping CPU at any time. The CPUs that are not isolated are automatically assigned as housekeeping.”h]”hXThus, a housekeeping CPU can be considered as the reverse of an isolated CPU. It is simply a CPU that can execute housekeeping work. There must always be at least one online housekeeping CPU at any time. The CPUs that are not isolated are automatically assigned as housekeeping.”…””}”(hhãhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubh¸)”}”(hŒZHousekeeping is currently divided in four features described by the ``enum hk_type type``:”h]”(hŒDHousekeeping is currently divided in four features described by the ”…””}”(hhñhžhhŸNh NubhŒliteral”“”)”}”(hŒ``enum hk_type type``”h]”hŒenum hk_type type”…””}”(hhûhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hùhhñubhŒ:”…””}”(hhñhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubhŒenumerated_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒñHK_TYPE_DOMAIN matches the work moved away by scheduler domain isolation performed through ``isolcpus=domain`` boot parameter or isolated cpuset partitions in cgroup v2. This includes scheduler load balancing, unbound workqueues and timers. ”h]”h¸)”}”(hŒðHK_TYPE_DOMAIN matches the work moved away by scheduler domain isolation performed through ``isolcpus=domain`` boot parameter or isolated cpuset partitions in cgroup v2. This includes scheduler load balancing, unbound workqueues and timers.”h]”(hŒ[HK_TYPE_DOMAIN matches the work moved away by scheduler domain isolation performed through ”…””}”(hjhžhhŸNh Nubhú)”}”(hŒ``isolcpus=domain``”h]”hŒisolcpus=domain”…””}”(hj&hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hùhjubhŒ‚ boot parameter or isolated cpuset partitions in cgroup v2. This includes scheduler load balancing, unbound workqueues and timers.”…””}”(hjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjhžhhŸh¶h Nubj)”}”(hŒËHK_TYPE_KERNEL_NOISE matches the work moved away by tick isolation performed through ``nohz_full=`` or ``isolcpus=nohz`` boot parameters. This includes remote scheduler tick, vmstat and lockup watchdog. ”h]”h¸)”}”(hŒÊHK_TYPE_KERNEL_NOISE matches the work moved away by tick isolation performed through ``nohz_full=`` or ``isolcpus=nohz`` boot parameters. This includes remote scheduler tick, vmstat and lockup watchdog.”h]”(hŒUHK_TYPE_KERNEL_NOISE matches the work moved away by tick isolation performed through ”…””}”(hjHhžhhŸNh Nubhú)”}”(hŒ``nohz_full=``”h]”hŒ nohz_full=”…””}”(hjPhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hùhjHubhŒ or ”…””}”(hjHhžhhŸNh Nubhú)”}”(hŒ``isolcpus=nohz``”h]”hŒ isolcpus=nohz”…””}”(hjbhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hùhjHubhŒR boot parameters. This includes remote scheduler tick, vmstat and lockup watchdog.”…””}”(hjHhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K"hjDubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjhžhhŸh¶h Nubj)”}”(hŒ}HK_TYPE_MANAGED_IRQ matches the IRQ handlers moved away by managed IRQ isolation performed through ``isolcpus=managed_irq``. ”h]”h¸)”}”(hŒ|HK_TYPE_MANAGED_IRQ matches the IRQ handlers moved away by managed IRQ isolation performed through ``isolcpus=managed_irq``.”h]”(hŒcHK_TYPE_MANAGED_IRQ matches the IRQ handlers moved away by managed IRQ isolation performed through ”…””}”(hj„hžhhŸNh Nubhú)”}”(hŒ``isolcpus=managed_irq``”h]”hŒisolcpus=managed_irq”…””}”(hjŒhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hùhj„ubhŒ.”…””}”(hj„hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K'hj€ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjhžhhŸh¶h Nubj)”}”(hŒÑHK_TYPE_DOMAIN_BOOT matches the work moved away by scheduler domain isolation performed through ``isolcpus=domain`` only. It is similar to HK_TYPE_DOMAIN except it ignores the isolation performed by cpusets. ”h]”h¸)”}”(hŒÏHK_TYPE_DOMAIN_BOOT matches the work moved away by scheduler domain isolation performed through ``isolcpus=domain`` only. It is similar to HK_TYPE_DOMAIN except it ignores the isolation performed by cpusets.”h]”(hŒ`HK_TYPE_DOMAIN_BOOT matches the work moved away by scheduler domain isolation performed through ”…””}”(hj®hžhhŸNh Nubhú)”}”(hŒ``isolcpus=domain``”h]”hŒisolcpus=domain”…””}”(hj¶hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hùhj®ubhŒ\ only. It is similar to HK_TYPE_DOMAIN except it ignores the isolation performed by cpusets.”…””}”(hj®hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K*hjªubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjhžhhŸh¶h Nubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ.”uh1jhh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒHousekeeping cpumasks”h]”hŒHousekeeping cpumasks”…””}”(hjâhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjßhžhhŸh¶h K1ubh¸)”}”(hŒ¦Housekeeping cpumasks include the CPUs that can execute the work moved away by the matching isolation feature. These cpumasks are returned by the following function::”h]”hŒ¥Housekeeping cpumasks include the CPUs that can execute the work moved away by the matching isolation feature. These cpumasks are returned by the following function:”…””}”(hjðhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K3hjßhžhubhŒ literal_block”“”)”}”(hŒ=const struct cpumask *housekeeping_cpumask(enum hk_type type)”h]”hŒ=const struct cpumask *housekeeping_cpumask(enum hk_type type)”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jþhŸh¶h K7hjßhžhubh¸)”}”(hŒ¬By default, if neither ``nohz_full=``, nor ``isolcpus``, nor cpuset's isolated partitions are used, which covers most usecases, this function returns the cpu_possible_mask.”h]”(hŒBy default, if neither ”…””}”(hjhžhhŸNh Nubhú)”}”(hŒ``nohz_full=``”h]”hŒ nohz_full=”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hùhjubhŒ, nor ”…””}”(hjhžhhŸNh Nubhú)”}”(hŒ ``isolcpus``”h]”hŒisolcpus”…””}”(hj*hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hùhjubhŒw, nor cpuset’s isolated partitions are used, which covers most usecases, this function returns the cpu_possible_mask.”…””}”(hjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K9hjßhžhubh¸)”}”(hŒ\Otherwise the function returns the cpumask complement of the isolation feature. For example:”h]”hŒ\Otherwise the function returns the cpumask complement of the isolation feature. For example:”…””}”(hjBhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K=hjßhžhubh¸)”}”(hŒYWith isolcpus=domain,7 the following will return a mask with all possible CPUs except 7::”h]”hŒXWith isolcpus=domain,7 the following will return a mask with all possible CPUs except 7:”…””}”(hjPhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K@hjßhžhubjÿ)”}”(hŒ$housekeeping_cpumask(HK_TYPE_DOMAIN)”h]”hŒ$housekeeping_cpumask(HK_TYPE_DOMAIN)”…””}”hj^sbah}”(h]”h ]”h"]”h$]”h&]”jjuh1jþhŸh¶h KChjßhžhubh¸)”}”(hŒaSimilarly with nohz_full=5,6 the following will return a mask with all possible CPUs except 5,6::”h]”hŒ`Similarly with nohz_full=5,6 the following will return a mask with all possible CPUs except 5,6:”…””}”(hjlhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KEhjßhžhubjÿ)”}”(hŒ*housekeeping_cpumask(HK_TYPE_KERNEL_NOISE)”h]”hŒ*housekeeping_cpumask(HK_TYPE_KERNEL_NOISE)”…””}”hjzsbah}”(h]”h ]”h"]”h$]”h&]”jjuh1jþhŸh¶h KHhjßhžhubeh}”(h]”Œhousekeeping-cpumasks”ah ]”h"]”Œhousekeeping cpumasks”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K1ubh¢)”}”(hhh]”(h§)”}”(hŒSynchronization against cpusets”h]”hŒSynchronization against cpusets”…””}”(hj“hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjhžhhŸh¶h KLubh¸)”}”(hŒvCpuset can modify the HK_TYPE_DOMAIN housekeeping cpumask while creating, modifying or deleting an isolated partition.”h]”hŒvCpuset can modify the HK_TYPE_DOMAIN housekeeping cpumask while creating, modifying or deleting an isolated partition.”…””}”(hj¡hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KNhjhžhubh¸)”}”(hŒzThe users of HK_TYPE_DOMAIN cpumask must then make sure to synchronize properly against cpuset in order to make sure that:”h]”hŒzThe users of HK_TYPE_DOMAIN cpumask must then make sure to synchronize properly against cpuset in order to make sure that:”…””}”(hj¯hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KQhjhžhubj)”}”(hhh]”(j)”}”(hŒ%The cpumask snapshot stays coherent. ”h]”h¸)”}”(hŒ$The cpumask snapshot stays coherent.”h]”hŒ$The cpumask snapshot stays coherent.”…””}”(hjÄhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KThjÀubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj½hžhhŸh¶h Nubj)”}”(hŒ=No housekeeping work is queued on a newly made isolated CPU. ”h]”h¸)”}”(hŒ