Re: [PATCH V3 RFC 2/2] kvm: Handle yield_to failure return code for potential undercommit case

2012-11-27 Thread Andrew Jones
On Tue, Nov 27, 2012 at 03:57:25PM +0530, Raghavendra K T wrote: > On 11/26/2012 07:13 PM, Andrew Jones wrote: > >On Mon, Nov 26, 2012 at 05:38:04PM +0530, Raghavendra K T wrote: > >>From: Raghavendra K T > >> > >>yield_to returns -ESRCH, When source and target

Re: [PATCH V3 RESEND RFC 1/2] sched: Bail out of yield_to when source and target runqueue has one task

2013-01-25 Thread Andrew Jones
; > > > > > Signed-off-by: Peter Zijlstra > > > Raghavendra, Checking the rq length of target vcpu condition > > > added.(thanks Avi) > > > Reviewed-by: Srikar Dronamraju > > > Signed-off-by: Raghavendra K T > > > Acked-by: Andrew Jones > &

[PATCH] xen: netback: remove redundant xenvif_put

2013-02-18 Thread Andrew Jones
netbk_fatal_tx_err() calls xenvif_carrier_off(), which does a xenvif_put(). As callers of netbk_fatal_tx_err should only have one reference to the vif at this time, then the xenvif_put in netbk_fatal_tx_err is one too many. Signed-off-by: Andrew Jones --- drivers/net/xen-netback/netback.c | 1

Re: [Xen-devel] [PATCH] xen: netback: remove redundant xenvif_put

2013-02-19 Thread Andrew Jones
On Tue, 19 Feb 2013 08:03:49 + "Jan Beulich" wrote: > >>> On 19.02.13 at 06:53, David Miller wrote: > > From: Andrew Jones > > Date: Mon, 18 Feb 2013 21:29:20 +0100 > > > >> netbk_fatal_tx_err() calls xenvif_carrier_off(), which does >

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-27 Thread Andrew Jones
On Mon, Aug 27, 2012 at 01:34:36PM -0600, David Ahern wrote: > On 8/27/12 9:53 AM, Andrew Jones wrote: > >On Mon, Aug 27, 2012 at 05:51:46PM +0800, Dong Hao wrote: > > > > > > > >>+struct event_stats { > >>+ u64 count; > >>+

perf script: rwtop: SIGALRM and pipe read race

2012-09-14 Thread Andrew Jones
I recently tried 'perf script rwtop', and it immediately failed with 'failed to read event header'. Running it through strace I found that the when rwtop.pl is reading from the pipe, and gets one of it's alarms, that the ERESTARTSYS seems to confuse it - causing it to fail. It also appears that th

Re: [RFC][PATCH] Improving directed yield scalability for PLE handler

2012-09-14 Thread Andrew Jones
On Thu, Sep 13, 2012 at 04:30:58PM -0500, Andrew Theurer wrote: > On Thu, 2012-09-13 at 17:18 +0530, Raghavendra K T wrote: > > * Andrew Theurer [2012-09-11 13:27:41]: > > > > > On Tue, 2012-09-11 at 11:38 +0530, Raghavendra K T wrote: > > > > On 09/11/2012 01:42 AM, Andrew Theurer wrote: > > > >

Re: perf script: rwtop: SIGALRM and pipe read race

2012-09-14 Thread Andrew Jones
On Fri, Sep 14, 2012 at 10:05:03AM -0600, David Ahern wrote: > On 9/14/12 9:39 AM, Andrew Jones wrote: > > > >I recently tried 'perf script rwtop', and it immediately failed with > >'failed to read event header'. Running it through strace I found that the

Re: perf: header: Regression

2012-10-23 Thread Andrew Jones
On Tue, Oct 23, 2012 at 11:07:07AM +0900, Namhyung Kim wrote: > Hi Andrew, > > On Mon, 22 Oct 2012 15:11:42 +0200, Andrew Jones wrote: > > The patch series that contains 7e94cfcc9d20 regresses the > > header output. Below is a diff of info from before and > > after the

Re: [PATCH 1/2] perf header: Fix numa topology printing

2012-10-23 Thread Andrew Jones
str += strlen(str) + 1; > } > return; > error: > -- > 1.7.9.2 > works for me Tested-by: Andrew Jones -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 1/2] perf header: Fix numa topology printing

2012-10-24 Thread Andrew Jones
On Wed, Oct 24, 2012 at 04:00:08PM +0900, Namhyung Kim wrote: > Hi Andrew, > > On Tue, 23 Oct 2012 16:12:19 +0200, Andrew Jones wrote: > > On Tue, Oct 23, 2012 at 10:44:49PM +0900, Namhyung Kim wrote: > >> Andrew reported that the commit 7e94cfcc9d20 ("perf header: Us

Re: [PATCH 2/2] perf tools: Fix strbuf_addf() when the buffer needs to grow

2012-10-24 Thread Andrew Jones
gt;len, sb->alloc - sb->len, fmt, > ap); > va_end(ap); > if (len > strbuf_avail(sb)) { > - die("this should not happen, your snprintf is broken"); > + die("this should not happen, your vsnpri

Re: [PATCH RFC 0/2] kvm: Improving undercommit,overcommit scenarios in PLE handler

2012-09-26 Thread Andrew Jones
On Mon, Sep 24, 2012 at 02:36:05PM +0200, Peter Zijlstra wrote: > On Mon, 2012-09-24 at 17:22 +0530, Raghavendra K T wrote: > > On 09/24/2012 05:04 PM, Peter Zijlstra wrote: > > > On Fri, 2012-09-21 at 17:29 +0530, Raghavendra K T wrote: > > >> In some special scenarios like #vcpu<= #pcpu, PLE hand

Re: [PATCH RFC 0/2] kvm: Improving undercommit,overcommit scenarios in PLE handler

2012-09-26 Thread Andrew Jones
On Mon, Sep 24, 2012 at 06:20:12PM +0200, Avi Kivity wrote: > On 09/24/2012 06:03 PM, Peter Zijlstra wrote: > > On Mon, 2012-09-24 at 17:51 +0200, Avi Kivity wrote: > >> On 09/24/2012 03:54 PM, Peter Zijlstra wrote: > >> > On Mon, 2012-09-24 at 18:59 +0530, Raghavendra K T wrote: > >> >> However Ri

Re: [PATCH RFC 0/2] kvm: Improving undercommit,overcommit scenarios in PLE handler

2012-09-26 Thread Andrew Jones
On Wed, Sep 26, 2012 at 03:26:11PM +0200, Peter Zijlstra wrote: > On Wed, 2012-09-26 at 15:20 +0200, Andrew Jones wrote: > > Wouldn't a clean solution be to promote a task's scheduler > > class to the spinner class when we PLE (or come from some special > > sysc

Re: [PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-29 Thread Andrew Jones
On Tue, Oct 30, 2012 at 11:27:52AM +0530, Raghavendra K T wrote: > On 10/29/2012 11:24 PM, Peter Zijlstra wrote: > >On Mon, 2012-10-29 at 19:37 +0530, Raghavendra K T wrote: > >>+/* > >>+ * A load of 2048 corresponds to 1:1 overcommit > >>+ * undercommit threshold is half the 1:1 overcommit > >>+ *

Re: [PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-30 Thread Andrew Jones
On Tue, Oct 30, 2012 at 01:01:54PM +0530, Raghavendra K T wrote: > On 10/30/2012 12:04 PM, Andrew Jones wrote: > >On Tue, Oct 30, 2012 at 11:27:52AM +0530, Raghavendra K T wrote: > >>On 10/29/2012 11:24 PM, Peter Zijlstra wrote: > >>>On Mon, 2012-10-29 at 19:3

[PATCH 1/3] arm: kvm: clamp NR_VCPUS to MAX_VCPUS

2013-09-14 Thread Andrew Jones
Signed-off-by: Andrew Jones --- arch/arm/kvm/arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 741f66a2edbd7..9ebf8ac3a12ff 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -201,7 +201,7 @@ int

[PATCH 3/3] aarch64: kvm: introduce CONFIG_KVM_MAX_VCPUS

2013-09-14 Thread Andrew Jones
Take CONFIG_KVM_MAX_VCPUS from arm32, but set the default to 8. Signed-off-by: Andrew Jones --- arch/arm64/include/asm/kvm_host.h | 7 ++- arch/arm64/kvm/Kconfig| 11 +++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/kvm_host.h b

[PATCH 0/3] KVM_MAX_VCPUS related changes

2013-09-14 Thread Andrew Jones
Andrew Jones (3): arm: kvm: clamp NR_VCPUS to MAX_VCPUS arm32: kvm: rename CONFIG_KVM_ARM_MAX_VCPUS aarch64: kvm: introduce CONFIG_KVM_MAX_VCPUS arch/arm/include/asm/kvm_host.h | 4 ++-- arch/arm/kvm/Kconfig | 8 arch/arm/kvm/arm.c| 2 +- arch

[PATCH 2/3] arm32: kvm: rename CONFIG_KVM_ARM_MAX_VCPUS

2013-09-14 Thread Andrew Jones
Drop the _ARM_ part of the name. We can then introduce a config option like this to aarch64 and other arches using the same name - allowing grep to show them all. Also update the help text to describe the option more completely. Signed-off-by: Andrew Jones --- arch/arm/include/asm/kvm_host.h

[PATCH] [RFC] x86: kvm: remove KVM_SOFT_MAX_VCPUS

2013-09-14 Thread Andrew Jones
s (160). I can't think of anything other than generating more warnings[1] from qemu with guests that configure more vcpus than pcpus though. [1] Actually, until 972fc544b6034a in uq/master is merged there won't be any warnings either. Signed-off-by: Andrew Jones --- arch/x86/includ

[PATCH] x86: kvm: introduce CONFIG_KVM_MAX_VCPUS

2013-09-14 Thread Andrew Jones
Take CONFIG_KVM_MAX_VCPUS from arm32, but set the default to 255. Signed-off-by: Andrew Jones --- arch/x86/include/asm/kvm_host.h | 5 +++-- arch/x86/kvm/Kconfig| 10 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/kvm_host.h b/arch

Re: [PATCH 1/3] arm: kvm: clamp NR_VCPUS to MAX_VCPUS

2013-09-14 Thread Andrew Jones
On Sat, Sep 14, 2013 at 07:14:02AM -0500, Alexander Graf wrote: > > > Am 14.09.2013 um 07:10 schrieb Andrew Jones : > > > Signed-off-by: Andrew Jones > > --- > > arch/arm/kvm/arm.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > >

Re: [PATCH] [RFC] x86: kvm: remove KVM_SOFT_MAX_VCPUS

2013-09-16 Thread Andrew Jones
On Sun, Sep 15, 2013 at 12:03:22PM +0300, Gleb Natapov wrote: > On Sat, Sep 14, 2013 at 02:16:51PM +0200, Andrew Jones wrote: > > This patch removes KVM_SOFT_MAX_VCPUS and uses num_online_cpus() for > > KVM_CAP_NR_VCPUS instead, as ARM does. While the API doc simply says >

Re: [PATCH] x86: kvm: introduce CONFIG_KVM_MAX_VCPUS

2013-09-16 Thread Andrew Jones
On Sun, Sep 15, 2013 at 12:08:38PM +0300, Gleb Natapov wrote: > On Sat, Sep 14, 2013 at 02:18:49PM +0200, Andrew Jones wrote: > > Take CONFIG_KVM_MAX_VCPUS from arm32, but set the default to 255. > > > > Signed-off-by: Andrew Jones > > --- > > arc

Re: [PATCH] [RFC] x86: kvm: remove KVM_SOFT_MAX_VCPUS

2013-09-16 Thread Andrew Jones
On Mon, Sep 16, 2013 at 11:55:17AM +0300, Gleb Natapov wrote: > On Mon, Sep 16, 2013 at 10:22:09AM +0200, Andrew Jones wrote: > > > > [1] Actually, until 972fc544b6034a in uq/master is merged there won't be > > > > any warnings either. > > &g

Re: [PATCH] x86: kvm: introduce CONFIG_KVM_MAX_VCPUS

2013-09-16 Thread Andrew Jones
On Mon, Sep 16, 2013 at 11:47:10AM +0300, Gleb Natapov wrote: > On Mon, Sep 16, 2013 at 10:28:20AM +0200, Andrew Jones wrote: > > On Sun, Sep 15, 2013 at 12:08:38PM +0300, Gleb Natapov wrote: > > > On Sat, Sep 14, 2013 at 02:18:49PM +0200, Andrew Jones wrote: > > > >

Re: [PATCH] [RFC] x86: kvm: remove KVM_SOFT_MAX_VCPUS

2013-09-16 Thread Andrew Jones
On Mon, Sep 16, 2013 at 05:41:18PM +0300, Gleb Natapov wrote: > On Mon, Sep 16, 2013 at 01:47:26PM +0200, Andrew Jones wrote: > > On Mon, Sep 16, 2013 at 11:55:17AM +0300, Gleb Natapov wrote: > > > On Mon, Sep 16, 2013 at 10:22:09AM +0200, Andrew Jones wrote: > > >

Re: [PATCH] x86: kvm: introduce CONFIG_KVM_MAX_VCPUS

2013-09-16 Thread Andrew Jones
On Mon, Sep 16, 2013 at 05:16:20PM +0300, Gleb Natapov wrote: > On Mon, Sep 16, 2013 at 02:03:33PM +0200, Andrew Jones wrote: > > On Mon, Sep 16, 2013 at 11:47:10AM +0300, Gleb Natapov wrote: > > > On Mon, Sep 16, 2013 at 10:28:20AM +0200, Andrew Jones wrote: > > > >

Re: [PATCH] [RFC] x86: kvm: remove KVM_SOFT_MAX_VCPUS

2013-09-17 Thread Andrew Jones
On Tue, Sep 17, 2013 at 12:36:19PM +0300, Gleb Natapov wrote: > On Mon, Sep 16, 2013 at 05:22:26PM +0200, Andrew Jones wrote: > > On Mon, Sep 16, 2013 at 05:41:18PM +0300, Gleb Natapov wrote: > > > On Mon, Sep 16, 2013 at 01:47:26PM +0200, Andrew Jones wrote: > > > >

Re: [PATCH v2] arm32: kvm: rename CONFIG_KVM_ARM_MAX_VCPUS

2013-09-26 Thread Andrew Jones
On Wed, Sep 25, 2013 at 12:31:27PM -0700, Christoffer Dall wrote: > On Tue, Sep 24, 2013 at 04:09:28PM +0200, Andrew Jones wrote: > > Drop the _ARM_ part of the name. We can then introduce a config option > > like this to aarch64 and other arches using the same name - allowing &

[PATCH v2] arm32: kvm: rename CONFIG_KVM_ARM_MAX_VCPUS

2013-09-24 Thread Andrew Jones
Drop the _ARM_ part of the name. We can then introduce a config option like this to aarch64 and other arches using the same name - allowing grep to show them all. Also update the help text to describe the option more completely. Signed-off-by: Andrew Jones --- v2: reword help text some more

perf: header: Regression

2012-10-22 Thread Andrew Jones
The patch series that contains 7e94cfcc9d20 regresses the header output. Below is a diff of info from before and after the series 58,64c58,59 < # node1 meminfo : total = 16777216 kB, free = 15712440 kB < # node1 cpu list : 2,6,10,14,18,22,26,30 < # node2 meminfo : total = 16777216 kB, free = 16

Re: [PATCH] sched/x86: construct all sibling maps if smt

2013-05-29 Thread Andrew Jones
On Mon, May 27, 2013 at 07:09:00PM +0200, Andrew Jones wrote: > Commit 316ad248307fb ("sched/x86: Rewrite set_cpu_sibling_map()") broke > the construction of sibling maps, which also broke the booted_cores > accounting. > > Before the rewrite, if smt was present, then

[PATCH v2] sched/x86: construct all sibling maps if smt

2013-05-29 Thread Andrew Jones
in the context. v2: - rename has_mc to has_mp now that it's not just for cores Signed-off-by: Andrew Jones Acked-by: Peter Zijlstra --- arch/x86/kernel/smpboot.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpbo

Re: [PATCH RFC V10 0/18] Paravirtualized ticket spinlocks

2013-06-24 Thread Andrew Jones
On Mon, Jun 24, 2013 at 06:10:14PM +0530, Raghavendra K T wrote: > > Results: > === > base = 3.10-rc2 kernel > patched = base + this series > > The test was on 32 core (model: Intel(R) Xeon(R) CPU X7560) HT disabled > with 32 KVM guest vcpu 8GB RAM. Have you ever tried to get results with HT

Re: [PATCH RFC V9 0/19] Paravirtualized ticket spinlocks

2013-06-26 Thread Andrew Jones
On Wed, Jun 26, 2013 at 02:15:26PM +0530, Raghavendra K T wrote: > On 06/25/2013 08:20 PM, Andrew Theurer wrote: > >On Sun, 2013-06-02 at 00:51 +0530, Raghavendra K T wrote: > >>This series replaces the existing paravirtualized spinlock mechanism > >>with a paravirtualized ticketlock mechanism. The

Re: [PATCH RFC 0/2] kvm: Better yield_to candidate using preemption notifiers

2013-03-05 Thread Andrew Jones
On Mon, Mar 04, 2013 at 11:31:46PM +0530, Raghavendra K T wrote: > This patch series further filters better vcpu candidate to yield to > in PLE handler. The main idea is to record the preempted vcpus using > preempt notifiers and iterate only those preempted vcpus in the > handler. Note that the v

Re: [PATCH RFC 0/2] kvm: Better yield_to candidate using preemption notifiers

2013-03-05 Thread Andrew Jones
On Tue, Mar 05, 2013 at 05:54:09PM +0530, Raghavendra K T wrote: > On 03/05/2013 03:23 PM, Andrew Jones wrote: > >On Mon, Mar 04, 2013 at 11:31:46PM +0530, Raghavendra K T wrote: > >> This patch series further filters better vcpu candidate to yield to > >>in PLE h

Re: [Qemu-devel] [PATCH 1/4] mm: madvise MADV_USERFAULT

2013-05-07 Thread Andrew Jones
On Mon, May 06, 2013 at 09:56:58PM +0200, Andrea Arcangeli wrote: > +++ b/mm/madvise.c > @@ -93,6 +93,21 @@ static long madvise_behavior(struct vm_area_struct * vma, > if (error) > goto out; > break; > + case MADV_USERFAULT: > + if (

Re: [Qemu-devel] [PATCH 0/4] madvise(MADV_USERFAULT) & sys_remap_anon_pages()

2013-05-07 Thread Andrew Jones
On Mon, May 06, 2013 at 09:56:57PM +0200, Andrea Arcangeli wrote: > > The current behavior of remap_anon_pages is very strict to avoid any > chance of memory corruption going unnoticed, and it will return > -EFAULT at the first sign of something unexpected (like a page already > mapped in the dest

[PATCH] modules: insert mods sorted

2013-05-25 Thread Andrew Jones
While there isn't a big difference between typing 'lsmod' and 'lsmod | sort', the module listing in Oopses isn't so easily sorted. Attempting to search these quickly by eye for particular modules while rapidly triaging bugs can be a pain. Sort the list and reduce th

Re: [PATCH] modules: insert mods sorted

2013-05-26 Thread Andrew Jones
On Sat, May 25, 2013 at 10:09:46AM +0200, Andrew Jones wrote: > While there isn't a big difference between typing 'lsmod' and > 'lsmod | sort', the module listing in Oopses isn't so easily sorted. > Attempting to search these quickly by eye for particular mo

[PATCH] qxl: fix Kconfig deps - select FB_DEFERRED_IO

2013-05-27 Thread Andrew Jones
Signed-off-by: Andrew Jones --- drivers/gpu/drm/qxl/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/qxl/Kconfig b/drivers/gpu/drm/qxl/Kconfig index 2f1a57e11140a..d6c12796023cd 100644 --- a/drivers/gpu/drm/qxl/Kconfig +++ b/drivers/gpu/drm/qxl/Kconfig @@ -4,6 +4,7

[PATCH] sched/x86: construct all sibling maps if smt

2013-05-27 Thread Andrew Jones
: 3 physical id : 1 siblings: 1<= should be 2 core id : 0 cpu cores : 0<= should be 1 This patch restores the former construction by defining has_mc as (has_smt || x86_max_cores > 1). This should be fine as there were no (has_smt && !has_mc) con

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-27 Thread Andrew Jones
On Mon, Aug 27, 2012 at 05:51:46PM +0800, Dong Hao wrote: > +struct event_stats { > + u64 count; > + u64 time; > + > + /* used to calculate stddev. */ > + double mean; > + double M2; > +}; How about moving the stats functions from builtin-stat.c to e.g. util/stats.c, and the

Re: [RFC][PATCH] Improving directed yield scalability for PLE handler

2012-09-17 Thread Andrew Jones
On Fri, Sep 14, 2012 at 04:34:24PM -0400, Konrad Rzeszutek Wilk wrote: > > The concern I have is that even though we have gone through changes to > > help reduce the candidate vcpus we yield to, we still have a very poor > > idea of which vcpu really needs to run. The result is high cpu usage in >

Re: [RFC][PATCH] Improving directed yield scalability for PLE handler

2012-09-17 Thread Andrew Jones
On Sun, Sep 16, 2012 at 11:55:28AM +0300, Avi Kivity wrote: > On 09/14/2012 12:30 AM, Andrew Theurer wrote: > > > The concern I have is that even though we have gone through changes to > > help reduce the candidate vcpus we yield to, we still have a very poor > > idea of which vcpu really needs to

Re: [RFC][PATCH] Improving directed yield scalability for PLE handler

2012-09-17 Thread Andrew Jones
On Sat, Sep 15, 2012 at 09:38:54PM +0530, Raghavendra K T wrote: > On 09/14/2012 10:40 PM, Andrew Jones wrote: > >On Thu, Sep 13, 2012 at 04:30:58PM -0500, Andrew Theurer wrote: > >>On Thu, 2012-09-13 at 17:18 +0530, Raghavendra K T wrote: > >>>* Andrew

Re: perf script: rwtop: SIGALRM and pipe read race

2012-09-18 Thread Andrew Jones
On Mon, Sep 17, 2012 at 08:55:43AM -0600, David Ahern wrote: > On 9/14/12 12:10 PM, Andrew Jones wrote: > >On Fri, Sep 14, 2012 at 10:05:03AM -0600, David Ahern wrote: > >>On 9/14/12 9:39 AM, Andrew Jones wrote: > >>> > >>>I recently tried 'per

Re: perf script: rwtop: SIGALRM and pipe read race

2012-09-18 Thread Andrew Jones
On Tue, Sep 18, 2012 at 11:05:42AM +0200, Andrew Jones wrote: > Please read the link I posted to the Perl documentation. The standard > Perl signal handling doesn't support SA_RESTART. The Perl developers > found it could lead to data corruption. The patch above attempts to > rep

Re: [PATCH v8] kvm: notify host when the guest is panicked

2012-08-08 Thread Andrew Jones
On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: > diff --git a/Documentation/virtual/kvm/pv_event.txt > b/Documentation/virtual/kvm/pv_event.txt > new file mode 100644 > index 000..0ebc890 > --- /dev/null > +++ b/Documentation/virtual/kvm/pv_event.txt > @@ -0,0 +1,32 @@ > +The KV

Re: [PATCH RFC 1/2] kvm vcpu: Note down pause loop exit

2012-07-11 Thread Andrew Jones
- Original Message - > > > > Hm, suppose we're the next-in-line for a ticket lock and exit due > > to > > PLE. The lock holder completes and unlocks, which really assigns > > the > > lock to us. So now we are the lock owner, yet we are marked as > > don't > > yield-to-us in the PLE code

Re: [PATCH V3 RESEND RFC 0/2] kvm: Improving undercommit scenarios

2013-01-23 Thread Andrew Jones
On Tue, Jan 22, 2013 at 01:08:54PM +0530, Raghavendra K T wrote: > In some special scenarios like #vcpu <= #pcpu, PLE handler may > prove very costly, because there is no need to iterate over vcpus > and do unsuccessful yield_to burning CPU. > > The first patch optimizes all the yield_to by bail

Re: [PATCH V3 RFC 1/2] sched: Bail out of yield_to when source and target runqueue has one task

2012-11-26 Thread Andrew Jones
goto out; > + goto out_unlock; > > yielded = curr->sched_class->yield_to_task(rq, p, preempt); > if (yielded) { > @@ -4329,11 +4341,12 @@ again: > resched_task(p_rq->curr); > } > > -out: > +out_unlock: >

Re: [PATCH V3 RFC 2/2] kvm: Handle yield_to failure return code for potential undercommit case

2012-11-26 Thread Andrew Jones
On Mon, Nov 26, 2012 at 05:38:04PM +0530, Raghavendra K T wrote: > From: Raghavendra K T > > yield_to returns -ESRCH, When source and target of yield_to > run queue length is one. When we see three successive failures of > yield_to we assume we are in potential undercommit case and abort > from P

Re: [PATCH V3 RFC 2/2] kvm: Handle yield_to failure return code for potential undercommit case

2012-11-26 Thread Andrew Jones
On Mon, Nov 26, 2012 at 02:43:02PM +0100, Andrew Jones wrote: > On Mon, Nov 26, 2012 at 05:38:04PM +0530, Raghavendra K T wrote: > > From: Raghavendra K T > > > > yield_to returns -ESRCH, When source and target of yield_to > > run queue length is one. When we see t

Re: [PATCH RFC 0/2] kvm: Improving undercommit,overcommit scenarios in PLE handler

2012-09-27 Thread Andrew Jones
On Thu, Sep 27, 2012 at 03:19:45PM +0530, Raghavendra K T wrote: > On 09/25/2012 08:30 PM, Dor Laor wrote: > >On 09/24/2012 02:02 PM, Raghavendra K T wrote: > >>On 09/24/2012 02:12 PM, Dor Laor wrote: > >>>In order to help PLE and pvticketlock converge I thought that a small > >>>test code should b

SBSA UART bug report and questions

2016-08-01 Thread Andrew Jones
Hi Andre, I have a couple questions and a bug report regarding the SBSA UART. When AArch64 Linux is boot with QEMU and UEFI (AAVMF) we can enable the use of ACPI. When we do that the PL011 model QEMU provides is exposed via the _HID ARMH0011. The Linux driver (amba-pl011.c) only associates this

Re: SBSA UART bug report and questions

2016-08-01 Thread Andrew Jones
On Mon, Aug 01, 2016 at 02:24:53PM +0100, Andre Przywara wrote: > Hi Drew, > > (CC:ing Dave) > > On 01/08/16 13:50, Andrew Jones wrote: > > > > Hi Andre, > > > > I have a couple questions and a bug report regarding the SBSA UART. > > > > W

Re: [PATCH v2 07/16] arm/arm64: KVM: Add PSCI version selection API

2018-01-31 Thread Andrew Jones
On Mon, Jan 29, 2018 at 05:45:50PM +, Marc Zyngier wrote: > Although we've implemented PSCI 1.0 and 1.1, nothing can select them > Since all the new PSCI versions are backward compatible, we decide to > default to the latest version of the PSCI implementation. This is no > different from doing

Re: [PATCH v2 07/16] arm/arm64: KVM: Add PSCI version selection API

2018-01-31 Thread Andrew Jones
On Wed, Jan 31, 2018 at 05:45:56PM +, Marc Zyngier wrote: > On 31/01/18 17:38, Andrew Jones wrote: > > On Mon, Jan 29, 2018 at 05:45:50PM +, Marc Zyngier wrote: > >> Although we've implemented PSCI 1.0 and 1.1, nothing can select them > >> Since all th

Re: [PATCH v2 07/16] arm/arm64: KVM: Add PSCI version selection API

2018-01-31 Thread Andrew Jones
On Wed, Jan 31, 2018 at 06:36:38PM +, Marc Zyngier wrote: > On 31/01/18 18:03, Andrew Jones wrote: > > On Wed, Jan 31, 2018 at 05:45:56PM +, Marc Zyngier wrote: > >> On 31/01/18 17:38, Andrew Jones wrote: > >>> On Mon, Jan 29, 2018 at 05:45:50PM +, Marc

Re: [PATCH] arm64: Implement branch predictor hardening for Falkor

2018-01-08 Thread Andrew Jones
Hi Shanker, On Fri, Jan 05, 2018 at 02:28:59PM -0600, Shanker Donthineni wrote: ... > diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c > index cb0fb37..daf53a5 100644 > --- a/arch/arm64/kernel/cpu_errata.c > +++ b/arch/arm64/kernel/cpu_errata.c > @@ -54,6 +54,8 @@ stati

Re: [REPOST PATCH] arm/arm64: KVM: Add PSCI version selection API

2018-03-06 Thread Andrew Jones
On Mon, Mar 05, 2018 at 04:47:55PM +, Peter Maydell wrote: > On 2 March 2018 at 11:11, Marc Zyngier wrote: > > On Fri, 02 Mar 2018 10:44:48 +, > > Auger Eric wrote: > >> I understand the get/set is called as part of the migration process. > >> So my understanding is the benefit of this ser

Re: KVM selftests are failing

2018-11-15 Thread Andrew Jones
On Wed, Nov 14, 2018 at 09:23:41PM +0200, Ahmed Soliman wrote: > Hello, > > > > I couldn't reproduce this on a Westmere. Are you sure you're testing > > > a clean compilation? Can you bisect the kernel? > I don't do a make clean normally, but I will do it this time when > bisecting, Sorry, I mean

Re: KVM selftests are failing

2018-11-15 Thread Andrew Jones
On Wed, Nov 14, 2018 at 11:29:59PM +0200, Ahmed Soliman wrote: > Hello again, > On Wed, Nov 14, 2018 at 9:23 PM Ahmed Soliman > wrote: > > I don't do a make clean normally, but I will do it this time when > > bisecting, also I only use shallow > > clones so it will also take some time pulling. A

Re: KVM selftests are failing

2018-11-15 Thread Andrew Jones
On Thu, Nov 15, 2018 at 03:36:44PM +0200, Ahmed Soliman wrote: > mmap(NULL, 6291456, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, > -1, 0) = 0x7f46ea2a1000 > madvise(0x7f46ea2a1000, 6291456, MADV_NOHUGEPAGE) = -1 EINVAL (Invalid > argument) > > For comprehension, this is done on intel core i7

Re: [PATCH] SelfTest: KVM: Drop Asserts for madvise failures

2018-11-16 Thread Andrew Jones
On Thu, Nov 15, 2018 at 08:09:07PM +0200, Ahmed Abd El Mawgood wrote: > From: Ahmed Abd El Mawgood > > madvise() returns -1 without CONFIG_TRANSPARENT_HUGEPAGE=y. That would > trigger asserts when checking for return value of madvice. Following > similar decision to [1]. I thought it is ok to ass

Re: [PATCH V2] SelfTest: KVM: Drop Asserts for madvise MADV_NOHUGEPAGE failure

2018-11-16 Thread Andrew Jones
+ "Does the kernel have CONFIG_TRANSPARENT_HUGEPAGE=y\n" > + " addr: %p\n" > + " length: 0x%lx\n" > + " src_type: %x\n", > + region->host_mem, npages * vm->page_size, > + src_type); > } > > region->unused_phy_pages = sparsebit_alloc(); > -- > 2.18.1 > Reviewed-by: Andrew Jones

Re: KVM selftests are failing

2018-11-14 Thread Andrew Jones
On Wed, Nov 14, 2018 at 05:30:28PM +0200, Ahmed Soliman wrote: > Hello, > > KVM Self tests located at tools/testing/selftests/kvm seams to be failing. > I have tried: > - dirty_log_test > - x86_64/cr4_cpuid_sync_test > - x86_64/evmcs_test > - x86_64/platform_info_test > - x86_64/set_sregs_tes

Re: [PATCH] kvm/arm: return 0 when the number of objects is not lessthan min

2018-12-06 Thread Andrew Jones
On Thu, Dec 06, 2018 at 09:56:30AM +0800, peng.h...@zte.com.cn wrote: > >On Wed, Dec 05, 2018 at 09:15:51AM +0800, Peng Hao wrote: > >> Return 0 when there is enough kvm_mmu_memory_cache object. > >> > >> Signed-off-by: Peng Hao > >> --- > >> virt/kvm/arm/mmu.c | 2 +- > >> 1 file changed, 1 inse

Re: [PATCH] arm64: acpi: reenumerate topology ids

2018-06-29 Thread Andrew Jones
On Fri, Jun 29, 2018 at 02:29:34PM +0100, Sudeep Holla wrote: > If it matters a lot, vendors must use UID for consistency. Since OS doesn't > use those IDs for any particular reason, OS must not care. That depends. If you look at how topology_logical_package_id() is used in x86 code you'll see it

Re: [PATCH] arm64: acpi: reenumerate topology ids

2018-06-29 Thread Andrew Jones
On Fri, Jun 29, 2018 at 02:38:49PM +0100, Sudeep Holla wrote: > On Fri, Jun 29, 2018 at 01:42:27PM +0200, Andrew Jones wrote: > > On Fri, Jun 29, 2018 at 11:53:34AM +0100, Sudeep Holla wrote: > > > On Thu, Jun 28, 2018 at 12:12:00PM -0500, Jeremy Linton wrote: > > > >

Re: [PATCH] arm64: acpi: reenumerate topology ids

2018-06-29 Thread Andrew Jones
On Fri, Jun 29, 2018 at 11:48:15AM -0500, Jeremy Linton wrote: > Just to be clear, there isn't anything (AFAIK) in the ACPI specification > which dictates what values should comprise the various ACPI id's. They are > assumed only to be machine readable, which is why it seems some > implementations

Re: [PATCH] arm64: acpi: reenumerate topology ids

2018-06-29 Thread Andrew Jones
On Fri, Jun 29, 2018 at 06:23:15PM +0100, Sudeep Holla wrote: > On Fri, Jun 29, 2018 at 07:03:34PM +0200, Andrew Jones wrote: > > On Fri, Jun 29, 2018 at 11:48:15AM -0500, Jeremy Linton wrote: > [..] > > > > > > > If you want a human readable socket identifier tha

Re: [PATCH] ACPI/PPTT: use ACPI ID whenever ACPI_PPTT_ACPI_PROCESSOR_ID_VALID is set

2018-06-30 Thread Andrew Jones
On Fri, Jun 29, 2018 at 05:17:57PM +0100, Sudeep Holla wrote: > Currently we use the ACPI processor ID only for the leaf/processor nodes > as the specification states it must match the value of ACPI processor ID > field in the processor’s entry in the MADT. > > However, if a PPTT structure represe

Re: [RFC PATCH] arm64: topology: Map PPTT node offset to logic physical package id

2018-06-28 Thread Andrew Jones
> node offset to 0, the second to 1, and so on. > > > > Then, it will not output a big value, such as 162 above. And it will > > not change when some nodes(Physical package not set) are added. > > > > And as long as the nodes with Physical package field set in PPTT ke

Re: [RFC PATCH] arm64: topology: Map PPTT node offset to logic physical package id

2018-06-28 Thread Andrew Jones
On Thu, Jun 28, 2018 at 03:09:19PM +0100, Sudeep Holla wrote: > > > On 28/06/18 14:19, Jeremy Linton wrote: > > Hi, > > > > On 06/28/2018 07:12 AM, Sudeep Holla wrote: > > [...] > > >> > >> OK sure. I liked the approach in Shunyong's patch. I was thinking if we > >> can avoid the list and dyna

[PATCH] arm64: acpi: reenumerate topology ids

2018-06-28 Thread Andrew Jones
topology IDs for ACPI by just using counters for the leaf nodes and by remapping the non-leaf table pointer offsets to counters. Cc: Jeremy Linton Cc: Sudeep Holla Signed-off-by: Andrew Jones --- v1: Reworked this since the RFC in order to make the algorithm more obvious. It wasn't clear i

Re: [PATCH] arm64: acpi: reenumerate topology ids

2018-06-28 Thread Andrew Jones
On Thu, Jun 28, 2018 at 05:30:51PM +0100, Sudeep Holla wrote: > I am not sure if we can ever guarantee that DT and ACPI will get the > same ids whatever counter we use as it depends on the order presented in > the firmware(DT or ACPI). So I am not for generating ids for core and > threads in that w

Re: [PATCH] arm64: acpi: reenumerate topology ids

2018-06-29 Thread Andrew Jones
On Fri, Jun 29, 2018 at 11:29:27AM +0100, Sudeep Holla wrote: > On Thu, Jun 28, 2018 at 07:32:43PM +0200, Andrew Jones wrote: > > On Thu, Jun 28, 2018 at 05:30:51PM +0100, Sudeep Holla wrote: > > > I am not sure if we can ever guarantee that DT and ACPI will get the > > >

Re: [PATCH] arm64: acpi: reenumerate topology ids

2018-06-29 Thread Andrew Jones
On Fri, Jun 29, 2018 at 11:53:34AM +0100, Sudeep Holla wrote: > On Thu, Jun 28, 2018 at 12:12:00PM -0500, Jeremy Linton wrote: > > Hi, > > > > On 06/28/2018 11:30 AM, Sudeep Holla wrote: > > [...] > > > >I am not sure if we can ever guarantee that DT and ACPI will get the > > >same ids whatever

Re: [PATCH] arm64: acpi: reenumerate topology ids

2018-06-29 Thread Andrew Jones
On Fri, Jun 29, 2018 at 01:42:27PM +0200, Andrew Jones wrote: > On Fri, Jun 29, 2018 at 11:53:34AM +0100, Sudeep Holla wrote: > > On Thu, Jun 28, 2018 at 12:12:00PM -0500, Jeremy Linton wrote: > > > Hi, > > > > > > On 06/28/2018 11:30 AM, Sudeep Holla wrote:

Re: [PATCH v2 05/10] KVM: arm: introduce kvm_arch_setup/clear_debug()

2015-04-09 Thread Andrew Jones
On Wed, Apr 01, 2015 at 06:28:55PM +0200, David Hildenbrand wrote: > > This is a precursor for later patches which will need to do more to > > setup debug state before entering the hyp.S switch code. The existing > > functionality for setting mdcr_el2 has been moved out of hyp.S and now > > uses th

Re: [PATCH v2 05/10] KVM: arm: introduce kvm_arch_setup/clear_debug()

2015-04-09 Thread Andrew Jones
On Tue, Mar 31, 2015 at 04:08:03PM +0100, Alex Bennée wrote: > This is a precursor for later patches which will need to do more to > setup debug state before entering the hyp.S switch code. The existing > functionality for setting mdcr_el2 has been moved out of hyp.S and now > uses the value kept i

Re: [PATCH v2 04/10] KVM: arm: guest debug, add stub KVM_SET_GUEST_DEBUG ioctl

2015-04-09 Thread Andrew Jones
On Wed, Apr 01, 2015 at 05:55:29PM +0200, David Hildenbrand wrote: > > This commit adds a stub function to support the KVM_SET_GUEST_DEBUG > > ioctl. Currently any operation flag will return EINVAL. Actual > > Well it won't return -EINVAL if you push in KVM_GUESTDBG_ENABLE or 0. > > "Any unsuppor

Re: [PATCH v2 07/10] KVM: arm64: guest debug, add support for single-step

2015-04-09 Thread Andrew Jones
On Tue, Mar 31, 2015 at 04:08:05PM +0100, Alex Bennée wrote: > This adds support for single-stepping the guest. As userspace can and > will manipulate guest registers before restarting any tweaking of the > registers has to occur just before control is passed back to the guest. > Furthermore while

Re: [PATCH v2 02/10] KVM: define common __KVM_GUESTDBG_USE_SW/HW_BP values

2015-04-13 Thread Andrew Jones
On Mon, Apr 13, 2015 at 03:51:33PM +0100, Alex Bennée wrote: > > Christoffer Dall writes: > > > On Tue, Mar 31, 2015 at 04:08:00PM +0100, Alex Bennée wrote: > >> Currently x86, powerpc and soon arm64 use the same two architecture > >> specific bits for guest debug support for software and hardwa

Re: [PATCH v5 03/12] KVM: arm64: guest debug, define API headers

2015-06-04 Thread Andrew Jones
> >> specific control bits of the kvm_guest_debug->control flags in the ioctl > >> structure. > >> > >> Signed-off-by: Alex Bennée > >> Reviewed-by: David Hildenbrand > >> Reviewed-by: Andrew Jones > >> Acked-by: Christoffer Dall &g

Re: [PATCH 1/3] selftests: kvm/evmcs_test: complete I/O before migrating guest state

2019-04-16 Thread Andrew Jones
On Thu, Apr 11, 2019 at 06:48:26PM +0200, Paolo Bonzini wrote: > Starting state migration after an IO exit without first completing IO > may result in test failures. We already have two tests that need this > (this patch in fact fixes evmcs_test, similar to what was fixed for > state_test in commi

Re: [PATCH 00/15] VM: selftests: Hugepage fixes and cleanups

2021-02-11 Thread Andrew Jones
8 > .../selftests/kvm/include/perf_test_util.h| 18 +-- > tools/testing/selftests/kvm/lib/kvm_util.c| 36 ++--- > .../selftests/kvm/lib/perf_test_util.c| 139 ++ > .../kvm/memslot_modification_stress_test.c| 16 +- > 7 files changed, 145 insertions(+), 141 deletions(-) > > -- > 2.30.0.478.g8a0d178c01-goog > For the series Reviewed-by: Andrew Jones Thanks, drew

Re: [RFC PATCH v2 2/7] KVM: selftests: Use flag CLOCK_MONOTONIC_RAW for timing

2021-02-25 Thread Andrew Jones
On Thu, Feb 25, 2021 at 01:59:35PM +0800, Yanan Wang wrote: > In addition to function of CLOCK_MONOTONIC, flag CLOCK_MONOTONIC_RAW can > also shield possiable impact of NTP, which can provide more robustness. IIRC, this should include Suggested-by: Vitaly Kuznetsov > > Signed-off-by: Yanan Wan

Re: [RFC PATCH v2 3/7] KVM: selftests: Make a generic helper to get vm guest mode strings

2021-02-25 Thread Andrew Jones
;, > + [VM_MODE_P40V48_64K]= "PA-bits:40, VA-bits:48, 64K pages", > + [VM_MODE_PXXV48_4K] = "PA-bits:ANY, VA-bits:48, 4K pages", > + }; > + _Static_assert(sizeof(strings)/sizeof(char *) == NUM_VM_MODES, > +"Missing new mode strings?"); > + > + TEST_ASSERT(i < NUM_VM_MODES, "Guest mode ID %d too big", i); > + > + return strings[i]; > +} > > const struct vm_guest_mode_params vm_guest_mode_params[] = { > { 52, 48, 0x1000, 12 }, > -- > 2.19.1 > Reviewed-by: Andrew Jones

Re: [PATCH 2/3] KVM: x86: introduce KVM_MEM_PCI_HOLE memory

2020-08-05 Thread Andrew Jones
On Tue, Jul 28, 2020 at 04:37:40PM +0200, Vitaly Kuznetsov wrote: > PCIe config space can (depending on the configuration) be quite big but > usually is sparsely populated. Guest may scan it by accessing individual > device's page which, when device is missing, is supposed to have 'pci > hole' sema

Re: [PATCH v2 2/2] selftests/kvm: add set_boot_cpu_id test

2021-03-18 Thread Andrew Jones
On Thu, Mar 18, 2021 at 04:16:24PM +0100, Emanuele Giuseppe Esposito wrote: > Test for the KVM_SET_BOOT_CPU_ID ioctl. > Check that it correctly allows to change the BSP vcpu. > > v1 -> v2: > - remove unnecessary printf > - move stage for loop inside run_vcpu > - test EBUSY when calling KVM_SET_BOO

Re: [PATCH v2 1/2] kvm/kvm_util: add _vm_ioctl

2021-03-18 Thread Andrew Jones
t; +{ > + return ioctl(vm->fd, cmd, arg); > +} > + > /* > * KVM system ioctl > * > -- > 2.29.2 > With the summary prefix change suggested by Paolo, or even better 'KVM: selftests:' since that's what the majority of patches in KVM selftests have Reviewed-by: Andrew Jones

Re: [PATCH] selftests/kvm: add get_msr_index_features

2021-03-18 Thread Andrew Jones
On Thu, Mar 18, 2021 at 03:56:29PM +0100, Emanuele Giuseppe Esposito wrote: > Test the KVM_GET_MSR_FEATURE_INDEX_LIST > and KVM_GET_MSR_INDEX_LIST ioctls. > > Signed-off-by: Emanuele Giuseppe Esposito > --- > tools/testing/selftests/kvm/.gitignore| 1 + > tools/testing/selftests/kvm/Ma

Re: [PATCH] selftests/kvm: add get_msr_index_features

2021-03-18 Thread Andrew Jones
On Thu, Mar 18, 2021 at 06:33:35PM +0100, Paolo Bonzini wrote: > On 18/03/21 18:03, Andrew Jones wrote: > > > > > > TEST_GEN_PROGS_x86_64 = x86_64/cr4_cpuid_sync_test > > > +TEST_GEN_PROGS_x86_64 += x86_64/get_msr_index_features > > > > Maybe we should

  1   2   3   >