€•;GŒ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ŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/pt_BR/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 elaborate 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 elaborate 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 ”…””}”(hjh²hh³Nh´NubhŒliteral”“”)”}”(hŒ``enum hk_type type``”h]”hŒenum hk_type type”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjubhŒ:”…””}”(hjh²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 ”…””}”(hj2h²hh³Nh´Nubj)”}”(hŒ``isolcpus=domain``”h]”hŒisolcpus=domain”…””}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj2ubhŒ‚ boot parameter or isolated cpuset partitions in cgroup v2. This includes scheduler load balancing, unbound workqueues and timers.”…””}”(hj2h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khj.ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,hj)h²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 ”…””}”(hj\h²hh³Nh´Nubj)”}”(hŒ``nohz_full=``”h]”hŒ nohz_full=”…””}”(hjdh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj\ubhŒ or ”…””}”(hj\h²hh³Nh´Nubj)”}”(hŒ``isolcpus=nohz``”h]”hŒ isolcpus=nohz”…””}”(hjvh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj\ubhŒR boot parameters. This includes remote scheduler tick, vmstat and lockup watchdog.”…””}”(hj\h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K"hjXubah}”(h]”h ]”h"]”h$]”h&]”uh1j,hj)h²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´Nubj)”}”(hŒ``isolcpus=managed_irq``”h]”hŒisolcpus=managed_irq”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj˜ubhŒ.”…””}”(hj˜h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K'hj”ubah}”(h]”h ]”h"]”h$]”h&]”uh1j,hj)h²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´Nubj)”}”(hŒ``isolcpus=domain``”h]”hŒisolcpus=domain”…””}”(hjÊh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j 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&]”uh1j,hj)h²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ.”uh1j'hh·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:”…””}”(hjh²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”uh1jh³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 ”…””}”(hj$h²hh³Nh´Nubj)”}”(hŒ``nohz_full=``”h]”hŒ nohz_full=”…””}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj$ubhŒ, nor ”…””}”(hj$h²hh³Nh´Nubj)”}”(hŒ ``isolcpus``”h]”hŒisolcpus”…””}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj$ubhŒw, nor cpuset’s isolated partitions are used, which covers most usecases, this function returns the cpu_possible_mask.”…””}”(hj$h²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:”…””}”(hjVh²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:”…””}”(hjdh²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)”…””}”hjrsbah}”(h]”h ]”h"]”h$]”h&]”j"j#uh1jh³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:”…””}”(hj€h²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)”…””}”hjŽsbah}”(h]”h ]”h"]”h$]”h&]”j"j#uh1jh³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ºhj¤h²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´KNhj¤h²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´KQhj¤h²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&]”uh1j,hjÑh²hh³hÊh´Nubj-)”}”(hŒ=No housekeeping work is queued on a newly made isolated CPU. ”h]”hÌ)”}”(hŒ