lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 23 May 2016 18:16:54 -0700
From:	David Matlack <dmatlack@...gle.com>
To:	Yang Zhang <yang.zhang.wz@...il.com>
Cc:	Wanpeng Li <kernellwp@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	kvm list <kvm@...r.kernel.org>,
	Wanpeng Li <wanpeng.li@...mail.com>,
	Paolo Bonzini <pbonzini@...hat.com>,
	Radim Krčmář <rkrcmar@...hat.com>,
	Christian Borntraeger <borntraeger@...ibm.com>
Subject: Re: [PATCH v2] KVM: halt-polling: poll if emulated lapic timer will
 fire soon

On Mon, May 23, 2016 at 6:13 PM, Yang Zhang <yang.zhang.wz@...il.com> wrote:
> On 2016/5/24 2:04, David Matlack wrote:
>>
>> On Sun, May 22, 2016 at 6:26 PM, Yang Zhang <yang.zhang.wz@...il.com>
>> wrote:
>>>
>>> On 2016/5/21 2:37, David Matlack wrote:
>>>>
>>>>
>>>> It's not obvious to me why polling for a timer interrupt would improve
>>>> context switch latency. Can you explain a bit more?
>>>
>>>
>>>
>>> We have a workload which using high resolution timer(less than 1ms)
>>> inside
>>> guest. It rely on the timer to wakeup itself. Sometimes the timer is
>>> expected to fired just after the VCPU is blocked due to execute halt
>>> instruction. But the thread who is running in the CPU will turn off the
>>> hardware interrupt for long time due to disk access. This will cause the
>>> timer interrupt been blocked until the interrupt is re-open.
>>
>>
>> Does this happen on the idle thread (swapper)? If not, halt-polling
>> may not help; it only polls if there are no other runnable threads.
>
>
> Yes, there is no runnable task inside guest.

Sorry for the confusion, my question was about the host, not the
guest. Halt-polling only polls if there are no other runnable threads
on the host CPU (see the check for single_task_running() in
kvm_vcpu_block()).

>
>
>>
>>> For optimization, we let VCPU to poll for a while if the next timer will
>>> arrive soon before schedule out. And the result shows good when running
>>> several workloads inside guest.
>>
>>
>> Thanks for the explanation, I appreciate it.
>>
>>>
>>> --
>>> best regards
>>> yang
>
>
>
> --
> best regards
> yang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ