blk-mq crash under KVM in multiqueue block code (with virtio-blk and ext4)

2014-09-11 Thread Christian Borntraeger
Folks, we have seen the following bug with 3.16 as a KVM guest. It suspect the blk-mq rework that happened between 3.15 and 3.16, but it can be something completely different. [ 65.992022] Unable to handle kernel pointer dereference in virtual kernel address space [ 65.992187] failing add

Re: blk-mq crash under KVM in multiqueue block code (with virtio-blk and ext4)

2014-09-12 Thread Christian Borntraeger
On 09/11/2014 12:26 PM, Christian Borntraeger wrote: > Folks, > > we have seen the following bug with 3.16 as a KVM guest. It suspect the > blk-mq rework that happened between 3.15 and 3.16, but it can be something > completely different. > > > [ 65.992022] Unable

Re: blk-mq crash under KVM in multiqueue block code (with virtio-blk and ext4)

2014-09-12 Thread Christian Borntraeger
On 09/12/2014 01:54 PM, Ming Lei wrote: > On Thu, Sep 11, 2014 at 6:26 PM, Christian Borntraeger > wrote: >> Folks, >> >> we have seen the following bug with 3.16 as a KVM guest. It suspect the >> blk-mq rework that happened between 3.15 and 3.16, but it can be some

[PATCH 02/11] KVM: s390: Use trace tables from sie.h.

2014-04-25 Thread Christian Borntraeger
From: Alexander Yarygin Use the symbolic translation tables from sie.h for decoding diag, sigp and sie exit codes. Signed-off-by: Alexander Yarygin Acked-by: Christian Borntraeger Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger --- arch/s390/kvm/trace.h | 32

[PATCH/RFC 00/11] perf/s390/kvm: trace events, perf kvm stat

2014-04-25 Thread Christian Borntraeger
The goal of this series is to - enable perf kvm stat on s390 - get rid of a perf warning "insn_to_mnemonic not found" when it tries to decode s390 perf trace events Review feedback is welcome. In addition, The patch set touches s390/kvm code and perf code. So any feedback on which tree to use fo

[PATCH 05/11] perf kvm: Intoduce HAVE_KVM_STAT_SUPPORT flag

2014-04-25 Thread Christian Borntraeger
From: Alexander Yarygin kvm stat support is currently conditional on i386/x86_64. Let's abstract this into a HAVE_KVM_STAT_SUPPORT flag, so that other architectures can support kvm stat as well. Signed-off-by: Alexander Yarygin Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntr

[PATCH 10/11] perf: allow to use cpuinfo on s390

2014-04-25 Thread Christian Borntraeger
From: Alexander Yarygin This patch defines CPUINFO_PROC for s390 and implements get_cpuid(). Signed-off-by: Alexander Yarygin Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger --- tools/perf/arch/s390/Makefile | 1 + tools/perf/arch/s390/util/header.c | 17

[PATCH 07/11] perf kvm: Refactoring of cpu_isa_config()

2014-04-25 Thread Christian Borntraeger
arch-depended things. Signed-off-by: Alexander Yarygin Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger --- tools/perf/builtin-kvm.c | 37 + 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/tools/perf/builtin-kvm.c b/tools/perf/bu

[PATCH 09/11] perf kvm: use defines of kvm events

2014-04-25 Thread Christian Borntraeger
: Alexander Yarygin Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger --- arch/x86/include/uapi/asm/kvm.h | 8 tools/perf/builtin-kvm.c| 10 -- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/uapi/asm/kvm.h b/arch/x86/include

[PATCH 06/11] perf kvm: simplify of exit reasons tables definitions

2014-04-25 Thread Christian Borntraeger
Usage of tables with 'end of sequence' marker can simplify get_exit_reason() function. Also patch introduces a define_exit_reasons_table, which makes easier to define new tables. Signed-off-by: Alexander Yarygin Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger --- tool

[PATCH 08/11] perf kvm: allow for variable string sizes

2014-04-25 Thread Christian Borntraeger
From: Alexander Yarygin This makes it possible for other architectures to decode to different string lengths. Needed by follow-up patch "perf kvm: add stat support on s390". Signed-off-by: Alexander Yarygin Signed-off-by: Christian Borntraeger --- tools/perf/builtin-

[PATCH 11/11] perf kvm: add stat support on s390

2014-04-25 Thread Christian Borntraeger
From: Alexander Yarygin This patch allows perf to record SIE trace events, decode them and print performance statistics. Commands perf kvm stat record, report and stat are supported. Signed-off-by: Alexander Yarygin Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger --- arch

[PATCH 04/11] KVM: s390: Use intercept_insn decoder in trace event

2014-04-25 Thread Christian Borntraeger
From: Alexander Yarygin The current trace definition doesn't work very well with the perf tool. Perf shows a "insn_to_mnemonic not found" message. Let's handle the decoding completely in a parseable format. Signed-off-by: Alexander Yarygin Acked-by: Christian Borntraeger R

[PATCH 03/11] KVM: s390: decoder of SIE intercepted instructions

2014-04-25 Thread Christian Borntraeger
that may cause a SIE intercept. Signed-off-by: Alexander Yarygin Acked-by: Christian Borntraeger Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger --- arch/s390/include/uapi/asm/sie.h | 33 + 1 file changed, 33 insertions(+) diff --git a/arch/s390

[PATCH 01/11] s390: add sie exit reasons tables

2014-04-25 Thread Christian Borntraeger
: Christian Borntraeger --- arch/s390/include/uapi/asm/sie.h | 212 +++ 1 file changed, 212 insertions(+) create mode 100644 arch/s390/include/uapi/asm/sie.h diff --git a/arch/s390/include/uapi/asm/sie.h b/arch/s390/include/uapi/asm/sie.h new file mode 100644 index

Re: [PATCH 1/3] perf tools: parse tracepooints with '-' in system name

2014-04-28 Thread Christian Borntraeger
*" > invalid or unsupported event: 'kvm-s390:*' > > This patch adds an extra rule to event_legacy_tracepoint which handles > those cases. Without the patch, perf will not accept such tracepoints in > the -e option. > > Signed-off-by: Alexander Yarygin Tested-by

Re: [PATCH 1/3] perf tools: Cache register accesses for unwind processing

2014-04-28 Thread Christian Borntraeger
On 17/04/14 19:39, Jiri Olsa wrote: > Caching registers value into an array. Got about 4% speed up > of perf_reg_value function for report command processing > dwarf unwind stacks. > > Output from report over 1.5 GB data with DWARF unwind stacks: > (TODO fix perf diff) > > current code: >6.

Re: [PATCH v4] kvm/irqchip: Speed up KVM_SET_GSI_ROUTING

2014-04-29 Thread Christian Borntraeger
On 28/04/14 18:39, Paolo Bonzini wrote: > From: Christian Borntraeger > > When starting lots of dataplane devices the bootup takes very long on > Christian's s390 with irqfd patches. With larger setups he is even > able to trigger some timeouts in some components.

Re: [PATCH v1 RFC 0/6] KVM: s390: cpu model implementation

2014-05-16 Thread Christian Borntraeger
On 13/05/14 16:58, Michael Mueller wrote: > The proposed patch set implements S390 cpu model support in kvm. A cpu > model is defined by a triple comprizing the cpu type , the cpu facility > set and instruction blocking control. A consumer requests a feasible > combination of that that triple befor

[PULL 2/2] perf-kvm: fix of 'Min time' counting in report command

2014-04-09 Thread Christian Borntraeger
xB2 STSI 7 0.04% 0.00%1us 44us 16.49us ( +- 38.20% ) [..] Signed-off-by: Alexander Yarygin Signed-off-by: Christian Borntraeger --- tools/perf/builtin-kvm.c |1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c

[PULL 0/2] small perf fixes

2014-04-09 Thread Christian Borntraeger
Ingo, Arnaldo, two fixes indentified during kvm on s390 development are available since commit 538592ff0b008237ae88f5ce5fb1247127dc3ce5: Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-03-19 08:05:47 +0100) in the git reposit

[PULL 1/2] perf/tool: Fix usage of trace events with '-' in trace system name.

2014-04-09 Thread Christian Borntraeger
: 'kvm-s390:*' This patch allows '-' to be a part of PE_NAME token, so tracepoints with '-' can be parsed by the event_legacy_tracepoint rule. Without the patch, perf will not accept such tracepoints in the -e option. Signed-off-by: Alexander Yarygin Signed-off-by:

[PATCH] perf/tool: Fix usage of trace events with '-' in trace system name.

2014-03-24 Thread Christian Borntraeger
: 'kvm-s390:*' This patch adds an extra rule to event_legacy_tracepoint which handles those cases. Without the patch, perf will not accept such tracepoints in the -e option. Signed-off-by: Alexander Yarygin Signed-off-by: Christian Borntraeger --- tools/perf/util/parse-events.y | 12 ++

Re: [PATCH v2] perf/tool: Fix usage of trace events with '-' in trace system name.

2014-03-27 Thread Christian Borntraeger
oints in the -e > option. > > Signed-off-by: Alexander Yarygin > Signed-off-by: Christian Borntraeger When doing a V2, you should remove my Signed-off-by. ;-) But at least we can now add my Acked-by: Christian Borntraeger Ingo, Peter, Paul, If you agree with this solution, I wou

Re: [PULL 0/2] small perf fixes

2014-04-15 Thread Christian Borntraeger
On 09/04/14 16:21, Christian Borntraeger wrote: > Ingo, Arnaldo, > > two fixes indentified during kvm on s390 development are available > > since commit 538592ff0b008237ae88f5ce5fb1247127dc3ce5: > > Merge tag 'perf-core-for-mingo' of > git://git.kernel

Re: [PULL 1/2] perf/tool: Fix usage of trace events with '-' in trace system name.

2014-04-16 Thread Christian Borntraeger
On 16/04/14 15:00, Jiri Olsa wrote: > On Wed, Apr 09, 2014 at 04:21:58PM +0200, Christian Borntraeger wrote: >> From: Alexander Yarygin >> >> Trace events potentially can have a '-' in their trace system name, >> e.g. kvm on s390 defines kvm-s390:* tracepoint

Re: [PULL 1/2] perf/tool: Fix usage of trace events with '-' in trace system name.

2014-04-16 Thread Christian Borntraeger
On 16/04/14 15:28, Christian Borntraeger wrote: > On 16/04/14 15:00, Jiri Olsa wrote: >> On Wed, Apr 09, 2014 at 04:21:58PM +0200, Christian Borntraeger wrote: >>> From: Alexander Yarygin >>> >>> Trace events potentially can have a '-' in their trace

Re: [PATCH 0/4] perf kvm: Refactoring and small improvements

2014-07-03 Thread Christian Borntraeger
kvm.c | 72 > +++- > tools/perf/config/Makefile |4 ++ > tools/perf/perf-sys.h |1 + > 6 files changed, 73 insertions(+), 34 deletions(-) > create mode 100644 tools/perf/arch/s390/util/header.c > > -- >

Re: [PATCH/RFC 0/4] perf kvm: add stat support for s390

2014-07-03 Thread Christian Borntraeger
arch/s390/include/uapi/asm/kvm_perf.h > create mode 100644 arch/x86/include/uapi/asm/kvm_perf.h > create mode 100644 tools/perf/arch/s390/util/kvm-stat.c > create mode 100644 tools/perf/arch/x86/util/kvm-stat.c > create mode 100644 tools/perf/util/kvm-stat.h > > -- > 1.7.9.

Re: [tip:locking/urgent] locking/mutex: Disable optimistic spinning on some architectures

2014-07-17 Thread Christian Borntraeger
s390: s390 also supports proper atomic read modify write, There is no need to disable mutex spinning. The instructions CS,CSG and friends provide the proper guarantees. (We dont implement cmpxchg with locks). Signed-off-by: Christian Borntraeger --- arch/s390/Kconfig |1 + 1 file changed

Re: [tip:locking/urgent] locking/mutex: Disable optimistic spinning on some architectures

2014-07-17 Thread Christian Borntraeger
On 17/07/14 13:51, Christian Borntraeger wrote: > select ARCH_HAVE_NMI_SAFE_CMPXCHG > + select ARCH_SUPPORTS_ATOMIC_RMW This begs the question, if both defines were created for the same reason and could be combined. Christian -- To unsubscribe from this list: send th

Re: [PATCH 1/4] perf kvm: Use defines of kvm events

2014-07-07 Thread Christian Borntraeger
> - kvm_entry and kvm_exit events, > - exit reason field name in kvm_exit event, > - length of exit reasons strings, > - vcpu_id field name in kvm trace events, > > and replace literals in perf-kvm. > > Signed-off-by: Alexander Yarygin > Reviewed-by: Cornelia Huck A

Re: [PATCH 2/4] perf kvm: Move arch specific code into arch/

2014-07-07 Thread Christian Borntraeger
m by adding trimming > NULL element to each array and changing the behavior of their handlers > in generic code. > > Signed-off-by: Alexander Yarygin > Reviewed-by: Cornelia Huck Acked-by: Christian Borntraeger Would be good if Paolo and David could ack the KVM/perf par

Re: [PATCH 3/4] perf kvm: Add skip_event() for --duration option

2014-07-07 Thread Christian Borntraeger
ific array of events to be skipped and > introduce a skip_event() function checking against that array. > > Signed-off-by: Alexander Yarygin > Reviewed-by: Cornelia Huck Reviewed-by: Christian Borntraeger Would be good if Paolo and David could ack the KVM/perf parts. Then thi

Re: [PATCH 4/4] perf kvm: Add stat support on s390

2014-07-07 Thread Christian Borntraeger
he generic code > and also the files and kvm-stat.c for s390. > > Commands 'perf kvm stat record', 'report' and 'live' are supported. > > Signed-off-by: Alexander Yarygin Acked-by: Christian Borntraeger Would be good if Paolo and David could ack

Re: [PATCH] perf/tool: Fix usage of trace events with '-' in trace system name.

2014-04-17 Thread Christian Borntraeger
On 17/04/14 13:32, Jiri Olsa wrote: > On Tue, Mar 25, 2014 at 11:15:29AM +0100, Paolo Bonzini wrote: >> Il 24/03/2014 21:49, Christian Borntraeger ha scritto: >>> event_legacy_tracepoint: >>> +PE_NAME '-' PE_NAME ':' PE_NAME >>> +{ >>

commit 0bf1457f0cfca7b " mm: vmscan: do not swap anon pages just because free+file is low" causes heavy performance regression on paging

2014-04-22 Thread Christian Borntraeger
While preparing/testing some KVM on s390 patches for the next merge window (target is kvm/next which is based on 3.15-rc1) I faced a very severe performance hickup on guest paging (all anonymous memory). All memory bound guests are in "D" state now and the system is barely unusable. Reverting c

Re: commit 0bf1457f0cfca7b " mm: vmscan: do not swap anon pages just because free+file is low" causes heavy performance regression on paging

2014-04-22 Thread Christian Borntraeger
On 22/04/14 12:55, Christian Borntraeger wrote: > While preparing/testing some KVM on s390 patches for the next merge window > (target is kvm/next which is based on 3.15-rc1) I faced a very severe > performance hickup on guest paging (all anonymous memory). > > All memory bound g

Re: [Qemu-devel] [PATCH v1 RFC 6/6] KVM: s390: add cpu model support

2014-05-22 Thread Christian Borntraeger
On 22/05/14 10:53, Paolo Bonzini wrote: > Il 22/05/2014 10:23, Michael Mueller ha scritto: >> On Wed, 21 May 2014 15:22:35 +0200 >> Alexander Graf wrote: >> >> I have seen the slides from Eduardo which he presented during this years >> DevConf in Brno and made my comments according the s390x imple

Re: [PATCH 08/11] perf kvm: allow for variable string sizes

2014-05-05 Thread Christian Borntraeger
David, thanks for the review. Are you ok with this change as well? The alternative is to shorten our descriptions (in 1/11 s390: add sie exit reasons tables), which would make the trace output less comprehensible, though. Christian On 25/04/14 11:12, Christian Borntraeger wrote: > F

Re: [PATCH/RFC 00/11] perf/s390/kvm: trace events, perf kvm stat

2014-05-05 Thread Christian Borntraeger
On 02/05/14 20:14, David Ahern wrote: > On 5/2/14, 3:16 AM, Jiri Olsa wrote: [...] >> CC-ing David Ahern >> > I don't have the original emails, but looking at > https://lkml.org/lkml/2014/4/25/331 > > > [PATCH 01/11] s390: add sie exit reasons tables > [PATCH 02/11] KVM: s390: Use trace tables fr

Re: [PATCH 11/11] perf kvm: add stat support on s390

2014-05-05 Thread Christian Borntraeger
On 25/04/14 11:12, Christian Borntraeger wrote: > +#if defined(__i386__) || defined(__x86_64__) > else if (!strcmp(kvm->report_event, "mmio")) > kvm->events_ops = &mmio_events; > else if (!strcmp(kvm->report_event, "i

Re: [PATCH v4] kvm/irqchip: Speed up KVM_SET_GSI_ROUTING

2014-05-05 Thread Christian Borntraeger
On 28/04/14 18:39, Paolo Bonzini wrote: > From: Christian Borntraeger Given all your work, What about From: Paolo Bonzini plus "Based on an inital patch from Christian Borntraeger" > > When starting lots of dataplane devices the bootup takes very long on > Christian

Re: [PATCH 1/9] KVM: add kvm_arch_sched_in

2014-08-20 Thread Christian Borntraeger
On 19/08/14 22:35, Radim Krčmář wrote: > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -3123,6 +3123,8 @@ static void kvm_sched_in(struct preempt_notifier *pn, > int cpu) > if (vcpu->preempted) > vcpu->preempted = false; > > + kvm_arch_sched_in(vcpu, cpu); >

Re: [PATCH] vhost: Add polling mode

2014-08-20 Thread Christian Borntraeger
On 10/08/14 10:30, Razya Ladelsky wrote: > From: Razya Ladelsky > Date: Thu, 31 Jul 2014 09:47:20 +0300 > Subject: [PATCH] vhost: Add polling mode > > When vhost is waiting for buffers from the guest driver (e.g., more packets to > send in vhost-net's transmit queue), it normally goes to sleep an

WARNING: at kernel/workqueue.c:845

2014-08-29 Thread Christian Borntraeger
Tejun, with kvm/next (pretty close to 3.17-rc1) as KVM guest I get the following warning in one of my stress tests: [0.296047] [ cut here ] [0.296050] WARNING: at kernel/workqueue.c:809 [0.296051] Modules linked in: [0.296054] CPU: 0 PID: 0 Comm: swapper/0

Re: WARNING: at kernel/workqueue.c:845

2014-08-29 Thread Christian Borntraeger
On 29/08/14 12:50, Christian Borntraeger wrote: > Tejun, > > with kvm/next (pretty close to 3.17-rc1) as KVM guest I get the following > warning in one of my stress tests: Turns out that it happens when I shutdown the guest via an sclp quiesce interrupt (wired to ctrl-alt-delete)

Re: [PATCH] KVM: forward declare structs in kvm_types.h

2014-08-29 Thread Christian Borntraeger
On 29/08/14 14:01, Paolo Bonzini wrote: > Opaque KVM structs are useful for prototypes in asm/kvm_host.h, to avoid > "'struct foo' declared inside parameter list" warnings (and consequent > breakage due to conflicting types). > > Move them from individual files to a generic place in linux/kvm_type

[PATCH] s390/locking: Reenable optimistic spinning

2014-08-05 Thread Christian Borntraeger
. (We dont implement cmpxchg with locks). Please note: This is a quick fix for s390, suitable for stable as 3.16 unintenionally disabled optimistic spinning. The proper fix is probably to use ARCH_HAVE_NMI_SAFE_CMPXCHG instead of introducing ARCH_SUPPORTS_ATOMIC_RMW. Signed-off-by: Christian

Re: [PATCH block/for-linus] blk-mq: make mq_queue_reinit_notify() freeze queues in parallel

2014-11-04 Thread Christian Borntraeger
gt; queues are frozen in parallel instead of one after another. Note that > freezing and unfreezing are moved from blk_mq_queue_reinit() to > blk_mq_queue_reinit_notify(). > > Signed-off-by: Tejun Heo > Reported-by: Christian Borntraeger Tested-by: Christian Borntraeger Thanks

blk-mq vs cpu hotplug performance (due to percpu_ref_put performance)

2014-10-28 Thread Christian Borntraeger
Tejun, when going from 3.17 to 3.18-rc2 cpu hotplug become horrible slow on some KVM guests on s390 I was able to bisect this to commit 9eca80461a45177e456219a9cd944c27675d6512 ("Revert "blk-mq, percpu_ref: implement a kludge for SCSI blk-mq stall during probe") Seems that this is due to all

Re: blk-mq vs cpu hotplug performance (due to percpu_ref_put performance)

2014-10-28 Thread Christian Borntraeger
Am 28.10.2014 21:00, schrieb Tejun Heo: > Hello, > > On Tue, Oct 28, 2014 at 08:35:39PM +0100, Christian Borntraeger wrote: >> when going from 3.17 to 3.18-rc2 cpu hotplug become horrible slow on some >> KVM guests on s390 >> >> I was ab

Re: blk-mq vs cpu hotplug performance (due to percpu_ref_put performance)

2014-10-28 Thread Christian Borntraeger
Am 28.10.2014 21:22, schrieb Tejun Heo: > On Tue, Oct 28, 2014 at 09:20:55PM +0100, Christian Borntraeger wrote: >> I have not verified this, but I guess what happens is: >> hotplug >> -> notify >> -> blk_mq_queue_reinit_notify >> -> blk

[PATCH] compiler.h: cast away attributes in WRITE_ONCE magic

2015-08-04 Thread Christian Borntraeger
lets split the macro. Signed-off-by: Christian Borntraeger --- include/linux/compiler.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index e08a6ae..c836eb2 100644 --- a/include/linux/compiler.h +++ b/include/linux/

[PATCH] Fixup for WRITE_ONCE vs. sparse

2015-08-04 Thread Christian Borntraeger
here is a fixup for WRITE_ONCE dealing with rcu accesses. I did some cross compiles as well as some sparse checkings. I pushed this out to git.kernel.org/cgit/linux/kernel/git/borntraeger/linux.git linux-next so hoepfully kbuild-bot will tell if there is a problem Christian Borntraeger (1

Re: [PATCH] compiler.h: cast away attributes in WRITE_ONCE magic

2015-08-04 Thread Christian Borntraeger
Am 04.08.2015 um 11:20 schrieb Peter Zijlstra: > On Tue, Aug 04, 2015 at 09:55:48AM +0200, Christian Borntraeger wrote: >> kernel build bot showed a warning triggered by commit >> 76695af20c01 ("locking, arch: use WRITE_ONCE()/READ_ONCE() in >> smp_store_release()/smp_l

4.1: 9a0e609e3fd ("dm: only run the queue on completion if ....") causes significant overhead in osq_lock on ext4/multipath

2015-07-08 Thread Christian Borntraeger
not sure if this actually a mutex/s390/dm or ext4 problem, but it bisects down to a dm commit: Mike, commit 9a0e609e3fd8a95c96629b9fbde6b8c5b9a1456a ("dm: only run the queue on completion if congested or no requests pending") causes a significant overhead if multiple processes access the same f

Re: [PATCH 2/4] KVM: document memory barriers for kvm->vcpus/kvm->online_vcpus

2015-07-30 Thread Christian Borntraeger
Am 29.07.2015 um 15:28 schrieb Paolo Bonzini: > Signed-off-by: Paolo Bonzini > --- > include/linux/kvm_host.h | 4 > virt/kvm/kvm_main.c | 2 ++ > 2 files changed, 6 insertions(+) > > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h > index bd1097a95704..81089cf1f0c1 10

Re: [PATCH 2/4] KVM: document memory barriers for kvm->vcpus/kvm->online_vcpus

2015-07-30 Thread Christian Borntraeger
Am 30.07.2015 um 14:46 schrieb Paolo Bonzini: > > > On 30/07/2015 13:40, Christian Borntraeger wrote: >>>> + /* Pairs with smp_wmb() in kvm_vm_ioctl_create_vcpu, in case >>>> + * the caller has read kvm->online_vcpus before (as is the case >>&

Re: [PATCH 2/4] KVM: document memory barriers for kvm->vcpus/kvm->online_vcpus

2015-07-30 Thread Christian Borntraeger
Am 30.07.2015 um 16:02 schrieb Paolo Bonzini: > > > On 30/07/2015 15:57, Christian Borntraeger wrote: >>>>>> +/* Pairs with smp_wmb() in kvm_vm_ioctl_create_vcpu, in case >>>>>> + * the caller has read kvm->online_vcp

Re: [PATCH] kvm:s390:Fix assumption that kvm_set_irq_routing is always run successfully

2015-08-07 Thread Christian Borntraeger
Am 06.08.2015 um 19:05 schrieb Nicholas Krause: > This fixes the assumption that kvm_set_irq_routing is always run > successfully by instead making it equal to the variable r which > we use for returning in the function kvm_arch_vm_ioctl instead > of making r equal to zero when calling this particu

Re: [PATCH v2 1/5] KVM: add kvm_has_request wrapper

2015-08-12 Thread Christian Borntraeger
Am 05.08.2015 um 18:32 schrieb Radim Krčmář: > We want to have requests abstracted from bit operations. > > Signed-off-by: Radim Krčmář > --- kvm_check_request is now somewhat a misnomer (what is the difference between test and check?) but still Acked-by: Christian Borntraeger

Re: [PATCH v2 5/5] KVM: refactor asynchronous vcpu ioctl dispatch

2015-08-12 Thread Christian Borntraeger
Am 05.08.2015 um 18:33 schrieb Radim Krčmář: > I find the switch easier to read and modify. yes. > Signed-off-by: Radim Krčmář > --- > v2: new > > virt/kvm/kvm_main.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c >

Re: [PATCH v2 1/5] KVM: add kvm_has_request wrapper

2015-08-13 Thread Christian Borntraeger
Am 13.08.2015 um 11:29 schrieb Paolo Bonzini: > > > On 13/08/2015 11:11, Radim Krčmář wrote: for the new interface. maybe we can rename kvm_check_request in a separate patch somewhen. >> I wonder why haven't we copied the naming convention from bit operations >> (or if programming woul

Re: [PATCH v2] virt: IRQ bypass manager

2015-07-17 Thread Christian Borntraeger
Am 16.07.2015 um 23:26 schrieb Alex Williamson: > When a physical I/O device is assigned to a virtual machine through > facilities like VFIO and KVM, the interrupt for the device generally > bounces through the host system before being injected into the VM. > However, hardware technologies exist th

Re: [PATCH v3] KVM: halt-polling: poll if emulated lapic timer will fire soon

2016-05-24 Thread Christian Borntraeger
On 05/24/2016 04:25 AM, Wanpeng Li wrote: > 2016-05-24 10:19 GMT+08:00 Wanpeng Li : >> 2016-05-24 2:01 GMT+08:00 David Matlack : >>> On Sun, May 22, 2016 at 5:42 PM, Wanpeng Li wrote: From: Wanpeng Li >>> >>> I'm ok with this patch, but I'd like to better understand the target >>> workloads.

Re: [PATCH v4] KVM: halt-polling: poll for the upcoming fire timers

2016-05-24 Thread Christian Borntraeger
- --- > kernel Linux 4.6.0+ 7.9800 11.0 10.8 14.6 9.430013.010.2 > vanilla > kernel Linux 4.6.0+ 15.3 13.6 10.7 12.5 9. 12.8 7.38000 > poll > > Cc: Paolo Bonzini > Cc: Radim Krčmář > Cc: David Matlack > Cc: Christian Borntraeg

Re: [PATCH] KVM: halt-polling: poll if emulated lapic timer will fire soon

2016-05-19 Thread Christian Borntraeger
On 05/19/2016 11:26 AM, Wanpeng Li wrote: I think in general a good idea to poll if a timer will expire soon. Some patch comments: Same for all non-x86 archs: > +static inline unsigned int kvm_arch_timer_remaining(struct kvm_vcpu *vcpu) {} A function returning int, without a return statement?

Re: [PATCH] KVM: halt-polling: poll if emulated lapic timer will fire soon

2016-05-19 Thread Christian Borntraeger
On 05/19/2016 01:35 PM, Wanpeng Li wrote: > 2016-05-19 19:23 GMT+08:00 Christian Borntraeger : >> On 05/19/2016 11:26 AM, Wanpeng Li wrote: >> >> I think in general a good idea to poll if a timer will expire soon. >> >> Some patch comments: >> >> S

Re: [PATCH] KVM: halt-polling: poll if emulated lapic timer will fire soon

2016-05-19 Thread Christian Borntraeger
On 05/19/2016 01:48 PM, Wanpeng Li wrote: > 2016-05-19 19:42 GMT+08:00 Christian Borntraeger : >> On 05/19/2016 01:35 PM, Wanpeng Li wrote: >>> 2016-05-19 19:23 GMT+08:00 Christian Borntraeger : >>>> On 05/19/2016 11:26 AM, Wanpeng Li wrote: >>>> >&g

Re: [PATCH v2] KVM: halt-polling: poll if emulated lapic timer will fire soon

2016-05-19 Thread Christian Borntraeger
gt; Cc: Paolo Bonzini > Cc: Radim Krčmář > Cc: David Matlack > Cc: Christian Borntraeger > Signed-off-by: Wanpeng Li Looks good to me. I have not checked what happens when I provide an s390 implementation so I cannot say anything about performance. It looks like it does not hurt

Re: [PATCH v2] KVM: halt-polling: poll if emulated lapic timer will fire soon

2016-05-19 Thread Christian Borntraeger
On 05/19/2016 03:57 PM, Paolo Bonzini wrote: > > > On 19/05/2016 15:27, Wanpeng Li wrote: >> From: Wanpeng Li >> >> If an emulated lapic timer will fire soon(in the scope of 10us the >> base of dynamic halt-polling, lower-end of message passing workload >> latency TCP_RR's poll time < 10us) we c

Re: [PATCH v2] KVM: halt-polling: poll if emulated lapic timer will fire soon

2016-05-19 Thread Christian Borntraeger
On 05/19/2016 04:56 PM, Paolo Bonzini wrote: > > > On 19/05/2016 16:52, Christian Borntraeger wrote: >>>> Would this work too and be simpler? >> Hmm, your patch does only fiddle with the grow/shrink logic (which might >> be a good idea independently of thi

Re: [PATCH v2] KVM: halt-polling: poll if emulated lapic timer will fire soon

2016-05-19 Thread Christian Borntraeger
On 05/19/2016 05:06 PM, Paolo Bonzini wrote: > > > On 19/05/2016 17:03, Christian Borntraeger wrote: >>>> Would this work too and be simpler? >>>> Hmm, your patch does only fiddle with the grow/shrink logic (which might >>>> be a good idea independ

4.6.0-rc3+: WARNING: CPU: 16 PID: 17257 at fs/btrfs/inode.c:9261 btrfs_destroy_inode

2016-04-27 Thread Christian Borntraeger
Folks, I can sometimes trigger the following bug [ 244.493534] [ cut here ] [ 244.493624] WARNING: CPU: 16 PID: 17257 at fs/btrfs/inode.c:9261 btrfs_destroy_inode+0x288/0x2b0 [btrfs] [ 244.493626] Kernel panic - not syncing: panic_on_warn set ... [ 244.493629] CPU: 1

Re: [PATCH 4.3 090/125] KVM: s390: fix wrong lookup of VCPUs by array index

2015-12-07 Thread Christian Borntraeger
vcpu() for validation of the sending VCPU > on external call injection. > > Reviewed-by: Christian Borntraeger > Signed-off-by: David Hildenbrand > Signed-off-by: Christian Borntraeger > Signed-off-by: Greg Kroah-Hartman > > --- > arch/s390/kvm/interrupt.c |3 +-- &

Re: [PATCH 2/2] s390/mm: allow gmap code to retry on faulting in guest memory

2015-11-19 Thread Christian Borntraeger
On 11/19/2015 09:18 AM, Martin Schwidefsky wrote: > On Thu, 19 Nov 2015 00:49:58 +0100 > Dominik Dingel wrote: > >> The userfaultfd does need FAULT_FLAG_ALLOW_RETRY to not return >> VM_FAULT_SIGBUS. So we improve the gmap code to handle one >> VM_FAULT_RETRY. >> >> Signed-off-by: Dominik Dingel

Re: linux-next: manual merge of the kvms390 tree with the kvm tree

2015-11-20 Thread Christian Borntraeger
On 11/20/2015 02:47 AM, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the kvms390 tree got a conflict in: > > include/linux/kvm_host.h > arch/s390/kvm/interrupt.c > arch/s390/kvm/sigp.c > > between commits: > > db27a7a37aa0 ("KVM: Provide function for VCPU lookup by

Re: [PATCH v2] vhost: replace % with & on data path

2015-11-30 Thread Christian Borntraeger
On 11/30/2015 10:15 AM, Michael S. Tsirkin wrote: > We know vring num is a power of 2, so use & > to mask the high bits. Makes a lot of sense and virtio_ring.c seems to use the same logic. Acked-by: Christian Borntraeger > > Signed-off-by: Michael S. Tsirkin > --- > &

Re: [PATCH v7 0/3] KVM: Dynamic Halt-Polling

2015-09-10 Thread Christian Borntraeger
Am 10.09.2015 um 03:55 schrieb Wanpeng Li: > On 9/9/15 9:39 PM, Christian Borntraeger wrote: >> Am 03.09.2015 um 16:07 schrieb Wanpeng Li: >>> v6 -> v7: >>> * explicit signal (set a bool) >>> * fix the tracepoint >>> >>> v5 -> v6: &

Re: linux-next: Tree for Sep 10

2015-09-10 Thread Christian Borntraeger
Am 10.09.2015 um 06:02 schrieb Stephen Rothwell: > Hi all, > > Please do not add material for v4.4 until after v4.3-rc1 is out. > [...] > The kvm tree still had its build failure for which I reverted a commit. [..] > Merging kvm/linux-next (2cbd78244fb2 KVM: trace kvm_halt_poll_ns grow/shrink) >

Re: [PATCH 2/3] virtio_ring: Support DMA APIs

2015-10-27 Thread Christian Borntraeger
Am 28.10.2015 um 10:17 schrieb Andy Lutomirski: @@ -423,27 +522,42 @@ EXPORT_SYMBOL_GPL(virtqueue_kick); > > static void detach_buf(struct vring_virtqueue *vq, unsigned int head) > { > - unsigned int i; > + unsigned int i, j; > + u16 nextflag = cpu_to_virtio16(vq->vq.vdev, VRING_DESC

Re: [PATCH v2 2/3] virtio_ring: Support DMA APIs

2015-10-27 Thread Christian Borntraeger
Am 28.10.2015 um 14:30 schrieb Andy Lutomirski: > +static void vring_unmap_one(const struct vring_virtqueue *vq, > + struct vring_desc *desc) > +{ > + u16 flags = virtio16_to_cpu(vq->vq.vdev, desc->flags); > + > + if (flags & VRING_DESC_F_INDIRECT) { > +

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-10-28 Thread Christian Borntraeger
Am 28.10.2015 um 16:17 schrieb Michael S. Tsirkin: > On Tue, Oct 27, 2015 at 11:38:57PM -0700, Andy Lutomirski wrote: >> This switches virtio to use the DMA API unconditionally. I'm sure >> it breaks things, but it seems to work on x86 using virtio-pci, with >> and without Xen, and using both the

Re: [PATCH v2 2/3] virtio_ring: Support DMA APIs

2015-10-28 Thread Christian Borntraeger
Am 28.10.2015 um 15:04 schrieb David Woodhouse: > On Wed, 2015-10-28 at 14:52 +0900, Christian Borntraeger wrote: >>0059b25a: e3201024 lg %r2,32(%r1) >> #0059b260: e310b0a4 lg %r1,160(%r11) >> >00

Re: regression 4.4: deadlock in with cgroup percpu_rwsem

2016-01-21 Thread Christian Borntraeger
On 01/20/2016 11:53 AM, Peter Zijlstra wrote: > On Wed, Jan 20, 2016 at 11:30:36AM +0100, Peter Zijlstra wrote: >> On Wed, Jan 20, 2016 at 11:15:05AM +0100, Christian Borntraeger wrote: >>> [ 561.044066] Krnl PSW : 0704e0018000 001aa1ee >>> (remove

Re: [PATCH 1/2] cgroup: make sure a parent css isn't offlined before its children

2016-01-22 Thread Christian Borntraeger
atches I always run into the dio/scsi problem, but never in the css issue. So I cannot test a full day or so, but it looks like the problem is gone. At least it worked multiple times for 30minutes or so until my system was killed by the io issue. Tested-by: Christian Borntraeger

spurious use after free bug in dio_bio_complete on scsi disks (with multipath)

2016-01-22 Thread Christian Borntraeger
When I enable DEBUG_PAGEALLOC (notice: needs also enablement on the command line) I get spurious warnings like the following [ 2664.756567] Unable to handle kernel pointer dereference in virtual kernel address space [ 2664.756575] failing address: 00f9ef84c000 TEID: 00f9ef84c803 [ 2664.7

[PATCH 1/1] debugobjects: Allow bigger number of objects

2016-01-22 Thread Christian Borntraeger
On my bigger s390 systems I always get "Out of memory. ODEBUG disabled". Since the number of objects is needed at compile time in the code, let's provide a Kconfig variable to increase the number of static objects. Signed-off-by: Christian Borntraeger --- lib/Kcon

[PATCH/RFC] mm/debug_pagealloc: enable it by default

2016-01-22 Thread Christian Borntraeger
g/<56a20f30.4050...@de.ibm.com> as this behaviour change was not even documented in Kconfig. Let's go back to the original default and reverse the command line parameter to allow disabling the feature. Cc: Joonsoo Kim Signed-off-by: Christian Borntraeger --- Documentation/kernel-para

Re: [PATCH] lib/bug: make panic_on_warn available for all architectures

2016-01-22 Thread Christian Borntraeger
On 01/22/2016 02:12 PM, Heiko Carstens wrote: > Christian Borntraeger reported that panic_on_warn doesn't have any > effect on s390. > > The panic_on_warn feature was introduced with 9e3961a09798 ("kernel: > add panic_on_warn"). However it did care only for the cas

Re: [PATCH cgroup/for-4.5-fixes] cpuset: make mm migration asynchronous

2016-01-22 Thread Christian Borntraeger
ngling mm migration with process > management synchronization. CPU hotplug can also invoke mm migration > but there's no reason for it to wait for mm migrations and thus > doesn't synchronize against their completions. > > Signed-off-by: Tejun Heo > Reported-and-teste

Re: [PATCH cgroup/for-4.5-fixes] cpuset: make mm migration asynchronous

2016-01-22 Thread Christian Borntraeger
On 01/22/2016 04:22 PM, Tejun Heo wrote: > Hello, Christian. > > On Fri, Jan 22, 2016 at 03:24:40PM +0100, Christian Borntraeger wrote: >> Hmmm I just realized that this patch slightly differs from the one that >> I tested. Do we need a retest? > > It should be fine bu

Re: [PATCH RFC] mm: Rework virtual memory accounting

2016-01-22 Thread Christian Borntraeger
On 12/28/2015 11:22 PM, Linus Torvalds wrote: > On Mon, Dec 28, 2015 at 1:10 PM, Cyrill Gorcunov wrote: >> Really sorry for delays. Konstantin, I slightly updated the >> changelog (to point where problem came from). Linus are you >> fine with accounting not only anonymous memory in VmData? > > Th

Re: [PATCH v2 22/32] s390: define __smp_xxx

2016-01-05 Thread Christian Borntraeger
On 01/05/2016 10:30 AM, Michael S. Tsirkin wrote: > > arch/s390/kernel/vdso.c:smp_mb(); > > Looking at > Author: Christian Borntraeger > Date: Fri Sep 11 16:23:06 2015 +0200 > > s390/vdso: use correct memory barrier > >

Re: [BUG] random kernel crashes after THP rework on s390 (maybe also on PowerPC and ARM)

2016-02-16 Thread Christian Borntraeger
On 02/15/2016 10:35 PM, Kirill A. Shutemov wrote: > > Is there any chance that I'll be able to trigger the bug using QEMU? > Does anybody have an QEMU image I can use? qemu/TCG on s390 does neither provide SMP nor large pages (only QEMU/KVM does) so this will probably not help you here. Christi

Re: [PATCH V3 3/3] vhost_net: basic polling support

2016-02-28 Thread Christian Borntraeger
On 02/26/2016 09:42 AM, Jason Wang wrote: > This patch tries to poll for new added tx buffer or socket receive > queue for a while at the end of tx/rx processing. The maximum time > spent on polling were specified through a new kind of vring ioctl. > > Signed-off-by: Jason Wang > --- > drivers/v

Re: [BUG] random kernel crashes after THP rework on s390 (maybe also on PowerPC and ARM)

2016-02-24 Thread Christian Borntraeger
On 02/23/2016 09:22 PM, Will Deacon wrote: > On Tue, Feb 23, 2016 at 10:33:45PM +0300, Kirill A. Shutemov wrote: >> On Tue, Feb 23, 2016 at 07:19:07PM +0100, Gerald Schaefer wrote: >>> I'll check with Martin, maybe it is actually trivial, then we can >>> do a quick test it to rule that one out. >>

Re: [BUG] random kernel crashes after THP rework on s390 (maybe also on PowerPC and ARM)

2016-02-24 Thread Christian Borntraeger
On 02/24/2016 11:41 AM, Will Deacon wrote: > On Wed, Feb 24, 2016 at 11:16:34AM +0100, Christian Borntraeger wrote: >> On 02/23/2016 09:22 PM, Will Deacon wrote: >>> On Tue, Feb 23, 2016 at 10:33:45PM +0300, Kirill A. Shutemov wrote: >>>> On Tue, Feb 23, 2016 at 07:

Re: compiler bug gcc4.6/4.7 with ACCESS_ONCE and workarounds

2014-11-20 Thread Christian Borntraeger
Am 10.11.2014 um 22:07 schrieb Linus Torvalds: [...] > So before blacklisting any compilers, let's first see if > > (a) we can actually make it a real rule that we only use ACCESS_ONCE on > scalars > (b) we can somehow enforce this with a compiler warning/error for mis-uses > > For example, th

<    1   2   3   4   5   6   7   8   9   10   >