Re: [PATCH 3/3] kvm/powerpc: report guest steal time in host

2015-05-06 Thread Christian Borntraeger
Am 06.05.2015 um 13:56 schrieb Naveen N. Rao: > On powerpc, kvm tracks both the guest steal time as well as the time > when guest was idle and this gets sent in to the guest through DTL. The > guest accounts these entries as either steal time or idle time based on > the last running task. Since the

Re: [PATCH 3/3] kvm/powerpc: report guest steal time in host

2015-05-07 Thread Christian Borntraeger
Am 06.05.2015 um 18:42 schrieb Naveen N. Rao: > On 2015/05/06 02:46PM, Christian Borntraeger wrote: >> Am 06.05.2015 um 13:56 schrieb Naveen N. Rao: >>> On powerpc, kvm tracks both the guest steal time as well as the time >>> when guest was idle and this gets sent in to

Re: [PATCH v4 02/12] KVM: define common KVM_GUESTDBG_USE_SW/HW_BP bits

2015-05-15 Thread Christian Borntraeger
Am 15.05.2015 um 16:27 schrieb Alex Bennée: > +++ b/arch/s390/include/uapi/asm/kvm.h > @@ -114,8 +114,6 @@ struct kvm_fpu { > __u64 fprs[16]; > }; > > -#define KVM_GUESTDBG_USE_HW_BP 0x0001 [...] > +++ b/include/uapi/linux/kvm.h [...] > +#define KVM_GUESTDBG_USE_SW_BP

Re: [PATCH v4 02/12] KVM: define common KVM_GUESTDBG_USE_SW/HW_BP bits

2015-05-15 Thread Christian Borntraeger
Am 15.05.2015 um 16:27 schrieb Alex Bennée: > index ef1a5fc..aca4f86 100644 > --- a/arch/s390/include/uapi/asm/kvm.h > +++ b/arch/s390/include/uapi/asm/kvm.h > @@ -114,8 +114,6 @@ struct kvm_fpu { > __u64 fprs[16]; > }; > > -#define KVM_GUESTDBG_USE_HW_BP 0x0001 > - > di

Re: [PATCH 0/5] Remove s390 sw-emulated hugepages and cleanup

2015-06-01 Thread Christian Borntraeger
Am 28.05.2015 um 13:52 schrieb Dominik Dingel: > Hi everyone, > > there is a potential bug with KVM and hugetlbfs if the hardware does not > support hugepages (EDAT1). > We fix this by making EDAT1 a hard requirement for hugepages and > therefore removing and simplifying code. The cleanup itself

Re: [RFC 0/2] Reenable might_sleep() checks for might_fault() when atomic

2014-11-26 Thread Christian Borntraeger
Am 26.11.2014 um 16:17 schrieb Michael S. Tsirkin: > On Wed, Nov 26, 2014 at 11:05:04AM +0100, David Hildenbrand wrote: >>> What's the path you are trying to debug? >> >> Well, we had a problem where we held a spin_lock and called >> copy_(from|to)_user(). We experienced very random deadlocks that

Re: [RFC 0/2] Reenable might_sleep() checks for might_fault() when atomic

2014-11-26 Thread Christian Borntraeger
Am 26.11.2014 um 16:37 schrieb Michael S. Tsirkin: > On Wed, Nov 26, 2014 at 04:30:32PM +0100, Christian Borntraeger wrote: >> Am 26.11.2014 um 16:17 schrieb Michael S. Tsirkin: >>> On Wed, Nov 26, 2014 at 11:05:04AM +0100, David Hildenbrand wrote: >>>>> What&#

Re: [RFC 0/2] Reenable might_sleep() checks for might_fault() when atomic

2014-11-26 Thread Christian Borntraeger
Am 26.11.2014 um 16:47 schrieb Michael S. Tsirkin: > On Wed, Nov 26, 2014 at 04:32:07PM +0100, David Hildenbrand wrote: >>> On Wed, Nov 26, 2014 at 05:17:29PM +0200, Michael S. Tsirkin wrote: On Wed, Nov 26, 2014 at 11:05:04AM +0100, David Hildenbrand wrote: >> What's the path you are tryi

Re: [RFC 0/2] Reenable might_sleep() checks for might_fault() when atomic

2014-11-26 Thread Christian Borntraeger
Am 26.11.2014 um 17:19 schrieb Michael S. Tsirkin: > On Wed, Nov 26, 2014 at 05:02:23PM +0100, David Hildenbrand wrote: This is what happened on our side (very recent kernel): spin_lock(&lock) copy_to_user(...) spin_unlock(&lock) >>> >>> That's a deadlock even without copy_

Re: [RFC 0/2] Reenable might_sleep() checks for might_fault() when atomic

2014-11-26 Thread Christian Borntraeger
Am 26.11.2014 um 17:32 schrieb Michael S. Tsirkin: [...] This is what happened on our side (very recent kernel): spin_lock(&lock) copy_to_user(...) spin_unlock(&lock) >>> >>> That's a deadlock even without copy_to_user - it's >>> enough for the thread to be preempted and an

Re: linux-next: build failure after merge of the access_once tree

2014-12-08 Thread Christian Borntraeger
Am 08.12.2014 um 12:26 schrieb Stephen Rothwell: > Hi Christian, > > After merging the acess_once tree, today's linux-next build (powerpc > allnoconfig) failed like this: > > arch/powerpc/mm/hugetlbpage.c: In function 'find_linux_pte_or_hugepte': > arch/powerpc/mm/hugetlbpage.c:981:3: error: inva

Re: linux-next: build failure after merge of the access_once tree

2014-12-09 Thread Christian Borntraeger
Am 08.12.2014 um 12:26 schrieb Stephen Rothwell: > Hi Christian, > > After merging the acess_once tree, today's linux-next build (powerpc > allnoconfig) failed like this: > > arch/powerpc/mm/hugetlbpage.c: In function 'find_linux_pte_or_hugepte': > arch/powerpc/mm/hugetlbpage.c:981:3: error: inva

[PATCH 2/8] ppc/hugetlbfs: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread Christian Borntraeger
READ_ONCE. Signed-off-by: Christian Borntraeger --- arch/powerpc/mm/hugetlbpage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 5ff4e07..620d0ec 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch

[PATCH 1/8] ppc/kvm: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread Christian Borntraeger
READ_ONCE. Signed-off-by: Christian Borntraeger --- arch/powerpc/kvm/book3s_hv_rm_xics.c | 8 arch/powerpc/kvm/book3s_xics.c | 16 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/kvm/book3s_hv_rm_xics.c b/arch/powerpc/kvm

[PATCH 0/8] current ACCESS_ONCE patch queue

2015-01-15 Thread Christian Borntraeger
Folks, fyi, this is my current patch queue for the next merge window. It does contain a patch that will disallow ACCESS_ONCE on non-scalar types. The tree is part of linux-next and can be found at git://git.kernel.org/pub/scm/linux/kernel/git/borntraeger/linux.git linux-next Christian

[PATCH 5/8] mm/gup: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread Christian Borntraeger
ACCESS_ONCE does not work reliably on non-scalar types. For example gcc 4.6 and 4.7 might remove the volatile tag for such accesses during the SRA (scalar replacement of aggregates) step (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145) Fixup gup_pmd_range. Signed-off-by: Christian

[PATCH 4/8] x86/spinlock: Leftover conversion ACCESS_ONCE->READ_ONCE

2015-01-15 Thread Christian Borntraeger
commit 78bff1c8684f ("x86/ticketlock: Fix spin_unlock_wait() livelock") introduced another ACCESS_ONCE case in x86 spinlock.h. Change that as well. Signed-off-by: Christian Borntraeger Cc: Oleg Nesterov --- arch/x86/include/asm/spinlock.h | 2 +- 1 file changed, 1 insertion(+),

[PATCH 3/8] x86/xen/p2m: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread Christian Borntraeger
. Signed-off-by: Christian Borntraeger --- arch/x86/xen/p2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index edbc7a6..cb71016 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c @@ -554,7 +554,7 @@ static bool alloc_p2m

[PATCH 6/8] kernel: tighten rules for ACCESS ONCE

2015-01-15 Thread Christian Borntraeger
Now that all non-scalar users of ACCESS_ONCE have been converted to READ_ONCE or ASSIGN once, lets tighten ACCESS_ONCE to only work on scalar types. This variant was proposed by Alexei Starovoitov. Signed-off-by: Christian Borntraeger Reviewed-by: Paul E. McKenney --- include/linux/compiler.h

[PATCH 8/8] kernel: Fix sparse warning for ACCESS_ONCE

2015-01-15 Thread Christian Borntraeger
so use __force on that cast. Fixes: a91ed664749c ("kernel: tighten rules for ACCESS ONCE") Signed-off-by: Christian Borntraeger --- include/linux/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 5e186bf..

[PATCH 7/8] next: sh: Fix compile error

2015-01-15 Thread Christian Borntraeger
.o] Error 1 Replace ACCESS_ONCE with READ_ONCE to fix the problem. Fixes: a91ed664749c ("kernel: tighten rules for ACCESS ONCE") Cc: Paul E. McKenney Cc: Christian Borntraeger Signed-off-by: Guenter Roeck Reviewed-by: Paul E. McKenney Signed-off-by: Christian Borntraeger --- a

Re: [Xen-devel] [PATCH 3/8] x86/xen/p2m: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread Christian Borntraeger
Am 15.01.2015 um 11:43 schrieb David Vrabel: > On 15/01/15 08:58, Christian Borntraeger wrote: >> ACCESS_ONCE does not work reliably on non-scalar types. For >> example gcc 4.6 and 4.7 might remove the volatile tag for such >> accesses during the SRA (scalar replacemen

Re: [PATCH 4/8] x86/spinlock: Leftover conversion ACCESS_ONCE->READ_ONCE

2015-01-15 Thread Christian Borntraeger
Am 15.01.2015 um 20:38 schrieb Oleg Nesterov: > On 01/15, Christian Borntraeger wrote: >> >> --- a/arch/x86/include/asm/spinlock.h >> +++ b/arch/x86/include/asm/spinlock.h >> @@ -186,7 +186,7 @@ static inline void arch_spin_unlock_wait(arch_spinlock_t >&g

Re: [PATCH 4/8] x86/spinlock: Leftover conversion ACCESS_ONCE->READ_ONCE

2015-01-15 Thread Christian Borntraeger
Am 15.01.2015 um 21:01 schrieb Oleg Nesterov: > On 01/15, Christian Borntraeger wrote: >> >> Am 15.01.2015 um 20:38 schrieb Oleg Nesterov: >>> On 01/15, Christian Borntraeger wrote: >>>> >>>> --- a/arch/x86/include/asm/spinlock.h >>>>

Re: [PATCH 1/8] ppc/kvm: Replace ACCESS_ONCE with READ_ONCE

2015-01-16 Thread Christian Borntraeger
Am 16.01.2015 um 00:09 schrieb Michael Ellerman: > On Thu, 2015-01-15 at 09:58 +0100, Christian Borntraeger wrote: >> ACCESS_ONCE does not work reliably on non-scalar types. For >> example gcc 4.6 and 4.7 might remove the volatile tag for such >> accesses during the SRA (

Re: [PATCH 5/6] mm/gup: Replace ACCESS_ONCE with READ_ONCE for STRICT_MM_TYPECHECKS

2015-03-25 Thread Christian Borntraeger
Am 25.03.2015 um 10:11 schrieb Michael Ellerman: > If STRICT_MM_TYPECHECKS is enabled the generic gup code fails to build > because we are using ACCESS_ONCE on non-scalar types. > > Convert all uses to READ_ONCE. There is a similar patch from Jason Low in Andrews patch. If that happens in 4.0-rc,

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: [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: [PATCH v7 1/4] perf,kvm/{x86,s390}: Remove dependency on uapi/kvm_perf.h

2015-09-28 Thread Christian Borntraeger
Am 24.09.2015 um 21:02 schrieb Hemant Kumar: > Its better to remove the dependency on uapi/kvm_perf.h to allow dynamic > discovery of kvm events (if its needed). To do this, some extern > variables have been introduced with which we can keep the generic > functions generic. > > Signed-off-by: Hema

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 > >

[PATCH v2 3/3] s390: query dynamic DEBUG_PAGEALLOC setting

2016-01-27 Thread Christian Borntraeger
We can use debug_pagealloc_enabled() to check if we can map the identity mapping with 1MB/2GB pages as well as to print the current setting in dump_stack. Signed-off-by: Christian Borntraeger --- arch/s390/kernel/dumpstack.c | 8 arch/s390/mm/vmem.c | 10 -- 2 files

[PATCH v2 0/3] Optimize CONFIG_DEBUG_PAGEALLOC

2016-01-27 Thread Christian Borntraeger
ith DEBUG_PAGEALLOC dump_stack for s390/x86 - add /* CONFIG_DEBUG_PAGEALLOC */ to else and endif Christian Borntraeger (3): mm: provide debug_pagealloc_enabled() without CONFIG_DEBUG_PAGEALLOC x86: query dynamic DEBUG_PAGEALLOC setting s390: query dynamic DEBUG_PAGEALLOC setting arch/s390/ker

[PATCH v2 2/3] x86: query dynamic DEBUG_PAGEALLOC setting

2016-01-27 Thread Christian Borntraeger
: Christian Borntraeger --- arch/x86/kernel/dumpstack.c | 5 ++--- arch/x86/mm/init.c | 7 --- arch/x86/mm/pageattr.c | 14 -- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index 9c30acf..32e5699

[PATCH v2 1/3] mm: provide debug_pagealloc_enabled() without CONFIG_DEBUG_PAGEALLOC

2016-01-27 Thread Christian Borntraeger
We can provide debug_pagealloc_enabled() also if CONFIG_DEBUG_PAGEALLOC is not set. It will return false in that case. Signed-off-by: Christian Borntraeger Acked-by: David Rientjes --- include/linux/mm.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/linux

[PATCH v3 0/3] Optimize CONFIG_DEBUG_PAGEALLOC

2016-01-27 Thread Christian Borntraeger
eplace DEBUG_PAGEALLOC(disabled/enabled) with DEBUG_PAGEALLOC dump_stack for s390/x86 - add /* CONFIG_DEBUG_PAGEALLOC */ to else and endif Christian Borntraeger (3): mm: provide debug_pagealloc_enabled() without CONFIG_DEBUG_PAGEALLOC x86: query dynamic DEBUG_PAGEALLOC setting s390: query d

[PATCH v3 3/3] s390: query dynamic DEBUG_PAGEALLOC setting

2016-01-27 Thread Christian Borntraeger
We can use debug_pagealloc_enabled() to check if we can map the identity mapping with 1MB/2GB pages as well as to print the current setting in dump_stack. Signed-off-by: Christian Borntraeger Reviewed-by: Heiko Carstens --- arch/s390/kernel/dumpstack.c | 6 +++--- arch/s390/mm/vmem.c

[PATCH v3 2/3] x86: query dynamic DEBUG_PAGEALLOC setting

2016-01-27 Thread Christian Borntraeger
: Christian Borntraeger Reviewed-by: Thomas Gleixner --- arch/x86/kernel/dumpstack.c | 5 ++--- arch/x86/mm/init.c | 7 --- arch/x86/mm/pageattr.c | 14 -- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel

[PATCH v3 1/3] mm: provide debug_pagealloc_enabled() without CONFIG_DEBUG_PAGEALLOC

2016-01-27 Thread Christian Borntraeger
We can provide debug_pagealloc_enabled() also if CONFIG_DEBUG_PAGEALLOC is not set. It will return false in that case. Signed-off-by: Christian Borntraeger Acked-by: David Rientjes Acked-by: Thomas Gleixner --- include/linux/mm.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions

Re: [PATCH v3 2/3] x86: query dynamic DEBUG_PAGEALLOC setting

2016-01-28 Thread Christian Borntraeger
On 01/27/2016 11:17 PM, David Rientjes wrote: > On Wed, 27 Jan 2016, Christian Borntraeger wrote: > >> We can use debug_pagealloc_enabled() to check if we can map >> the identity mapping with 2MB pages. We can also add the state >> into the dump_stack output. >> &

Re: [PATCH v3 2/3] x86: query dynamic DEBUG_PAGEALLOC setting

2016-02-02 Thread Christian Borntraeger
On 02/02/2016 10:51 PM, David Rientjes wrote: > On Thu, 28 Jan 2016, David Rientjes wrote: > >> On Thu, 28 Jan 2016, Christian Borntraeger wrote: >> >>> Indeed, I only touched the identity mapping and dump stack. >>> The question is do we really want to cha

Re: [PATCH v3 2/3] x86: query dynamic DEBUG_PAGEALLOC setting

2016-02-02 Thread Christian Borntraeger
On 02/02/2016 11:21 PM, Andrew Morton wrote: > On Tue, 2 Feb 2016 22:53:36 +0100 Christian Borntraeger > wrote: > >>>> I don't think we should have a CONFIG_DEBUG_PAGEALLOC that does some stuff >>>> and then a commandline parameter or CONFIG_DEBUG_PAGEALL

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

2016-02-12 Thread Christian Borntraeger
On 02/12/2016 04:41 PM, Kirill A. Shutemov wrote: > On Thu, Feb 11, 2016 at 08:57:02PM +0100, Gerald Schaefer wrote: >> On Thu, 11 Feb 2016 21:09:42 +0200 >> "Kirill A. Shutemov" wrote: >> >>> On Thu, Feb 11, 2016 at 07:22:23PM +0100, Gerald Schaefer wrote: Hi, Sebastian Ott reporte

Re: [PATCH 1/4] hugetlbfs: add arch_hugetlb_valid_size

2020-03-25 Thread Christian Borntraeger
On 25.03.20 03:58, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: [...] > Hi Mike, > > Inspired by Dave's opinion, it seems the x86-specific hugepages_supported > should > also need to use cpu_feature_enabled instead. > > Also, I wonder if the hugepages_supported is corre

Re: [PATCH 27/28] s390: use __vmalloc_node in alloc_vm_stack

2020-04-08 Thread Christian Borntraeger
On 08.04.20 13:59, Christoph Hellwig wrote: > alloc_vm_stack can use a slightly higher level vmalloc function. > > Signed-off-by: Christoph Hellwig > --- > arch/powerpc/kernel/irq.c | 5 ++--- wrong subject (power vs s390) > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/arc

Re: [PATCH 28/28] s390: use __vmalloc_node in stack_alloc

2020-04-08 Thread Christian Borntraeger
; - __builtin_return_address(0)); > + return (unsigned long)__vmalloc_node(THREAD_SIZE, THREAD_SIZE, > + THREADINFO_GFP, NUMA_NO_NODE, > + __builtin_return_address(0)); Looks sane. Acked-by: Chri

Re: [PATCH] vhost: do not enable VHOST_MENU by default

2020-04-14 Thread Christian Borntraeger
G_VHOST_MENU is > not set". So this patch tries to enable CONFIG_VHOST explicitly in > defconfigs that enables CONFIG_VHOST_NET and CONFIG_VHOST_VSOCK. > > Cc: Thomas Bogendoerfer > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Michael Ellerman > Cc: Heiko Carst

Re: [PATCH 1/7] KVM: s390: clean up redundant 'kvm_run' parameters

2020-04-20 Thread Christian Borntraeger
On 19.04.20 09:51, Tianjia Zhang wrote: > In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' > structure. Earlier than historical reasons, many kvm-related function > parameters retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time. > This patch does a unified cl

Re: [PATCH v2 1/7] KVM: s390: clean up redundant 'kvm_run' parameters

2020-04-22 Thread Christian Borntraeger
On 22.04.20 15:45, Cornelia Huck wrote: > On Wed, 22 Apr 2020 20:58:04 +0800 > Tianjia Zhang wrote: > >> In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' >> structure. Earlier than historical reasons, many kvm-related function > > s/Earlier than/For/ ? > >> parameter

Re: [PATCH v2 1/7] KVM: s390: clean up redundant 'kvm_run' parameters

2020-04-23 Thread Christian Borntraeger
On 23.04.20 12:58, Tianjia Zhang wrote: > > > On 2020/4/23 18:39, Cornelia Huck wrote: >> On Thu, 23 Apr 2020 11:01:43 +0800 >> Tianjia Zhang wrote: >> >>> On 2020/4/23 0:04, Cornelia Huck wrote: >>>> On Wed, 22 Apr 2020 17:58:04 +0200 >

Re: [PATCH v2 0/5] Statsfs: a new ram-based file sytem for Linux kernel statistics

2020-05-05 Thread Christian Borntraeger
Adding Stefan Raspl, who has done a lot of kvm_stat work in the past. On 05.05.20 19:21, Paolo Bonzini wrote: > On 05/05/20 19:07, David Rientjes wrote: >>> I am totally in favor of having a binary format, but it should be >>> introduced as a separate series on top of this one---and preferably by

Re: [PATCH v2 2/2] mm: speed up mremap by 500x on large regions

2018-10-15 Thread Christian Borntraeger
On 10/12/2018 03:37 AM, Joel Fernandes (Google) wrote: > Android needs to mremap large regions of memory during memory management > related operations. The mremap system call can be really slow if THP is > not enabled. The bottleneck is move_page_tables, which is copying each > pte at a time, an

Re: [PATCH 1/2] arch: mark syscall number 435 reserved for clone3

2019-07-15 Thread Christian Borntraeger
I think Vasily already has a clone3 patch for s390x with 435. On 14.07.19 21:22, Christian Brauner wrote: > A while ago Arnd made it possible to give new system calls the same > syscall number on all architectures (except alpha). To not break this > nice new feature let's mark 435 for clone3 as

Re: READ_ONCE() + STACKPROTECTOR_STRONG == :/ (was Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.5-2 tag (topic/kasan-bitops))

2019-12-12 Thread Christian Borntraeger
On 12.12.19 19:06, Will Deacon wrote: > On Thu, Dec 12, 2019 at 09:41:32AM -0800, Linus Torvalds wrote: >> On Thu, Dec 12, 2019 at 2:46 AM Peter Zijlstra wrote: >>> >>> +#ifdef GCC_VERSION < 40800 >> >> Where does that 4.8 version check come from, and why? >> >> Yeah, I know, but this really wa

Re: READ_ONCE() + STACKPROTECTOR_STRONG == :/ (was Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.5-2 tag (topic/kasan-bitops))

2019-12-18 Thread Christian Borntraeger
On 12.12.19 21:49, Linus Torvalds wrote: > On Thu, Dec 12, 2019 at 11:34 AM Will Deacon wrote: >> >> The root of my concern in all of this, and what started me looking at it in >> the first place, is the interaction with 'typeof()'. Inheriting 'volatile' >> for a pointer means that local variables

Re: [PATCH] hvc_console: returning 0 from put_chars is not an error

2009-10-15 Thread Christian Borntraeger
Am Mittwoch 14 Oktober 2009 23:53:46 schrieben Sie: > hvc_console_print() calls the HVC client driver's put_chars() callback > to write some characters to the console. If the callback returns 0, that > indicates that no characters were written (perhaps the output buffer is > full), but hvc_console

Re: [PATCH] hvc_console: returning 0 from put_chars is not an error

2009-10-15 Thread Christian Borntraeger
Am Donnerstag 15 Oktober 2009 18:09:06 schrieb Scott Wood: > On Thu, Oct 15, 2009 at 01:05:47PM +0200, Christian Borntraeger wrote: > > The fact that struct console->write returns void indicates that the > > console layer is not interested in errors. We have two policies we

Re: [PATCH] hvc_console: returning 0 from put_chars is not an error

2009-10-15 Thread Christian Borntraeger
Am Donnerstag 15 Oktober 2009 20:57:45 schrieb Scott Wood: > Doing it in the backend requires the backend to know whether it's being > called for printk or for user I/O. In the latter case, we don't want to > spin, but rather wait for an IRQ (or poll with a timer if there's no IRQ). Right. Now yo

Re: [PATCH 3/8] hvc_console: make the ops pointer const.

2009-11-10 Thread Christian Borntraeger
Am Dienstag 10 November 2009 07:27:30 schrieb Rusty Russell: > This is nicer for modern R/O protection. And noone needs it non-const, so > constify the callers as well. > > Signed-off-by: Rusty Russell > To: Christian Borntraeger > Cc: linuxppc-...@ozlabs.org > --- >

Re: Virtio_console usage of early printk

2010-03-23 Thread Christian Borntraeger
me, Christian, others, could you comment on this please? Looks good and boot tested with kuli on s390. Acked-by: Christian Borntraeger > > From 3961f380bbe84a1036ddfc823039cbee31b44dcb Mon Sep 17 00:00:00 2001 > > From: =?utf-8?q?Fran=C3=A7ois=20Diakhat=C3=A9?= > > Date: Thu,

Re: [RFC PATCH v2 1/3] mm/gup: fix gup_fast with dynamic page table folding

2020-09-08 Thread Christian Borntraeger
On 08.09.20 07:06, Christophe Leroy wrote: > > > Le 07/09/2020 à 20:00, Gerald Schaefer a écrit : >> From: Alexander Gordeev >> >> Commit 1a42010cdc26 ("s390/mm: convert to the generic get_user_pages_fast >> code") introduced a subtle but severe bug on s390 with gup_fast, due to >> dynamic pa

Re: [PATCH 00/44] KVM: Rework kvm_init() and hardware enabling

2022-11-03 Thread Christian Borntraeger
Am 03.11.22 um 00:18 schrieb Sean Christopherson: Non-x86 folks, please test on hardware when possible. I made a _lot_ of mistakes when moving code around. Thankfully, x86 was the trickiest code to deal with, and I'm fairly confident that I found all the bugs I introduced via testing. But the

[RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks (not word wrapped)

2008-06-03 Thread Christian Borntraeger
re found via hp->ops. Feedback is appreciated. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> CC: Rusty Russell <[EMAIL PROTECTED]> CC: Jeremy Fitzhardinge <[EMAIL PROTECTED]> CC: LKML <[EMAIL PROTECTED]> CC: Virtualization Mailing List <[EMAIL PROTECTE

[RFC 3/3] s390: use virtio_console for KVM on s390

2008-06-03 Thread Christian Borntraeger
This patch enables virtio_console as the default console on kvm for s390. We currently use the same notify hack as lguest for early console output. I will try to address this for lguest and s390 later. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- arch/s390/K

[RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks

2008-06-03 Thread Christian Borntraeger
re found via hp->ops. Feedback is appreciated. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- drivers/char/Kconfig |8 drivers/char/Makefile |1 drivers/char/hvc_console.c | 80 ++--- driv

[RFC 2/3] virtio_console: use virtqueue notification for hvc_console

2008-06-03 Thread Christian Borntraeger
This patch exploits the new notifier callbacks of the hvc_console. We can use the virtio callbacks instead of the polling code. I also added a small Kconfig change that allows the user to specify the virtio console in menuconfig. Signed-off-by: Christian Borntraeger <[EMAIL PROTEC

[RFC 0/3]: hvc_console rework for platform without hard irqs

2008-06-03 Thread Christian Borntraeger
This patch set if my first attempt to make virtio_console usable on s390. To do so, I had to change hvc_console, because s390 has no request_irq and no free_irq. I want to get feedback from the main users of hvc_console before I proceed. The basic idea of this patch set is to remove the calls to r

Re: [RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks (not word wrapped)

2008-06-04 Thread Christian Borntraeger
Am Dienstag, 3. Juni 2008 schrieb Arnd Bergmann: > I don't see a reason to make this data structure known to other files, > so why not leave it in hvc_console.c? Yes, Fixed. I moved it for a ealier version of this patch. Currently its not necessary. Dont know if I need to move it again if I work

Re: [RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks

2008-06-04 Thread Christian Borntraeger
Am Mittwoch, 4. Juni 2008 schrieb Rusty Russell: > Two questions. Is it possible to make the timer backoff a third kind of > notifier? I can try. The timer handling code is sprinkled a bit in hvc_console but it should be possible. > And is it possible to make the dependency static, rather than

[RFC 1/3 v2] hvc_console: rework setup to replace irq functions with callbacks

2008-06-20 Thread Christian Borntraeger
_console.h so that hvc_irq.c can access the irq_requested element. Feedback is appreciated. virtio_console is currently the only available console for kvm on s390. I plan to push this change as soon as all affected parties agree on it. I would love to get test results from System p, Xen etc. Signed-off-

[RFC 3/3 v2] s390: use virtio_console for KVM on s390

2008-06-20 Thread Christian Borntraeger
This patch enables virtio_console as the default console on kvm for s390. We currently use the same notify hack as lguest for early console output. I will try to address this for lguest and s390 later. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- arch/s390/K

[RFC 2/3 v2] virtio_console: use virtqueue notification for hvc_console

2008-06-20 Thread Christian Borntraeger
This patch exploits the new notifier callbacks of the hvc_console. We can use the virtio callbacks instead of the polling code. I also added a small Kconfig change that allows the user to specify the virtio console in menuconfig. Signed-off-by: Christian Borntraeger <[EMAIL PROTEC

Re: [RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks

2008-10-13 Thread Christian Borntraeger
close+0xb4/0xdc >    [] .sys_close+0xac/0x100 >    [] syscall_exit+0x0/0x40 Hmmm. Can you try if this patch fixes the lockdep trace? This would be analog to commit b1b135c8d619cb2c7045d6ee4e48375882518bb5 Author: Christian Borntraeger <[EMAIL PROTECTED]> Date: Thu Aug 7 09:18:34 2008 +02

Re: [RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks

2008-10-13 Thread Christian Borntraeger
Am Montag, 13. Oktober 2008 schrieb Benjamin Herrenschmidt: > > > if (--hp->count == 0) { > > - if (hp->ops->notifier_del) > > - hp->ops->notifier_del(hp, hp->data); > > - > > /* We are done with the tty pointer now. */ > > hp->tty = NULL; >

Re: [RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks

2008-10-13 Thread Christian Borntraeger
Am Dienstag, 14. Oktober 2008 schrieb Benjamin Herrenschmidt: > > > Hmmm. > > Can you try if this patch fixes the lockdep trace? > > Yup, the patch fixes it, I'll commit it via the powerpc.git tree if you > don't have any objection. Sure, go ahead. __

Re: [RFC PATCH 4/5] hvc_console: Add tty window resizing

2008-10-16 Thread Christian Borntraeger
Am Donnerstag, 16. Oktober 2008 schrieb Rusty Russell: > > The patch provides the hvc_resize() function to update the terminal > > window dimensions (struct winsize) for a specified hvc console. > > The function stores the new window size and schedules a function > > that finally updates the tty wi

Re: [BUG] hvc_console WARN() on current upstream

2009-01-08 Thread Christian Borntraeger
Am Donnerstag, 8. Januar 2009 schrieb Benjamin Herrenschmidt: > [ cut here ] > Badness at /home/benh/kernels/linux-powerpc/kernel/mutex.c:135 > NIP: c04fe0dc LR: c04fe0c0 CTR: c02c4304 > REGS: cfffb660 TRAP: 0700 Not tainted (2.6.28-test) >

Re: [PATCH 3/4] hvc_console: free_irq only if request_irq was successful

2009-01-08 Thread Christian Borntraeger
hp, int irq) > { > - if (!irq) > + if (!hp->irq_requested) > return; > free_irq(irq, hp); > hp->irq_requested = 0; > Looks sane. Acked-by: Christian Borntraeger ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [PATCH 1/4] hvc_console: do not set low_latency

2009-01-13 Thread Christian Borntraeger
Am Donnerstag 08 Januar 2009 schrieb Milton Miller: > hvc_console is setting low_latency unconditionally, but some clients are > interrupt driven and will call hvc_poll from irq context. This will cause > tty_flip_buffer_push to be called from irq context, and it very clearly > states it must not

Re: [PATCH 1/4] hvc_console: do not set low_latency

2009-01-13 Thread Christian Borntraeger
Am Dienstag 13 Januar 2009 schrieb Christian Borntraeger: > drivers/char/hvc_console.c |5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > Index: linux-2.6/drivers/char/hvc_console.c > === >

Re: [PATCH 1/4 v2] hvc_console: remove tty->low_latency

2009-01-15 Thread Christian Borntraeger
ount == 0 */ > > tty->driver_data = hp; > - if (!hp->irq_requested) > - tty->low_latency = 1; /* Makes flushes to ldisc synchronous. */ > > hp->tty = tty; > > Acked-by: Christian Borntraeger __

Re: [PATCH v4 0/3] KVM: PPC: Book3S PR: Fixes for AIL and SCV

2022-02-23 Thread Christian Borntraeger
Am 22.02.22 um 15:11 schrieb Paolo Bonzini: On 2/22/22 07:47, Nicholas Piggin wrote: Patch 3 requires a KVM_CAP_PPC number allocated. QEMU maintainers are happy with it (link in changelog) just waiting on KVM upstreaming. Do you have objections to the series going to ppc/kvm tree first, or an

Re: [PATCH v4 0/3] KVM: PPC: Book3S PR: Fixes for AIL and SCV

2022-02-24 Thread Christian Borntraeger
Am 23.02.22 um 12:47 schrieb Nicholas Piggin: Excerpts from Christian Borntraeger's message of February 23, 2022 7:14 pm: Am 22.02.22 um 15:11 schrieb Paolo Bonzini: On 2/22/22 07:47, Nicholas Piggin wrote: Patch 3 requires a KVM_CAP_PPC number allocated. QEMU maintainers are happy with i

Re: [PATCH v1 5/7] s390/pgtable: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE

2022-03-16 Thread Christian Borntraeger
Am 16.03.22 um 11:56 schrieb Gerald Schaefer: On Tue, 15 Mar 2022 18:12:16 +0100 David Hildenbrand wrote: On 15.03.22 17:58, David Hildenbrand wrote: This would mean that it is not OK to have bit 52 not zero for swap PTEs. But if I read the POP correctly, all bits except for the DAT-prot

Re: [PATCH 2/2] tools: do not include scripts/Kbuild.include

2021-04-15 Thread Christian Borntraeger
Link: https://lore.kernel.org/lkml/86dadf33-70f7-a5ac-cb8c-64966d2f4...@linux.ibm.com/ Fixes: d9f4ff50d2aa ("kbuild: spilt cc-option and friends to scripts/Makefile.compiler") Reported-by: Janosch Frank Reported-by: Christian Borntraeger Signed-off-by: Masahiro Yamada When applyin

Re: [PATCH 2/2] tools: do not include scripts/Kbuild.include

2021-04-15 Thread Christian Borntraeger
On 15.04.21 10:06, Christian Borntraeger wrote: On 15.04.21 09:27, Masahiro Yamada wrote: Since commit d9f4ff50d2aa ("kbuild: spilt cc-option and friends to scripts/Makefile.compiler"), some kselftests fail to build. The tools/ directory opted out Kbuild, and went in a different

Re: [PATCH v2] tools: do not include scripts/Kbuild.include

2021-04-16 Thread Christian Borntraeger
.include. Link: https://lore.kernel.org/lkml/86dadf33-70f7-a5ac-cb8c-64966d2f4...@linux.ibm.com/ Fixes: d9f4ff50d2aa ("kbuild: spilt cc-option and friends to scripts/Makefile.compiler") Reported-by: Janosch Frank Reported-by: Christian Borntraeger Signed-off-by: Masahiro Yamada looks better. Tested-by: Christian Borntraeger

Re: [PATCH v3 0/8] Implement generic cc_platform_has() helper function

2021-09-09 Thread Christian Borntraeger
somewhere? Also, a new file, arch/powerpc/platforms/pseries/cc_platform.c, has been created for powerpc to hold the out of line function. Cc: Andi Kleen Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Christian Borntraeger Cc: Daniel Vetter

Re: [PATCH 3/7] KVM: s390: Use Makefile.kvm for common files

2021-11-16 Thread Christian Borntraeger
Am 16.11.21 um 12:50 schrieb David Woodhouse: From: David Woodhouse Signed-off-by: David Woodhouse Looks good. Reviewed-by: Christian Borntraeger --- arch/s390/kvm/Makefile | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/s390/kvm/Makefile b/arch/s390

Re: [PATCH v6 1/5] KVM: s390: clean up redundant 'kvm_run' parameters

2020-06-23 Thread Christian Borntraeger
On 23.06.20 15:14, Tianjia Zhang wrote: > In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' > structure. For historical reasons, many kvm-related function parameters > retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time. This > patch does a unified cleanup of

Re: [PATCH 0/6] KVM: Remove uses of struct page from x86 and arm64 MMU

2021-06-25 Thread Christian Borntraeger
-EFAULT; Right. That should also take care of s390 (pin_guest_page in vsie.c which calls gfn_to_page). FWIW, the current API is really hard to follow as it does not tell which functions take a reference and which dont. Anyway, this patch (with cc stable?) Reviewed-by: Christian Borntr

Re: [PATCH v2 1/5] KVM: do not allow mapping valid but non-refcounted pages

2021-06-25 Thread Christian Borntraeger
igned-off-by: Nicholas Piggin I guess this would be the small fix for stable? Do we want to add that cc? Reviewed-by: Christian Borntraeger --- virt/kvm/kvm_main.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_m

Re: [PATCH v2 1/2] KVM: Refactor kvm_arch_vcpu_fault() to return a struct page pointer

2021-08-23 Thread Christian Borntraeger
On 12.08.21 11:04, David Hildenbrand wrote: On 12.08.21 06:02, Hou Wenlong wrote: From: Sean Christopherson Refactor kvm_arch_vcpu_fault() to return 'struct page *' instead of 'vm_fault_t' to simplify architecture specific implementations that do more than return SIGBUS.  Currently this onl

Re: [v1 0/5] parallelized "struct page" zeroing

2017-03-24 Thread Christian Borntraeger
On 03/24/2017 12:01 AM, Pavel Tatashin wrote: > When deferred struct page initialization feature is enabled, we get a > performance gain of initializing vmemmap in parallel after other CPUs are > started. However, we still zero the memory for vmemmap using one boot CPU. > This patch-set fixes the m

Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-05 Thread Christian Borntraeger
On 01/16/2018 03:18 AM, Deepa Dinamani wrote: > All the current architecture specific defines for these > are the same. Refactor these common defines to a common > header file. > > The new common linux/compat_time.h is also useful as it > will eventually be used to hold all the defines that > are

Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-06 Thread Christian Borntraeger
On 03/06/2018 01:46 PM, Arnd Bergmann wrote: > On Mon, Mar 5, 2018 at 10:30 AM, Christian Borntraeger > wrote: >> On 01/16/2018 03:18 AM, Deepa Dinamani wrote: >>> All the current architecture specific defines for these >>> are the same. Refactor these common defin

Re: [PATCH][RFC] Implement arch primitives for busywait loops

2016-09-20 Thread Christian Borntraeger
On 09/16/2016 10:57 AM, Nicholas Piggin wrote: > Implementing busy wait loops with cpu_relax() in callers poses > some difficulties for powerpc. > > First, we want to put our SMT thread into a low priority mode for the > duration of the loop, but then return to normal priority after exiting > the

Re: [PATCH][RFC] Implement arch primitives for busywait loops

2016-09-20 Thread Christian Borntraeger
On 09/20/2016 02:27 PM, Nicholas Piggin wrote: > On Tue, 20 Sep 2016 13:19:30 +0200 > Christian Borntraeger wrote: > >> On 09/16/2016 10:57 AM, Nicholas Piggin wrote: >>> Implementing busy wait loops with cpu_relax() in callers poses >>> some difficulties for p

Re: [PATCH v3 0/4] implement vcpu preempted check

2016-09-29 Thread Christian Borntraeger
On 09/29/2016 12:10 PM, Peter Zijlstra wrote: > On Thu, Jul 21, 2016 at 07:45:10AM -0400, Pan Xinhui wrote: >> change from v2: >> no code change, fix typos, update some comments >> >> change from v1: >> a simplier definition of default vcpu_is_preempted >> skip mahcine type check on

Re: [PATCH v3 0/4] implement vcpu preempted check

2016-09-29 Thread Christian Borntraeger
On 09/29/2016 12:23 PM, Christian Borntraeger wrote: > On 09/29/2016 12:10 PM, Peter Zijlstra wrote: >> On Thu, Jul 21, 2016 at 07:45:10AM -0400, Pan Xinhui wrote: >>> change from v2: >>> no code change, fix typos, update some comments >>> >>> cha

  1   2   >