Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1673208
| From | Yang Zhang <yang.zhang.wz@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] x86/idle: use dynamic halt poll |
| Date | 2017-06-23 06:00 +0200 |
| Message-ID | <tVnVf-5pm-9@gated-at.bofh.it> (permalink) |
| References | <tV8tb-3Zd-3@gated-at.bofh.it> <tV8tb-3Zd-7@gated-at.bofh.it> <tV8We-4b0-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 2017/6/22 19:51, Paolo Bonzini wrote: > > > On 22/06/2017 13:22, root wrote: >> ============================================================== >> >> +poll_grow: (X86 only) >> + >> +This parameter is multiplied in the grow_poll_ns() to increase the poll time. >> +By default, the values is 2. >> + >> +============================================================== >> +poll_shrink: (X86 only) >> + >> +This parameter is divided in the shrink_poll_ns() to reduce the poll time. >> +By default, the values is 2. > > Even before starting the debate on whether this is a good idea or a bad > idea, KVM reduces the polling value to the minimum (10 us) by default I noticed it. It looks like the logic inside KVM is more reasonable. I will do more testing to compare the two. > when polling fails. Also, it shouldn't be bound to > CONFIG_HYPERVISOR_GUEST, since there's nothing specific to virtual > machines here. Yes. The original idea to use CONFIG_HYPERVISOR_GUEST because this mechanism will only helpful inside VM. But as Thomas mentioned on other thread it is wrong to use it since most distribution kernel will set it to yes and still affect the bare metal. I will integrate it with paravirtualizaion part as you suggested in below. > > Regarding the good/bad idea part, KVM's polling is made much more > acceptable by single_task_running(). At least you need to integrate it > with paravirtualization. If the VM is scheduled out, you shrink the > polling period. There is already vcpu_is_preempted for this, it is used > by mutexes. I have considered single_task_running() before. But since there is no such paravirtual interface currently and i am not sure whether it is a information leak from host if introducing such interface, so i didn't do it. Do you mean vcpu_is_preempted can do the same thing? I check the code and seems it only tells whether the VCPU is scheduled out or not which cannot satisfy the needs. > > Paolo > -- Yang Alibaba Cloud Computing
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] x86/idle: add halt poll support root <yang.zhang.wz@gmail.com> - 2017-06-22 13:30 +0200
[PATCH 1/2] x86/idle: add halt poll for halt idle root <yang.zhang.wz@gmail.com> - 2017-06-22 13:30 +0200
Re: [PATCH 1/2] x86/idle: add halt poll for halt idle Thomas Gleixner <tglx@linutronix.de> - 2017-06-22 16:30 +0200
Re: [PATCH 1/2] x86/idle: add halt poll for halt idle Yang Zhang <yang.zhang.wz@gmail.com> - 2017-06-23 06:10 +0200
[PATCH 2/2] x86/idle: use dynamic halt poll root <yang.zhang.wz@gmail.com> - 2017-06-22 13:30 +0200
Re: [PATCH 2/2] x86/idle: use dynamic halt poll Paolo Bonzini <pbonzini@redhat.com> - 2017-06-22 14:00 +0200
Re: [PATCH 2/2] x86/idle: use dynamic halt poll Yang Zhang <yang.zhang.wz@gmail.com> - 2017-06-23 06:00 +0200
Re: [PATCH 2/2] x86/idle: use dynamic halt poll Yang Zhang <yang.zhang.wz@gmail.com> - 2017-06-27 13:30 +0200
Re: [PATCH 2/2] x86/idle: use dynamic halt poll Paolo Bonzini <pbonzini@redhat.com> - 2017-06-27 14:10 +0200
Re: [PATCH 2/2] x86/idle: use dynamic halt poll Wanpeng Li <kernellwp@gmail.com> - 2017-06-27 14:30 +0200
Re: [PATCH 2/2] x86/idle: use dynamic halt poll Paolo Bonzini <pbonzini@redhat.com> - 2017-06-27 14:30 +0200
Re: [PATCH 2/2] x86/idle: use dynamic halt poll Radim Krčmář <rkrcmar@redhat.com> - 2017-06-27 15:50 +0200
Re: [PATCH 2/2] x86/idle: use dynamic halt poll Paolo Bonzini <pbonzini@redhat.com> - 2017-06-27 16:00 +0200
Re: [PATCH 2/2] x86/idle: use dynamic halt poll Paolo Bonzini <pbonzini@redhat.com> - 2017-06-27 16:30 +0200
Re: [PATCH 2/2] x86/idle: use dynamic halt poll Radim Krčmář <rkrcmar@redhat.com> - 2017-06-27 16:30 +0200
Re: [PATCH 2/2] x86/idle: use dynamic halt poll Yang Zhang <yang.zhang.wz@gmail.com> - 2017-07-03 11:30 +0200
Re: [PATCH 2/2] x86/idle: use dynamic halt poll Thomas Gleixner <tglx@linutronix.de> - 2017-07-03 12:10 +0200
Re: [PATCH 2/2] x86/idle: use dynamic halt poll Thomas Gleixner <tglx@linutronix.de> - 2017-06-22 16:40 +0200
Re: [PATCH 2/2] x86/idle: use dynamic halt poll Yang Zhang <yang.zhang.wz@gmail.com> - 2017-06-23 06:10 +0200
Re: [PATCH 2/2] x86/idle: use dynamic halt poll kbuild test robot <lkp@intel.com> - 2017-06-23 00:50 +0200
Re: [PATCH 0/2] x86/idle: add halt poll support Yang Zhang <yang.zhang.wz@gmail.com> - 2017-06-22 13:40 +0200
Re: [PATCH 0/2] x86/idle: add halt poll support Wanpeng Li <kernellwp@gmail.com> - 2017-06-22 14:00 +0200
Re: [PATCH 0/2] x86/idle: add halt poll support Yang Zhang <yang.zhang.wz@gmail.com> - 2017-06-23 06:10 +0200
Re: [PATCH 0/2] x86/idle: add halt poll support Wanpeng Li <kernellwp@gmail.com> - 2017-06-23 06:40 +0200
Re: [PATCH 0/2] x86/idle: add halt poll support Yang Zhang <yang.zhang.wz@gmail.com> - 2017-06-23 08:50 +0200
Re: [PATCH 0/2] x86/idle: add halt poll support Radim Krčmář <rkrcmar@redhat.com> - 2017-06-27 16:10 +0200
csiph-web