Re: cputime takes cstate into consideration

2019-07-09 Thread Ankur Arora
On 7/9/19 5:38 AM, Peter Zijlstra wrote: On Mon, Jul 08, 2019 at 07:00:08PM -0700, Ankur Arora wrote: On 2019-06-26 12:23 p.m., Thomas Gleixner wrote: On Wed, 26 Jun 2019, Raslan, KarimAllah wrote: On Wed, 2019-06-26 at 10:54 -0400, Konrad Rzeszutek Wilk wrote: There were some ideas that Anku

Re: cputime takes cstate into consideration

2019-07-09 Thread Peter Zijlstra
On Mon, Jul 08, 2019 at 07:00:08PM -0700, Ankur Arora wrote: > On 2019-06-26 12:23 p.m., Thomas Gleixner wrote: > > On Wed, 26 Jun 2019, Raslan, KarimAllah wrote: > > > On Wed, 2019-06-26 at 10:54 -0400, Konrad Rzeszutek Wilk wrote: > > > > There were some ideas that Ankur (CC-ed) mentioned to me o

Re: cputime takes cstate into consideration

2019-07-08 Thread Wanpeng Li
also Cc Frederic, On Tue, 9 Jul 2019 at 10:00, Ankur Arora wrote: > > On 2019-06-26 12:23 p.m., Thomas Gleixner wrote: > > On Wed, 26 Jun 2019, Raslan, KarimAllah wrote: > >> On Wed, 2019-06-26 at 10:54 -0400, Konrad Rzeszutek Wilk wrote: > >>> There were some ideas that Ankur (CC-ed) mentioned to

Re: cputime takes cstate into consideration

2019-07-08 Thread Ankur Arora
On 2019-06-26 12:23 p.m., Thomas Gleixner wrote: On Wed, 26 Jun 2019, Raslan, KarimAllah wrote: On Wed, 2019-06-26 at 10:54 -0400, Konrad Rzeszutek Wilk wrote: There were some ideas that Ankur (CC-ed) mentioned to me of using the perf counters (in the host) to sample the guest and construct a b

Re: cputime takes cstate into consideration

2019-06-26 Thread Thomas Gleixner
On Wed, 26 Jun 2019, Peter Zijlstra wrote: > On Wed, Jun 26, 2019 at 07:27:35PM +, Raslan, KarimAllah wrote: > > On Wed, 2019-06-26 at 21:21 +0200, Peter Zijlstra wrote: > > > On Wed, Jun 26, 2019 at 06:55:36PM +, Raslan, KarimAllah wrote: > > > > > > > > > > > If the host is completely i

Re: cputime takes cstate into consideration

2019-06-26 Thread Peter Zijlstra
On Wed, Jun 26, 2019 at 07:27:35PM +, Raslan, KarimAllah wrote: > On Wed, 2019-06-26 at 21:21 +0200, Peter Zijlstra wrote: > > On Wed, Jun 26, 2019 at 06:55:36PM +, Raslan, KarimAllah wrote: > > > > > > > > If the host is completely in no_full_hz mode and the pCPU is dedicated to > > > a

Re: cputime takes cstate into consideration

2019-06-26 Thread Thomas Gleixner
On Wed, 26 Jun 2019, Raslan, KarimAllah wrote: > On Wed, 2019-06-26 at 21:21 +0200, Peter Zijlstra wrote: > > On Wed, Jun 26, 2019 at 06:55:36PM +, Raslan, KarimAllah wrote: > > > > > > > > If the host is completely in no_full_hz mode and the pCPU is dedicated to > > > a  > > > single vCPU/t

Re: cputime takes cstate into consideration

2019-06-26 Thread Thomas Gleixner
On Wed, 26 Jun 2019, Peter Zijlstra wrote: > On Wed, Jun 26, 2019 at 06:55:36PM +, Raslan, KarimAllah wrote: > > > If the host is completely in no_full_hz mode and the pCPU is dedicated to a  > > single vCPU/task (and the guest is 100% CPU bound and never exits), you > > would  > > still be

Re: cputime takes cstate into consideration

2019-06-26 Thread Raslan, KarimAllah
On Wed, 2019-06-26 at 21:21 +0200, Peter Zijlstra wrote: > On Wed, Jun 26, 2019 at 06:55:36PM +, Raslan, KarimAllah wrote: > > > > > If the host is completely in no_full_hz mode and the pCPU is dedicated to a  > > single vCPU/task (and the guest is 100% CPU bound and never exits), you > > wo

Re: cputime takes cstate into consideration

2019-06-26 Thread Thomas Gleixner
On Wed, 26 Jun 2019, Raslan, KarimAllah wrote: > On Wed, 2019-06-26 at 10:54 -0400, Konrad Rzeszutek Wilk wrote: > > There were some ideas that Ankur (CC-ed) mentioned to me of using the perf > > counters (in the host) to sample the guest and construct a better > > accounting idea of what the guest

Re: cputime takes cstate into consideration

2019-06-26 Thread Peter Zijlstra
On Wed, Jun 26, 2019 at 06:55:36PM +, Raslan, KarimAllah wrote: > If the host is completely in no_full_hz mode and the pCPU is dedicated to a  > single vCPU/task (and the guest is 100% CPU bound and never exits), you would  > still be ticking in the host once every second for housekeeping, rig

Re: cputime takes cstate into consideration

2019-06-26 Thread Thomas Gleixner
On Wed, 26 Jun 2019, Raslan, KarimAllah wrote: > On Wed, 2019-06-26 at 20:41 +0200, Thomas Gleixner wrote: > > The host doesn't know what the guest CPUs are doing. And if you have a full > > zero exit setup and the guest is computing stuff or doing that network > > offloading thing then they will n

Re: cputime takes cstate into consideration

2019-06-26 Thread Raslan, KarimAllah
On Wed, 2019-06-26 at 10:54 -0400, Konrad Rzeszutek Wilk wrote: > On Wed, Jun 26, 2019 at 12:33:30PM +0200, Thomas Gleixner wrote: > > > > On Wed, 26 Jun 2019, Wanpeng Li wrote: > > > > > > After exposing mwait/monitor into kvm guest, the guest can make > > > physical cpu enter deeper cstate thro

Re: cputime takes cstate into consideration

2019-06-26 Thread Raslan, KarimAllah
On Wed, 2019-06-26 at 20:41 +0200, Thomas Gleixner wrote: > On Wed, 26 Jun 2019, Konrad Rzeszutek Wilk wrote: > > > > On Wed, Jun 26, 2019 at 06:16:08PM +0200, Peter Zijlstra wrote: > > > > > > On Wed, Jun 26, 2019 at 10:54:13AM -0400, Konrad Rzeszutek Wilk wrote: > > > > > > > > There were some

Re: cputime takes cstate into consideration

2019-06-26 Thread Thomas Gleixner
On Wed, 26 Jun 2019, Konrad Rzeszutek Wilk wrote: > On Wed, Jun 26, 2019 at 06:16:08PM +0200, Peter Zijlstra wrote: > > On Wed, Jun 26, 2019 at 10:54:13AM -0400, Konrad Rzeszutek Wilk wrote: > > > There were some ideas that Ankur (CC-ed) mentioned to me of using the perf > > > counters (in the host

Re: cputime takes cstate into consideration

2019-06-26 Thread Konrad Rzeszutek Wilk
On Wed, Jun 26, 2019 at 06:16:08PM +0200, Peter Zijlstra wrote: > On Wed, Jun 26, 2019 at 10:54:13AM -0400, Konrad Rzeszutek Wilk wrote: > > On Wed, Jun 26, 2019 at 12:33:30PM +0200, Thomas Gleixner wrote: > > > On Wed, 26 Jun 2019, Wanpeng Li wrote: > > > > After exposing mwait/monitor into kvm gu

Re: cputime takes cstate into consideration

2019-06-26 Thread Peter Zijlstra
On Wed, Jun 26, 2019 at 10:54:13AM -0400, Konrad Rzeszutek Wilk wrote: > On Wed, Jun 26, 2019 at 12:33:30PM +0200, Thomas Gleixner wrote: > > On Wed, 26 Jun 2019, Wanpeng Li wrote: > > > After exposing mwait/monitor into kvm guest, the guest can make > > > physical cpu enter deeper cstate through m

Re: cputime takes cstate into consideration

2019-06-26 Thread Konrad Rzeszutek Wilk
On Wed, Jun 26, 2019 at 12:33:30PM +0200, Thomas Gleixner wrote: > On Wed, 26 Jun 2019, Wanpeng Li wrote: > > After exposing mwait/monitor into kvm guest, the guest can make > > physical cpu enter deeper cstate through mwait instruction, however, > > the top command on host still observe 100% cpu u

Re: cputime takes cstate into consideration

2019-06-26 Thread Thomas Gleixner
On Wed, 26 Jun 2019, Wanpeng Li wrote: > After exposing mwait/monitor into kvm guest, the guest can make > physical cpu enter deeper cstate through mwait instruction, however, > the top command on host still observe 100% cpu utilization since qemu > process is running even though guest who has the

Re: cputime takes cstate into consideration

2019-06-26 Thread Peter Zijlstra
On Wed, Jun 26, 2019 at 05:43:55PM +0800, Wanpeng Li wrote: > Hi all, > > After exposing mwait/monitor into kvm guest, the guest can make > physical cpu enter deeper cstate through mwait instruction, however, > the top command on host still observe 100% cpu utilization since qemu > process is runn