[PATCH 2/2] s390/mm: enable fixup_user_fault retrying

2016-01-04 Thread Dominik Dingel
By passing a non-null flag we allow fixup_user_fault to retry, which enables userfaultfd. As during these retries we might drop the mmap_sem we need to check if that happened and redo the complete chain of actions. Signed-off-by: Dominik Dingel --- arch/s390/mm/pgtable.c | 29

[PATCH 1/2] mm: bring in additional flag for fixup_user_fault to signal unlock

2016-01-04 Thread Dominik Dingel
was not having the same semantics as filemap_fault. It never indicated if a retry happened and so a caller wasn't able to handle that case. So we now changed the behaviour to always retry a locked mmap_sem. Signed-off-by: Dominik Dingel --- arch/s390/mm/pgtable.c | 8 +--- include/linux/mm.h

[PATCH v3 0/2] Allow gmap fault to retry

2016-01-04 Thread Dominik Dingel
assing the VM_FAULT_RETRY from fixup_user_fault we do retries within fixup_user_fault, like get_user_pages_locked do. - gmap code will now take retry if fixup_user_fault drops the lock. Dominik Dingel (2): mm: bring in additional flag for fixup_user_fault to signal unlock s390/mm: enable fixup_user

[PATCH v3 0/2] Allow gmap fault to retry

2016-01-04 Thread Dominik Dingel
assing the VM_FAULT_RETRY from fixup_user_fault we do retries within fixup_user_fault, like get_user_pages_locked do. - gmap code will now take retry if fixup_user_fault drops the lock. Dominik Dingel (2): mm: bring in additional flag for fixup_user_fault to signal unlock s390/mm: enable fixup_user

[PATCH 2/2] s390/mm: enable fixup_user_fault retrying

2016-01-04 Thread Dominik Dingel
By passing a non-null flag we allow fixup_user_fault to retry, which enables userfaultfd. As during these retries we might drop the mmap_sem we need to check if that happened and redo the complete chain of actions. Signed-off-by: Dominik Dingel <din...@linux.vnet.ibm.com> --- arch/s

[PATCH 1/2] mm: bring in additional flag for fixup_user_fault to signal unlock

2016-01-04 Thread Dominik Dingel
was not having the same semantics as filemap_fault. It never indicated if a retry happened and so a caller wasn't able to handle that case. So we now changed the behaviour to always retry a locked mmap_sem. Signed-off-by: Dominik Dingel <din...@linux.vnet.ibm.com> --- arch/s390/mm/pgtable.

[PATCH v2 0/2] Allow gmap fault to retry

2015-11-26 Thread Dominik Dingel
on it, this needs some fix. Thanks, Dominik v1 -> v2: - Instead of passing the VM_FAULT_RETRY from fixup_user_fault we do retries within fixup_user_fault, like get_user_pages_locked do. - gmap code will now take retry if fixup_user_fault drops the lock Dominik Dingel (2): mm: bring in additional f

[PATCH 1/2] mm: bring in additional flag for fixup_user_fault to signal unlock

2015-11-26 Thread Dominik Dingel
was not having the same semantics as filemap_fault. It never indicated if a retry happened and so a caller wasn't able to handle that case. So we now changed the behaviour to always retry a locked mmap_sem. Signed-off-by: Dominik Dingel --- arch/s390/mm/pgtable.c | 8 +--- include/linux/mm.h

[PATCH 2/2] s390/mm: enable fixup_user_fault retrying

2015-11-26 Thread Dominik Dingel
By passing a non-null flag we allow fixup_user_fault to retry, which enables userfaultfd. As during these retries we might drop the mmap_sem we need to check if that happened and redo the complete chain of actions. Signed-off-by: Dominik Dingel --- arch/s390/mm/pgtable.c | 29

[PATCH 1/2] mm: bring in additional flag for fixup_user_fault to signal unlock

2015-11-26 Thread Dominik Dingel
was not having the same semantics as filemap_fault. It never indicated if a retry happened and so a caller wasn't able to handle that case. So we now changed the behaviour to always retry a locked mmap_sem. Signed-off-by: Dominik Dingel <din...@linux.vnet.ibm.com> --- arch/s390/mm/pgtable.

[PATCH 2/2] s390/mm: enable fixup_user_fault retrying

2015-11-26 Thread Dominik Dingel
By passing a non-null flag we allow fixup_user_fault to retry, which enables userfaultfd. As during these retries we might drop the mmap_sem we need to check if that happened and redo the complete chain of actions. Signed-off-by: Dominik Dingel <din...@linux.vnet.ibm.com> --- arch/s

[PATCH v2 0/2] Allow gmap fault to retry

2015-11-26 Thread Dominik Dingel
on it, this needs some fix. Thanks, Dominik v1 -> v2: - Instead of passing the VM_FAULT_RETRY from fixup_user_fault we do retries within fixup_user_fault, like get_user_pages_locked do. - gmap code will now take retry if fixup_user_fault drops the lock Dominik Dingel (2): mm: bring in additional f

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

2015-11-19 Thread Dominik Dingel
On Thu, 19 Nov 2015 09:25:24 +0100 Christian Borntraeger wrote: > 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 > &

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

2015-11-19 Thread Dominik Dingel
On Thu, 19 Nov 2015 09:25:24 +0100 Christian Borntraeger <borntrae...@de.ibm.com> wrote: > On 11/19/2015 09:18 AM, Martin Schwidefsky wrote: > > On Thu, 19 Nov 2015 00:49:58 +0100 > > Dominik Dingel <din...@linux.vnet.ibm.com> wrote: > > > >> The us

[PATCH 1/2] mm: fixup_userfault returns VM_FAULT_RETRY if asked

2015-11-18 Thread Dominik Dingel
When calling fixup_userfault with FAULT_FLAG_ALLOW_RETRY, fixup_userfault didn't care about VM_FAULT_RETRY and returned 0. If the VM_FAULT_RETRY flag is set we will return the complete result of handle_mm_fault. Signed-off-by: Dominik Dingel --- mm/gup.c | 2 ++ 1 file changed, 2 insertions

[PATCH 0/2] Allow gmap fault to retry

2015-11-18 Thread Dominik Dingel
on it, this needed some fix. This patchset includes the retry logic fory gmap fault scenarios, as well as passing back VM_FAULT_RETRY from fixup_userfault. Thanks, Dominik Dominik Dingel (2): mm: fixup_userfault returns VM_FAULT_RETRY if asked s390/mm: allow gmap code to retry on faulting in guest

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

2015-11-18 Thread Dominik Dingel
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 --- arch/s390/mm/pgtable.c | 28 1 file changed, 24 insertions(+), 4 deletions(-) diff --git

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

2015-11-18 Thread Dominik Dingel
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 <din...@linux.vnet.ibm.com> --- arch/s390/mm/pgtable.c | 28 1 file changed, 24 insertions

[PATCH 1/2] mm: fixup_userfault returns VM_FAULT_RETRY if asked

2015-11-18 Thread Dominik Dingel
When calling fixup_userfault with FAULT_FLAG_ALLOW_RETRY, fixup_userfault didn't care about VM_FAULT_RETRY and returned 0. If the VM_FAULT_RETRY flag is set we will return the complete result of handle_mm_fault. Signed-off-by: Dominik Dingel <din...@linux.vnet.ibm.com> --- mm/gup.c | 2

[PATCH 0/2] Allow gmap fault to retry

2015-11-18 Thread Dominik Dingel
on it, this needed some fix. This patchset includes the retry logic fory gmap fault scenarios, as well as passing back VM_FAULT_RETRY from fixup_userfault. Thanks, Dominik Dominik Dingel (2): mm: fixup_userfault returns VM_FAULT_RETRY if asked s390/mm: allow gmap code to retry on faulting in guest

perf: Link error on non x86 with sample_reg_masks

2015-09-30 Thread Dominik Dingel
Greetings, With 4.3-rc3 during the build of perf (on s390) I get following error: libperf.a(libperf-in.o): In function `parse_regs': /home/dingel/GIT/linux/tools/perf/util/parse-regs-options.c:28: undefined reference to `sample_reg_masks'

perf: Link error on non x86 with sample_reg_masks

2015-09-30 Thread Dominik Dingel
Greetings, With 4.3-rc3 during the build of perf (on s390) I get following error: libperf.a(libperf-in.o): In function `parse_regs': /home/dingel/GIT/linux/tools/perf/util/parse-regs-options.c:28: undefined reference to `sample_reg_masks'

Re: [PATCH] sched: access local runqueue directly in single_task_running

2015-09-18 Thread Dominik Dingel
On Fri, 18 Sep 2015 13:26:53 +0200 Paolo Bonzini wrote: > > > On 18/09/2015 11:27, Dominik Dingel wrote: > > Commit 2ee507c47293 ("sched: Add function single_task_running to let a task > > check if it is the only task running on a cpu") refe

[PATCH] sched: access local runqueue directly in single_task_running

2015-09-18 Thread Dominik Dingel
t the usefulness, we change single_task_running to access directly the cpu local runqueue. Cc: Tim Chen Suggested-by: Peter Zijlstra Cc: # 4.2.x Signed-off-by: Dominik Dingel --- kernel/sched/core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/sched/core.c b

[PATCH] sched: access local runqueue directly in single_task_running

2015-09-18 Thread Dominik Dingel
t the usefulness, we change single_task_running to access directly the cpu local runqueue. Cc: Tim Chen <tim.c.c...@linux.intel.com> Suggested-by: Peter Zijlstra <pet...@infradead.org> Cc: <sta...@vger.kernel.org> # 4.2.x Signed-off-by: Dominik Dingel <din...@linux.vnet.ibm.com&

Re: [PATCH] sched: access local runqueue directly in single_task_running

2015-09-18 Thread Dominik Dingel
On Fri, 18 Sep 2015 13:26:53 +0200 Paolo Bonzini <pbonz...@redhat.com> wrote: > > > On 18/09/2015 11:27, Dominik Dingel wrote: > > Commit 2ee507c47293 ("sched: Add function single_task_running to let a task > > check if it is the only task running on a cpu"

Re: single_task_running() vs. preemption warnings (was Re: [PATCH] kvm: fix preemption warnings in kvm_vcpu_block)

2015-09-17 Thread Dominik Dingel
On Thu, 17 Sep 2015 18:45:00 +0200 Paolo Bonzini wrote: > > > On 17/09/2015 18:27, Dominik Dingel wrote: > > + preempt_disable(); > > + solo = single_task_running(); > > + preempt_enable(); > > + > &

[PATCH] kvm: fix preemption warnings in kvm_vcpu_block

2015-09-17 Thread Dominik Dingel
Commit f78195129963 ("kvm: add halt_poll_ns module parameter") calls, with enabled preemption, single_task_running. When CONFIG_DEBUG_PREEMPT is enabled that will result in a debug_smp_processor_id() call. Cc: # 4.2.x Signed-off-by: Dominik Dingel --- virt/kvm/kvm_main.c | 8 ++

[PATCH] kvm: fix preemption warnings in kvm_vcpu_block

2015-09-17 Thread Dominik Dingel
Commit f78195129963 ("kvm: add halt_poll_ns module parameter") calls, with enabled preemption, single_task_running. When CONFIG_DEBUG_PREEMPT is enabled that will result in a debug_smp_processor_id() call. Cc: <sta...@vger.kernel.org> # 4.2.x Signed-off-by: Dom

Re: single_task_running() vs. preemption warnings (was Re: [PATCH] kvm: fix preemption warnings in kvm_vcpu_block)

2015-09-17 Thread Dominik Dingel
On Thu, 17 Sep 2015 18:45:00 +0200 Paolo Bonzini <pbonz...@redhat.com> wrote: > > > On 17/09/2015 18:27, Dominik Dingel wrote: > > + preempt_disable(); > > + solo = single_task_running(); > > +

[PATCH 1/4] Revert "s390/mm: change HPAGE_SHIFT type to int"

2015-07-03 Thread Dominik Dingel
This reverts commit cf54e2fce51c7ad2479fe8cf213a2ed618a8189b. --- arch/s390/include/asm/page.h | 2 +- arch/s390/mm/pgtable.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm/page.h index dd34523..0844b78 100644 ---

[PATCH 2/4] Revert "s390/mm: make hugepages_supported a boot time decision"

2015-07-03 Thread Dominik Dingel
This reverts commit bea41197ead3e03308bdd10c11db3ce91ae5c8ab. --- arch/s390/include/asm/page.h | 8 arch/s390/kernel/setup.c | 2 -- arch/s390/mm/pgtable.c | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/s390/include/asm/page.h

[PATCH 0/4] s390/mm: Fixup hugepage sw-emulated code removal

2015-07-03 Thread Dominik Dingel
HUGETLB_PAGE_SIZE_VARIABLE I think it would be best to simply allow architectures to define their own hugepages_supported(). Thanks Dominik Dominik Dingel (4): Revert "s390/mm: change HPAGE_SHIFT type to int" Revert "s390/mm: make hugepages_supported a boot time decision

[PATCH 4/4] s390/hugetlb: add hugepages_supported define

2015-07-03 Thread Dominik Dingel
instead of setting HPAGE_SHIFT to 0, we will implement the check for the hardware capability. Signed-off-by: Dominik Dingel --- arch/s390/include/asm/hugetlb.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/include/asm/hugetlb.h b/arch/s390/include/asm/hugetlb.h index 0130d03..d9be7c0

[PATCH 3/4] mm: hugetlb: allow hugepages_supported to be architecture specific

2015-07-03 Thread Dominik Dingel
s390 has a constant hugepage size, by setting HPAGE_SHIFT we also change e.g. the pageblock_order, which should be independent in respect to hugepage support. With this patch every architecture is free to define how to check for hugepage support. Signed-off-by: Dominik Dingel --- include/linux

[PATCH 0/4] s390/mm: Fixup hugepage sw-emulated code removal

2015-07-03 Thread Dominik Dingel
HUGETLB_PAGE_SIZE_VARIABLE I think it would be best to simply allow architectures to define their own hugepages_supported(). Thanks Dominik Dominik Dingel (4): Revert s390/mm: change HPAGE_SHIFT type to int Revert s390/mm: make hugepages_supported a boot time decision mm: hugetlb: allow

[PATCH 4/4] s390/hugetlb: add hugepages_supported define

2015-07-03 Thread Dominik Dingel
instead of setting HPAGE_SHIFT to 0, we will implement the check for the hardware capability. Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com --- arch/s390/include/asm/hugetlb.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/include/asm/hugetlb.h b/arch/s390/include/asm/hugetlb.h

[PATCH 2/4] Revert s390/mm: make hugepages_supported a boot time decision

2015-07-03 Thread Dominik Dingel
This reverts commit bea41197ead3e03308bdd10c11db3ce91ae5c8ab. --- arch/s390/include/asm/page.h | 8 arch/s390/kernel/setup.c | 2 -- arch/s390/mm/pgtable.c | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/s390/include/asm/page.h

[PATCH 1/4] Revert s390/mm: change HPAGE_SHIFT type to int

2015-07-03 Thread Dominik Dingel
This reverts commit cf54e2fce51c7ad2479fe8cf213a2ed618a8189b. --- arch/s390/include/asm/page.h | 2 +- arch/s390/mm/pgtable.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm/page.h index dd34523..0844b78 100644 ---

[PATCH 3/4] mm: hugetlb: allow hugepages_supported to be architecture specific

2015-07-03 Thread Dominik Dingel
s390 has a constant hugepage size, by setting HPAGE_SHIFT we also change e.g. the pageblock_order, which should be independent in respect to hugepage support. With this patch every architecture is free to define how to check for hugepage support. Signed-off-by: Dominik Dingel din

Re: [PATCH] mm: Add error check after call to rmap_walk in the function page_referenced

2015-06-26 Thread Dominik Dingel
On Fri, 26 Jun 2015 10:47:39 -0400 nick wrote: > > > On 2015-06-26 09:56 AM, Dominik Dingel wrote: > > On Thu, 25 Jun 2015 21:36:37 -0400 > > Nicholas Krause wrote: > > > >> This adds a return check after the call to the function rmap_walk

Re: [PATCH] mm: Add error check after call to rmap_walk in the function page_referenced

2015-06-26 Thread Dominik Dingel
On Thu, 25 Jun 2015 21:36:37 -0400 Nicholas Krause wrote: > This adds a return check after the call to the function rmap_walk > in the function page_referenced as this function call can fail > and thus should signal callers of page_referenced if this happens > by returning the SWAP macro return

Re: [PATCH] mm: Add error check after call to rmap_walk in the function page_referenced

2015-06-26 Thread Dominik Dingel
On Thu, 25 Jun 2015 21:36:37 -0400 Nicholas Krause xerofo...@gmail.com wrote: This adds a return check after the call to the function rmap_walk in the function page_referenced as this function call can fail and thus should signal callers of page_referenced if this happens by returning the

Re: [PATCH] mm: Add error check after call to rmap_walk in the function page_referenced

2015-06-26 Thread Dominik Dingel
On Fri, 26 Jun 2015 10:47:39 -0400 nick xerofo...@gmail.com wrote: On 2015-06-26 09:56 AM, Dominik Dingel wrote: On Thu, 25 Jun 2015 21:36:37 -0400 Nicholas Krause xerofo...@gmail.com wrote: This adds a return check after the call to the function rmap_walk in the function

[PATCH] s390/mm: change HPAGE_SHIFT type to int

2015-06-25 Thread Dominik Dingel
With making HPAGE_SHIFT an unsigned integer we also accidentally changed pageblock_order. In order to avoid compiler warnings we make HPAGE_SHFIT an int again. Suggested-by: Andrew Morton Signed-off-by: Dominik Dingel --- arch/s390/include/asm/page.h | 2 +- arch/s390/mm/pgtable.c | 2

[PATCH] s390/mm: change HPAGE_SHIFT type to int

2015-06-25 Thread Dominik Dingel
With making HPAGE_SHIFT an unsigned integer we also accidentally changed pageblock_order. In order to avoid compiler warnings we make HPAGE_SHFIT an int again. Suggested-by: Andrew Morton a...@linux-foundation.org Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com --- arch/s390/include/asm

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

2015-06-02 Thread Dominik Dingel
On Mon, 01 Jun 2015 09:35:57 +0200 Christian Borntraeger wrote: > 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 b

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

2015-06-02 Thread Dominik Dingel
On Mon, 01 Jun 2015 09:35:57 +0200 Christian Borntraeger borntrae...@de.ibm.com wrote: 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

[PATCH 2/5] mm/hugetlb: remove unused arch hook prepare/release_hugepage

2015-05-28 Thread Dominik Dingel
With s390 dropping support for emulated hugepages, the last user of arch_prepare_hugepage and arch_release_hugepage is gone. Acked-by: Martin Schwidefsky Signed-off-by: Dominik Dingel --- mm/hugetlb.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c

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

2015-05-28 Thread Dominik Dingel
/release_hugepage I also removed theses calls from common and other architecture code. Thanks, Dominik Dominik Dingel (5): s390/mm: make hugepages_supported a boot time decision mm/hugetlb: remove unused arch hook prepare/release_hugepage mm/hugetlb: remove arch_prepare/release_hugepage

[PATCH 4/5] s390/hugetlb: remove dead code for sw emulated huge pages

2015-05-28 Thread Dominik Dingel
We now support only hugepages on hardware with EDAT1 support. So we remove the prepare/release_hugepage hooks and simplify set_huge_pte_at and huge_ptep_get. Acked-by: Martin Schwidefsky Signed-off-by: Dominik Dingel --- arch/s390/include/asm/hugetlb.h | 3 --- arch/s390/mm/hugetlbpage.c

[PATCH 3/5] mm/hugetlb: remove arch_prepare/release_hugepage from arch headers

2015-05-28 Thread Dominik Dingel
Nobody used these hooks so they were removed from common code, and can now be removed from the architectures. Acked-by: Martin Schwidefsky Signed-off-by: Dominik Dingel --- arch/arm/include/asm/hugetlb.h | 9 - arch/arm64/include/asm/hugetlb.h | 9 - arch/ia64/include/asm

[PATCH 5/5] s390/mm: forward check for huge pmds to pmd_large()

2015-05-28 Thread Dominik Dingel
We already do the check in pmd_large, so we can just forward the call. Acked-by: Martin Schwidefsky Signed-off-by: Dominik Dingel --- arch/s390/mm/hugetlbpage.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/s390/mm/hugetlbpage.c b/arch/s390/mm/hugetlbpage.c index

[PATCH 1/5] s390/mm: make hugepages_supported a boot time decision

2015-05-28 Thread Dominik Dingel
. Acked-by: Martin Schwidefsky Signed-off-by: Dominik Dingel --- arch/s390/include/asm/page.h | 8 arch/s390/kernel/setup.c | 2 ++ arch/s390/mm/pgtable.c | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm

[PATCH 1/5] s390/mm: make hugepages_supported a boot time decision

2015-05-28 Thread Dominik Dingel
. Acked-by: Martin Schwidefsky schwidef...@de.ibm.com Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com --- arch/s390/include/asm/page.h | 8 arch/s390/kernel/setup.c | 2 ++ arch/s390/mm/pgtable.c | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/s390

[PATCH 5/5] s390/mm: forward check for huge pmds to pmd_large()

2015-05-28 Thread Dominik Dingel
We already do the check in pmd_large, so we can just forward the call. Acked-by: Martin Schwidefsky schwidef...@de.ibm.com Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com --- arch/s390/mm/hugetlbpage.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/s390/mm

[PATCH 3/5] mm/hugetlb: remove arch_prepare/release_hugepage from arch headers

2015-05-28 Thread Dominik Dingel
Nobody used these hooks so they were removed from common code, and can now be removed from the architectures. Acked-by: Martin Schwidefsky schwidef...@de.ibm.com Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com --- arch/arm/include/asm/hugetlb.h | 9 - arch/arm64/include/asm

[PATCH 4/5] s390/hugetlb: remove dead code for sw emulated huge pages

2015-05-28 Thread Dominik Dingel
We now support only hugepages on hardware with EDAT1 support. So we remove the prepare/release_hugepage hooks and simplify set_huge_pte_at and huge_ptep_get. Acked-by: Martin Schwidefsky schwidef...@de.ibm.com Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com --- arch/s390/include/asm

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

2015-05-28 Thread Dominik Dingel
/release_hugepage I also removed theses calls from common and other architecture code. Thanks, Dominik Dominik Dingel (5): s390/mm: make hugepages_supported a boot time decision mm/hugetlb: remove unused arch hook prepare/release_hugepage mm/hugetlb: remove arch_prepare/release_hugepage

[PATCH 2/5] mm/hugetlb: remove unused arch hook prepare/release_hugepage

2015-05-28 Thread Dominik Dingel
With s390 dropping support for emulated hugepages, the last user of arch_prepare_hugepage and arch_release_hugepage is gone. Acked-by: Martin Schwidefsky schwidef...@de.ibm.com Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com --- mm/hugetlb.c | 10 -- 1 file changed, 10 deletions

[PATCH] KVM: trivial fix comment regarding __kvm_set_memory_region

2014-10-27 Thread Dominik Dingel
commit 72dc67a69690 ("KVM: remove the usage of the mmap_sem for the protection of the memory slots.") changed the lock which will be taken. This should be reflected in the function commentary. Signed-off-by: Dominik Dingel --- virt/kvm/kvm_main.c | 2 +- 1 file changed, 1 inser

[PATCH] KVM: trivial fix comment regarding __kvm_set_memory_region

2014-10-27 Thread Dominik Dingel
commit 72dc67a69690 (KVM: remove the usage of the mmap_sem for the protection of the memory slots.) changed the lock which will be taken. This should be reflected in the function commentary. Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com --- virt/kvm/kvm_main.c | 2 +- 1 file changed

Re: [PATCH 2/4] mm: introduce mm_forbids_zeropage function

2014-10-22 Thread Dominik Dingel
On Wed, 22 Oct 2014 12:22:23 -0700 Andrew Morton wrote: > On Wed, 22 Oct 2014 13:09:28 +0200 Dominik Dingel > wrote: > > > Add a new function stub to allow architectures to disable for > > an mm_structthe backing of non-present, anonymous pages with > >

[PATCH v3 0/4] mm: new function to forbid zeropage mappings for a process

2014-10-22 Thread Dominik Dingel
memory. v2 -> v3: - Clearing up patch description Patch 3/4 - removing unnecessary flag in mmu_context (Paolo) v1 -> v2: - Following Dave and Paolo suggestion removing the vma flag Dominik Dingel (4): s390/mm: recfactor global pgste updates mm: introduce mm_forbids_zeropage fu

[PATCH 3/4] s390/mm: prevent and break zero page mappings in case of storage keys

2014-10-22 Thread Dominik Dingel
her vCPUs executing storage key instructions will get a one time interception and be serialized also with mmap_sem. Signed-off-by: Dominik Dingel --- arch/s390/include/asm/pgtable.h | 5 + arch/s390/mm/pgtable.c | 13 - 2 files changed, 17 insertions(+), 1 deletion(-) diff --g

[PATCH 2/4] mm: introduce mm_forbids_zeropage function

2014-10-22 Thread Dominik Dingel
Add a new function stub to allow architectures to disable for an mm_structthe backing of non-present, anonymous pages with read-only empty zero pages. Signed-off-by: Dominik Dingel --- include/linux/mm.h | 4 mm/huge_memory.c | 2 +- mm/memory.c| 2 +- 3 files changed, 6

[PATCH 4/4] s390/mm: disable KSM for storage key enabled pages

2014-10-22 Thread Dominik Dingel
When storage keys are enabled unmerge already merged pages and prevent new pages from being merged. Signed-off-by: Dominik Dingel Acked-by: Christian Borntraeger --- arch/s390/include/asm/pgtable.h | 2 +- arch/s390/kvm/priv.c| 17 - arch/s390/mm/pgtable.c

[PATCH 1/4] s390/mm: recfactor global pgste updates

2014-10-22 Thread Dominik Dingel
Replace the s390 specific page table walker for the pgste updates with a call to the common code walk_page_range function. There are now two pte modification functions, one for the reset of the CMMA state and another one for the initialization of the storage keys. Signed-off-by: Dominik Dingel

Re: [PATCH 3/4] s390/mm: prevent and break zero page mappings in case of storage keys

2014-10-22 Thread Dominik Dingel
On Wed, 22 Oct 2014 12:09:31 +0200 Paolo Bonzini wrote: > On 10/22/2014 10:30 AM, Dominik Dingel wrote: > > As use_skey is already the condition on which we call s390_enable_skey > > we need to introduce a new flag for the mm->context on which we decide > > if zero

[PATCH 2/4] mm: introduce mm_forbids_zeropage function

2014-10-22 Thread Dominik Dingel
Add a new function stub to allow architectures to disable for an mm_structthe backing of non-present, anonymous pages with read-only empty zero pages. Signed-off-by: Dominik Dingel --- include/linux/mm.h | 4 mm/huge_memory.c | 2 +- mm/memory.c| 2 +- 3 files changed, 6

[PATCH 3/4] s390/mm: prevent and break zero page mappings in case of storage keys

2014-10-22 Thread Dominik Dingel
and host large pages are also mutual exclusive we do not even need to retry the fixup_user_fault. As use_skey is already the condition on which we call s390_enable_skey we need to introduce a new flag for the mm->context on which we decide if zero page mapping is allowed. Signed-off-by: Do

[PATCH 4/4] s390/mm: disable KSM for storage key enabled pages

2014-10-22 Thread Dominik Dingel
When storage keys are enabled unmerge already merged pages and prevent new pages from being merged. Signed-off-by: Dominik Dingel Acked-by: Christian Borntraeger --- arch/s390/include/asm/pgtable.h | 2 +- arch/s390/kvm/priv.c| 17 - arch/s390/mm/pgtable.c

[PATCH 1/4] s390/mm: recfactor global pgste updates

2014-10-22 Thread Dominik Dingel
Replace the s390 specific page table walker for the pgste updates with a call to the common code walk_page_range function. There are now two pte modification functions, one for the reset of the CMMA state and another one for the initialization of the storage keys. Signed-off-by: Dominik Dingel

[PATCH v2 0/4] mm: new function to forbid zeropage mappings for a process

2014-10-22 Thread Dominik Dingel
memory. v1 -> v2: - Following Dave and Paolo suggestion removing the vma flag Dominik Dingel (4): s390/mm: recfactor global pgste updates mm: introduce mm_forbids_zeropage function s390/mm: prevent and break zero page mappings in case of storage keys s390/mm: disable KSM for storage

[PATCH v2 0/4] mm: new function to forbid zeropage mappings for a process

2014-10-22 Thread Dominik Dingel
memory. v1 - v2: - Following Dave and Paolo suggestion removing the vma flag Dominik Dingel (4): s390/mm: recfactor global pgste updates mm: introduce mm_forbids_zeropage function s390/mm: prevent and break zero page mappings in case of storage keys s390/mm: disable KSM for storage key

[PATCH 1/4] s390/mm: recfactor global pgste updates

2014-10-22 Thread Dominik Dingel
Replace the s390 specific page table walker for the pgste updates with a call to the common code walk_page_range function. There are now two pte modification functions, one for the reset of the CMMA state and another one for the initialization of the storage keys. Signed-off-by: Dominik Dingel

[PATCH 4/4] s390/mm: disable KSM for storage key enabled pages

2014-10-22 Thread Dominik Dingel
When storage keys are enabled unmerge already merged pages and prevent new pages from being merged. Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com Acked-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/include/asm/pgtable.h | 2 +- arch/s390/kvm/priv.c| 17

[PATCH 3/4] s390/mm: prevent and break zero page mappings in case of storage keys

2014-10-22 Thread Dominik Dingel
pages are also mutual exclusive we do not even need to retry the fixup_user_fault. As use_skey is already the condition on which we call s390_enable_skey we need to introduce a new flag for the mm-context on which we decide if zero page mapping is allowed. Signed-off-by: Dominik Dingel din

[PATCH 2/4] mm: introduce mm_forbids_zeropage function

2014-10-22 Thread Dominik Dingel
Add a new function stub to allow architectures to disable for an mm_structthe backing of non-present, anonymous pages with read-only empty zero pages. Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com --- include/linux/mm.h | 4 mm/huge_memory.c | 2 +- mm/memory.c| 2 +- 3

Re: [PATCH 3/4] s390/mm: prevent and break zero page mappings in case of storage keys

2014-10-22 Thread Dominik Dingel
On Wed, 22 Oct 2014 12:09:31 +0200 Paolo Bonzini pbonz...@redhat.com wrote: On 10/22/2014 10:30 AM, Dominik Dingel wrote: As use_skey is already the condition on which we call s390_enable_skey we need to introduce a new flag for the mm-context on which we decide if zero page mapping

[PATCH 1/4] s390/mm: recfactor global pgste updates

2014-10-22 Thread Dominik Dingel
Replace the s390 specific page table walker for the pgste updates with a call to the common code walk_page_range function. There are now two pte modification functions, one for the reset of the CMMA state and another one for the initialization of the storage keys. Signed-off-by: Dominik Dingel

[PATCH 4/4] s390/mm: disable KSM for storage key enabled pages

2014-10-22 Thread Dominik Dingel
When storage keys are enabled unmerge already merged pages and prevent new pages from being merged. Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com Acked-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/include/asm/pgtable.h | 2 +- arch/s390/kvm/priv.c| 17

[PATCH 2/4] mm: introduce mm_forbids_zeropage function

2014-10-22 Thread Dominik Dingel
Add a new function stub to allow architectures to disable for an mm_structthe backing of non-present, anonymous pages with read-only empty zero pages. Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com --- include/linux/mm.h | 4 mm/huge_memory.c | 2 +- mm/memory.c| 2 +- 3

[PATCH 3/4] s390/mm: prevent and break zero page mappings in case of storage keys

2014-10-22 Thread Dominik Dingel
storage key instructions will get a one time interception and be serialized also with mmap_sem. Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com --- arch/s390/include/asm/pgtable.h | 5 + arch/s390/mm/pgtable.c | 13 - 2 files changed, 17 insertions(+), 1 deletion

[PATCH v3 0/4] mm: new function to forbid zeropage mappings for a process

2014-10-22 Thread Dominik Dingel
memory. v2 - v3: - Clearing up patch description Patch 3/4 - removing unnecessary flag in mmu_context (Paolo) v1 - v2: - Following Dave and Paolo suggestion removing the vma flag Dominik Dingel (4): s390/mm: recfactor global pgste updates mm: introduce mm_forbids_zeropage function s390

Re: [PATCH 2/4] mm: introduce mm_forbids_zeropage function

2014-10-22 Thread Dominik Dingel
On Wed, 22 Oct 2014 12:22:23 -0700 Andrew Morton a...@linux-foundation.org wrote: On Wed, 22 Oct 2014 13:09:28 +0200 Dominik Dingel din...@linux.vnet.ibm.com wrote: Add a new function stub to allow architectures to disable for an mm_structthe backing of non-present, anonymous pages

Re: [PATCH 2/4] mm: introduce new VM_NOZEROPAGE flag

2014-10-21 Thread Dominik Dingel
On Tue, 21 Oct 2014 10:11:43 +0200 Paolo Bonzini wrote: > > > On 10/21/2014 08:11 AM, Martin Schwidefsky wrote: > >> I agree with Dave (I thought I disagreed, but I changed my mind while > >> writing down my thoughts). Just define mm_forbids_zeropage in > >> arch/s390/include/asm, and make it

Re: [PATCH 2/4] mm: introduce new VM_NOZEROPAGE flag

2014-10-21 Thread Dominik Dingel
On Tue, 21 Oct 2014 10:11:43 +0200 Paolo Bonzini pbonz...@redhat.com wrote: On 10/21/2014 08:11 AM, Martin Schwidefsky wrote: I agree with Dave (I thought I disagreed, but I changed my mind while writing down my thoughts). Just define mm_forbids_zeropage in arch/s390/include/asm, and

Re: [PATCH 2/4] mm: introduce new VM_NOZEROPAGE flag

2014-10-18 Thread Dominik Dingel
On Fri, 17 Oct 2014 15:04:21 -0700 Dave Hansen wrote: > Is there ever a time where the VMAs under an mm have mixed VM_NOZEROPAGE > status? Reading the patches, it _looks_ like it might be an all or > nothing thing. Currently it is an all or nothing thing, but for a future change we might want

Re: [PATCH 2/4] mm: introduce new VM_NOZEROPAGE flag

2014-10-18 Thread Dominik Dingel
On Fri, 17 Oct 2014 15:04:21 -0700 Dave Hansen dave.han...@intel.com wrote: Is there ever a time where the VMAs under an mm have mixed VM_NOZEROPAGE status? Reading the patches, it _looks_ like it might be an all or nothing thing. Currently it is an all or nothing thing, but for a future

[PATCH 3/4] s390/mm: prevent and break zero page mappings in case of storage keys

2014-10-17 Thread Dominik Dingel
even need to retry the fixup_user_fault. Signed-off-by: Dominik Dingel Acked-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky --- arch/s390/Kconfig | 3 +++ arch/s390/mm/pgtable.c | 15 +++ 2 files changed, 18 insertions(+) diff --git a/arch/s390/Kconfig b/arch/s39

[PATCH 0/4] mm: new flag to forbid zero page mappings for a vma

2014-10-17 Thread Dominik Dingel
memory. Dominik Dingel (4): s390/mm: recfactor global pgste updates mm: introduce new VM_NOZEROPAGE flag s390/mm: prevent and break zero page mappings in case of storage keys s390/mm: disable KSM for storage key enabled pages arch/s390/Kconfig | 3 + arch/s390/include/asm

[PATCH 4/4] s390/mm: disable KSM for storage key enabled pages

2014-10-17 Thread Dominik Dingel
When storage keys are enabled unmerge already merged pages and prevent new pages from being merged. Signed-off-by: Dominik Dingel Acked-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky --- arch/s390/include/asm/pgtable.h | 2 +- arch/s390/kvm/priv.c| 17

[PATCH 2/4] mm: introduce new VM_NOZEROPAGE flag

2014-10-17 Thread Dominik Dingel
Add a new vma flag to allow an architecture to disable the backing of non-present, anonymous pages with the read-only empty zero page. Signed-off-by: Dominik Dingel Acked-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky --- include/linux/mm.h | 13 +++-- mm/huge_memory.c

[PATCH 1/4] s390/mm: recfactor global pgste updates

2014-10-17 Thread Dominik Dingel
Replace the s390 specific page table walker for the pgste updates with a call to the common code walk_page_range function. There are now two pte modification functions, one for the reset of the CMMA state and another one for the initialization of the storage keys. Signed-off-by: Dominik Dingel

[PATCH 1/4] s390/mm: recfactor global pgste updates

2014-10-17 Thread Dominik Dingel
Replace the s390 specific page table walker for the pgste updates with a call to the common code walk_page_range function. There are now two pte modification functions, one for the reset of the CMMA state and another one for the initialization of the storage keys. Signed-off-by: Dominik Dingel

[PATCH 2/4] mm: introduce new VM_NOZEROPAGE flag

2014-10-17 Thread Dominik Dingel
Add a new vma flag to allow an architecture to disable the backing of non-present, anonymous pages with the read-only empty zero page. Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com Acked-by: Christian Borntraeger borntrae...@de.ibm.com Signed-off-by: Martin Schwidefsky schwidef

[PATCH 0/4] mm: new flag to forbid zero page mappings for a vma

2014-10-17 Thread Dominik Dingel
memory. Dominik Dingel (4): s390/mm: recfactor global pgste updates mm: introduce new VM_NOZEROPAGE flag s390/mm: prevent and break zero page mappings in case of storage keys s390/mm: disable KSM for storage key enabled pages arch/s390/Kconfig | 3 + arch/s390/include/asm

[PATCH 4/4] s390/mm: disable KSM for storage key enabled pages

2014-10-17 Thread Dominik Dingel
When storage keys are enabled unmerge already merged pages and prevent new pages from being merged. Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com Acked-by: Christian Borntraeger borntrae...@de.ibm.com Signed-off-by: Martin Schwidefsky schwidef...@de.ibm.com --- arch/s390/include/asm

[PATCH 3/4] s390/mm: prevent and break zero page mappings in case of storage keys

2014-10-17 Thread Dominik Dingel
to retry the fixup_user_fault. Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com Acked-by: Christian Borntraeger borntrae...@de.ibm.com Signed-off-by: Martin Schwidefsky schwidef...@de.ibm.com --- arch/s390/Kconfig | 3 +++ arch/s390/mm/pgtable.c | 15 +++ 2 files changed, 18

  1   2   >