€•WfŒ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/virt/kvm/halt-polling”Œ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/virt/kvm/halt-polling”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/it_IT/virt/kvm/halt-polling”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/ja_JP/virt/kvm/halt-polling”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/ko_KR/virt/kvm/halt-polling”Œ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/virt/kvm/halt-polling”Œ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/virt/kvm/halt-polling”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒC/var/lib/git/docbuild/linux/Documentation/virt/kvm/halt-polling.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒThe KVM halt polling system”h]”hŒThe KVM halt polling system”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)”}”(hXÕThe KVM halt polling system provides a feature within KVM whereby the latency of a guest can, under some circumstances, be reduced by polling in the host for some time period after the guest has elected to no longer run by cedeing. That is, when a guest vcpu has ceded, or in the case of powerpc when all of the vcpus of a single vcore have ceded, the host kernel polls for wakeup conditions before giving up the cpu to the scheduler in order to let something else run.”h]”hXÕThe KVM halt polling system provides a feature within KVM whereby the latency of a guest can, under some circumstances, be reduced by polling in the host for some time period after the guest has elected to no longer run by cedeing. That is, when a guest vcpu has ceded, or in the case of powerpc when all of the vcpus of a single vcore have ceded, the host kernel polls for wakeup conditions before giving up the cpu to the scheduler in order to let something else run.”…””}”(hhßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´KhhÊh²hubhŞ)”}”(hXMPolling provides a latency advantage in cases where the guest can be run again very quickly by at least saving us a trip through the scheduler, normally on the order of a few micro-seconds, although performance benefits are workload dependent. In the event that no wakeup source arrives during the polling interval or some other task on the runqueue is runnable the scheduler is invoked. Thus halt polling is especially useful on workloads with very short wakeup periods where the time spent halt polling is minimised and the time savings of not invoking the scheduler are distinguishable.”h]”hXMPolling provides a latency advantage in cases where the guest can be run again very quickly by at least saving us a trip through the scheduler, normally on the order of a few micro-seconds, although performance benefits are workload dependent. In the event that no wakeup source arrives during the polling interval or some other task on the runqueue is runnable the scheduler is invoked. Thus halt polling is especially useful on workloads with very short wakeup periods where the time spent halt polling is minimised and the time savings of not invoking the scheduler are distinguishable.”…””}”(hhíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´KhhÊh²hubhŞ)”}”(hŒ0The generic halt polling code is implemented in:”h]”hŒ0The generic halt polling code is implemented in:”…””}”(hhûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´KhhÊh²hubhŒ block_quote”“”)”}”(hŒ&virt/kvm/kvm_main.c: kvm_vcpu_block() ”h]”hŞ)”}”(hŒ%virt/kvm/kvm_main.c: kvm_vcpu_block()”h]”hŒ%virt/kvm/kvm_main.c: kvm_vcpu_block()”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´Khj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´KhhÊh²hubhŞ)”}”(hŒ3The powerpc kvm-hv specific case is implemented in:”h]”hŒ3The powerpc kvm-hv specific case is implemented in:”…””}”(hj#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´KhhÊh²hubj )”}”(hŒ5arch/powerpc/kvm/book3s_hv.c: kvmppc_vcore_blocked() ”h]”hŞ)”}”(hŒ4arch/powerpc/kvm/book3s_hv.c: kvmppc_vcore_blocked()”h]”hŒ4arch/powerpc/kvm/book3s_hv.c: kvmppc_vcore_blocked()”…””}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´Khj1ubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´KhhÊh²hubhÉ)”}”(hhh]”(hÎ)”}”(hŒHalt Polling Interval”h]”hŒHalt Polling Interval”…””}”(hjLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjIh²hh³hÇh´K ubhŞ)”}”(hXThe maximum time for which to poll before invoking the scheduler, referred to as the halt polling interval, is increased and decreased based on the perceived effectiveness of the polling in an attempt to limit pointless polling. This value is stored in either the vcpu struct:”h]”hXThe maximum time for which to poll before invoking the scheduler, referred to as the halt polling interval, is increased and decreased based on the perceived effectiveness of the polling in an attempt to limit pointless polling. This value is stored in either the vcpu struct:”…””}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´K"hjIh²hubj )”}”(hŒkvm_vcpu->halt_poll_ns ”h]”hŞ)”}”(hŒkvm_vcpu->halt_poll_ns”h]”hŒkvm_vcpu->halt_poll_ns”…””}”(hjlh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´K'hjhubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´K'hjIh²hubhŞ)”}”(hŒ6or in the case of powerpc kvm-hv, in the vcore struct:”h]”hŒ6or in the case of powerpc kvm-hv, in the vcore struct:”…””}”(hj€h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´K)hjIh²hubj )”}”(hŒkvmppc_vcore->halt_poll_ns ”h]”hŞ)”}”(hŒkvmppc_vcore->halt_poll_ns”h]”hŒkvmppc_vcore->halt_poll_ns”…””}”(hj’h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´K+hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´K+hjIh²hubhŞ)”}”(hŒ)Thus this is a per vcpu (or vcore) value.”h]”hŒ)Thus this is a per vcpu (or vcore) value.”…””}”(hj¦h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´K-hjIh²hubhŞ)”}”(hXºDuring polling if a wakeup source is received within the halt polling interval, the interval is left unchanged. In the event that a wakeup source isn't received during the polling interval (and thus schedule is invoked) there are two options, either the polling interval and total block time[0] were less than the global max polling interval (see module params below), or the total block time was greater than the global max polling interval.”h]”hX¼During polling if a wakeup source is received within the halt polling interval, the interval is left unchanged. In the event that a wakeup source isn’t received during the polling interval (and thus schedule is invoked) there are two options, either the polling interval and total block time[0] were less than the global max polling interval (see module params below), or the total block time was greater than the global max polling interval.”…””}”(hj´h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´K/hjIh²hubhŞ)”}”(hXİIn the event that both the polling interval and total block time were less than the global max polling interval then the polling interval can be increased in the hope that next time during the longer polling interval the wake up source will be received while the host is polling and the latency benefits will be received. The polling interval is grown in the function grow_halt_poll_ns() and is multiplied by the module parameters halt_poll_ns_grow and halt_poll_ns_grow_start.”h]”hXİIn the event that both the polling interval and total block time were less than the global max polling interval then the polling interval can be increased in the hope that next time during the longer polling interval the wake up source will be received while the host is polling and the latency benefits will be received. The polling interval is grown in the function grow_halt_poll_ns() and is multiplied by the module parameters halt_poll_ns_grow and halt_poll_ns_grow_start.”…””}”(hjÂh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´K6hjIh²hubhŞ)”}”(hX³In the event that the total block time was greater than the global max polling interval then the host will never poll for long enough (limited by the global max) to wakeup during the polling interval so it may as well be shrunk in order to avoid pointless polling. The polling interval is shrunk in the function shrink_halt_poll_ns() and is divided by the module parameter halt_poll_ns_shrink, or set to 0 iff halt_poll_ns_shrink == 0.”h]”hX³In the event that the total block time was greater than the global max polling interval then the host will never poll for long enough (limited by the global max) to wakeup during the polling interval so it may as well be shrunk in order to avoid pointless polling. The polling interval is shrunk in the function shrink_halt_poll_ns() and is divided by the module parameter halt_poll_ns_shrink, or set to 0 iff halt_poll_ns_shrink == 0.”…””}”(hjĞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´K>hjIh²hubhŞ)”}”(hX It is worth noting that this adjustment process attempts to hone in on some steady state polling interval but will only really do a good job for wakeups which come at an approximately constant rate, otherwise there will be constant adjustment of the polling interval.”h]”hX It is worth noting that this adjustment process attempts to hone in on some steady state polling interval but will only really do a good job for wakeups which come at an approximately constant rate, otherwise there will be constant adjustment of the polling interval.”…””}”(hjŞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´KEhjIh²hubhŒdefinition_list”“”)”}”(hhh]”hŒdefinition_list_item”“”)”}”(hŒ·[0] total block time: the time between when the halt polling function is invoked and a wakeup source received (irrespective of whether the scheduler is invoked within that function). ”h]”(hŒterm”“”)”}”(hŒ[0] total block time:”h]”hŒ[0] total block time:”…””}”(hjùh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j÷h³hÇh´KMhjóubhŒ definition”“”)”}”(hhh]”hŞ)”}”(hŒ the time between when the halt polling function is invoked and a wakeup source received (irrespective of whether the scheduler is invoked within that function).”h]”hŒ the time between when the halt polling function is invoked and a wakeup source received (irrespective of whether the scheduler is invoked within that function).”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´KKhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjóubeh}”(h]”h ]”h"]”h$]”h&]”uh1jñh³hÇh´KMhjîubah}”(h]”h ]”h"]”h$]”h&]”uh1jìhjIh²hh³hÇh´Nubeh}”(h]”Œhalt-polling-interval”ah ]”h"]”Œhalt polling interval”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K ubhÉ)”}”(hhh]”(hÎ)”}”(hŒModule Parameters”h]”hŒModule Parameters”…””}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj4h²hh³hÇh´KPubhŞ)”}”(hXbThe kvm module has 4 tunable module parameters to adjust the global max polling interval, the initial value (to grow from 0), and the rate at which the polling interval is grown and shrunk. These variables are defined in include/linux/kvm_host.h and as module parameters in virt/kvm/kvm_main.c, or arch/powerpc/kvm/book3s_hv.c in the powerpc kvm-hv case.”h]”hXbThe kvm module has 4 tunable module parameters to adjust the global max polling interval, the initial value (to grow from 0), and the rate at which the polling interval is grown and shrunk. These variables are defined in include/linux/kvm_host.h and as module parameters in virt/kvm/kvm_main.c, or arch/powerpc/kvm/book3s_hv.c in the powerpc kvm-hv case.”…””}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´KRhj4h²hubhŒtable”“”)”}”(hhh]”hŒtgroup”“”)”}”(hhh]”(hŒcolspec”“”)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j]hjZubj^)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j]hjZubj^)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j]hjZubhŒtbody”“”)”}”(hhh]”(hŒrow”“”)”}”(hhh]”(hŒentry”“”)”}”(hhh]”hŞ)”}”(hŒModule Parameter”h]”hŒModule Parameter”…””}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´KYhj‰ubah}”(h]”h ]”h"]”h$]”h&]”uh1j‡hj„ubjˆ)”}”(hhh]”hŞ)”}”(hŒ Description”h]”hŒ Description”…””}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´KYhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j‡hj„ubjˆ)”}”(hhh]”hŞ)”}”(hŒ Default Value”h]”hŒ Default Value”…””}”(hjºh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´KYhj·ubah}”(h]”h ]”h"]”h$]”h&]”uh1j‡hj„ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j‚hjubjƒ)”}”(hhh]”(jˆ)”}”(hhh]”hŞ)”}”(hŒ halt_poll_ns”h]”hŒ halt_poll_ns”…””}”(hjÚh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´K[hj×ubah}”(h]”h ]”h"]”h$]”h&]”uh1j‡hjÔubjˆ)”}”(hhh]”hŞ)”}”(hŒfThe global max polling interval which defines the ceiling value of the polling interval for each vcpu.”h]”hŒfThe global max polling interval which defines the ceiling value of the polling interval for each vcpu.”…””}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´K[hjîubah}”(h]”h ]”h"]”h$]”h&]”uh1j‡hjÔubjˆ)”}”(hhh]”(hŞ)”}”(hŒKVM_HALT_POLL_NS_DEFAULT”h]”hŒKVM_HALT_POLL_NS_DEFAULT”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´K[hjubhŞ)”}”(hŒ(per arch value)”h]”hŒ(per arch value)”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´K^hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j‡hjÔubeh}”(h]”h ]”h"]”h$]”h&]”uh1j‚hjubjƒ)”}”(hhh]”(jˆ)”}”(hhh]”hŞ)”}”(hŒhalt_poll_ns_grow”h]”hŒhalt_poll_ns_grow”…””}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´Kahj3ubah}”(h]”h ]”h"]”h$]”h&]”uh1j‡hj0ubjˆ)”}”(hhh]”hŞ)”}”(hŒ_The value by which the halt polling interval is multiplied in the grow_halt_poll_ns() function.”h]”hŒ_The value by which the halt polling interval is multiplied in the grow_halt_poll_ns() function.”…””}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´KahjJubah}”(h]”h ]”h"]”h$]”h&]”uh1j‡hj0ubjˆ)”}”(hhh]”hŞ)”}”(hŒ2”h]”hŒ2”…””}”(hjdh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´Kahjaubah}”(h]”h ]”h"]”h$]”h&]”uh1j‡hj0ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j‚hjubjƒ)”}”(hhh]”(jˆ)”}”(hhh]”hŞ)”}”(hŒhalt_poll_ns_grow_start”h]”hŒhalt_poll_ns_grow_start”…””}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´Kghjubah}”(h]”h ]”h"]”h$]”h&]”uh1j‡hj~ubjˆ)”}”(hhh]”hŞ)”}”(hŒKThe initial value to grow to from zero in the grow_halt_poll_ns() function.”h]”hŒKThe initial value to grow to from zero in the grow_halt_poll_ns() function.”…””}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´Kghj˜ubah}”(h]”h ]”h"]”h$]”h&]”uh1j‡hj~ubjˆ)”}”(hhh]”hŞ)”}”(hŒ10000”h]”hŒ10000”…””}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´Kghj¯ubah}”(h]”h ]”h"]”h$]”h&]”uh1j‡hj~ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j‚hjubjƒ)”}”(hhh]”(jˆ)”}”(hhh]”hŞ)”}”(hŒhalt_poll_ns_shrink”h]”hŒhalt_poll_ns_shrink”…””}”(hjÒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´KlhjÏubah}”(h]”h ]”h"]”h$]”h&]”uh1j‡hjÌubjˆ)”}”(hhh]”hŞ)”}”(hŒ^The value by which the halt polling interval is divided in the shrink_halt_poll_ns() function.”h]”hŒ^The value by which the halt polling interval is divided in the shrink_halt_poll_ns() function.”…””}”(hjéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´Klhjæubah}”(h]”h ]”h"]”h$]”h&]”uh1j‡hjÌubjˆ)”}”(hhh]”hŞ)”}”(hjfh]”hŒ2”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´Klhjıubah}”(h]”h ]”h"]”h$]”h&]”uh1j‡hjÌubeh}”(h]”h ]”h"]”h$]”h&]”uh1j‚hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hjZubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1jXhjUubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj4h²hh³hÇh´NubhŞ)”}”(hŒ;These module parameters can be set from the sysfs files in:”h]”hŒ;These module parameters can be set from the sysfs files in:”…””}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´Kshj4h²hubj )”}”(hŒ/sys/module/kvm/parameters/ ”h]”hŞ)”}”(hŒ/sys/module/kvm/parameters/”h]”hŒ/sys/module/kvm/parameters/”…””}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´Kuhj:ubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´Kuhj4h²hubjí)”}”(hhh]”jò)”}”(hŒeNote: these module parameters are system-wide values and are not able to be tuned on a per vm basis. ”h]”(jø)”}”(hŒHNote: these module parameters are system-wide values and are not able to”h]”hŒHNote: these module parameters are system-wide values and are not able to”…””}”(hjYh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j÷h³hÇh´KxhjUubj)”}”(hhh]”hŞ)”}”(hŒbe tuned on a per vm basis.”h]”hŒbe tuned on a per vm basis.”…””}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´Kxhjgubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjUubeh}”(h]”h ]”h"]”h$]”h&]”uh1jñh³hÇh´KxhjRubah}”(h]”h ]”h"]”h$]”h&]”uh1jìhj4h²hh³hÇh´NubhŞ)”}”(hŒ²Any changes to these parameters will be picked up by new and existing vCPUs the next time they halt, with the notable exception of VMs using KVM_CAP_HALT_POLL (see next section).”h]”hŒ²Any changes to these parameters will be picked up by new and existing vCPUs the next time they halt, with the notable exception of VMs using KVM_CAP_HALT_POLL (see next section).”…””}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´Kzhj4h²hubeh}”(h]”Œmodule-parameters”ah ]”h"]”Œmodule parameters”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KPubhÉ)”}”(hhh]”(hÎ)”}”(hŒKVM_CAP_HALT_POLL”h]”hŒKVM_CAP_HALT_POLL”…””}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj h²hh³hÇh´KubhŞ)”}”(hŒ÷KVM_CAP_HALT_POLL is a VM capability that allows userspace to override halt_poll_ns on a per-VM basis. VMs using KVM_CAP_HALT_POLL ignore halt_poll_ns completely (but still obey halt_poll_ns_grow, halt_poll_ns_grow_start, and halt_poll_ns_shrink).”h]”hŒ÷KVM_CAP_HALT_POLL is a VM capability that allows userspace to override halt_poll_ns on a per-VM basis. VMs using KVM_CAP_HALT_POLL ignore halt_poll_ns completely (but still obey halt_poll_ns_grow, halt_poll_ns_grow_start, and halt_poll_ns_shrink).”…””}”(hj±h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´Khj h²hubhŞ)”}”(hŒKSee Documentation/virt/kvm/api.rst for more information on this capability.”h]”hŒKSee Documentation/virt/kvm/api.rst for more information on this capability.”…””}”(hj¿h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´K…hj h²hubeh}”(h]”Œkvm-cap-halt-poll”ah ]”h"]”Œkvm_cap_halt_poll”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒ Further Notes”h]”hŒ Further Notes”…””}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÕh²hh³hÇh´KˆubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hXãCare should be taken when setting the halt_poll_ns module parameter as a large value has the potential to drive the cpu usage to 100% on a machine which would be almost entirely idle otherwise. This is because even if a guest has wakeups during which very little work is done and which are quite far apart, if the period is shorter than the global max polling interval (halt_poll_ns) then the host will always poll for the entire block time and thus cpu utilisation will go to 100%. ”h]”hŞ)”}”(hXâCare should be taken when setting the halt_poll_ns module parameter as a large value has the potential to drive the cpu usage to 100% on a machine which would be almost entirely idle otherwise. This is because even if a guest has wakeups during which very little work is done and which are quite far apart, if the period is shorter than the global max polling interval (halt_poll_ns) then the host will always poll for the entire block time and thus cpu utilisation will go to 100%.”h]”hXâCare should be taken when setting the halt_poll_ns module parameter as a large value has the potential to drive the cpu usage to 100% on a machine which would be almost entirely idle otherwise. This is because even if a guest has wakeups during which very little work is done and which are quite far apart, if the period is shorter than the global max polling interval (halt_poll_ns) then the host will always poll for the entire block time and thus cpu utilisation will go to 100%.”…””}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´KŠhjíubah}”(h]”h ]”h"]”h$]”h&]”uh1jëhjèh²hh³hÇh´Nubjì)”}”(hX Halt polling essentially presents a trade-off between power usage and latency and the module parameters should be used to tune the affinity for this. Idle cpu time is essentially converted to host kernel time with the aim of decreasing latency when entering the guest. ”h]”hŞ)”}”(hX Halt polling essentially presents a trade-off between power usage and latency and the module parameters should be used to tune the affinity for this. Idle cpu time is essentially converted to host kernel time with the aim of decreasing latency when entering the guest.”h]”hX Halt polling essentially presents a trade-off between power usage and latency and the module parameters should be used to tune the affinity for this. Idle cpu time is essentially converted to host kernel time with the aim of decreasing latency when entering the guest.”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´K‘hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jëhjèh²hh³hÇh´Nubjì)”}”(hXHalt polling will only be conducted by the host when no other tasks are runnable on that cpu, otherwise the polling will cease immediately and schedule will be invoked to allow that other task to run. Thus this doesn't allow a guest to cause denial of service of the cpu.”h]”hŞ)”}”(hXHalt polling will only be conducted by the host when no other tasks are runnable on that cpu, otherwise the polling will cease immediately and schedule will be invoked to allow that other task to run. Thus this doesn't allow a guest to cause denial of service of the cpu.”h]”hXHalt polling will only be conducted by the host when no other tasks are runnable on that cpu, otherwise the polling will cease immediately and schedule will be invoked to allow that other task to run. Thus this doesn’t allow a guest to cause denial of service of the cpu.”…””}”(hj!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hİh³hÇh´K–hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jëhjèh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jæh³hÇh´KŠhjÕh²hubeh}”(h]”Œ further-notes”ah ]”h"]”Œ further notes”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´Kˆubeh}”(h]”Œthe-kvm-halt-polling-system”ah ]”h"]”Œthe kvm halt polling system”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”j‡Œ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”joŒ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Œfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œ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”‰Œ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”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jJjGj1j.jjšjÒjÏjBj?uŒ nametypes”}”(jJ‰j1‰j‰jÒ‰jB‰uh}”(jGhÊj.jIjšj4jÏj j?jÕuŒ 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”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.