[PATCH] mm/migrate: fix indexing bug (off by one) and avoid out of bound access

2017-10-02 Thread Jérôme Glisse
vidia.com> Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Andrew Morton <a...@linux-foundation.org> --- mm/migrate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/migrate.c b/mm/migrate.c index 6954c14..e00814c 100644 --- a/mm/migrate.c +++ b/mm/migr

[PATCH] mm/migrate: fix indexing bug (off by one) and avoid out of bound access

2017-10-02 Thread Jérôme Glisse
From: Mark Hairgrove Index was incremented before last use and thus the second array could dereference to an invalid address (not mentioning the fact that it did not properly clear the entry we intended to clear). Signed-off-by: Mark Hairgrove Signed-off-by: Jérôme Glisse Cc: Andrew Morton

[PATCH] mm/hmm: constify hmm_devmem_page_get_drvdata() parameter

2017-10-02 Thread Jérôme Glisse
From: Ralph Campbell <rcampb...@nvidia.com> Constify pointer parameter to avoid issue when use from code that only has const struct page pointer to use in the first place. Signed-off-by: Ralph Campbell <rcampb...@nvidia.com> Signed-off-by: Jérôme Glisse <jgli...@redhat.com>

[PATCH] mm/hmm: constify hmm_devmem_page_get_drvdata() parameter

2017-10-02 Thread Jérôme Glisse
From: Ralph Campbell Constify pointer parameter to avoid issue when use from code that only has const struct page pointer to use in the first place. Signed-off-by: Ralph Campbell Signed-off-by: Jérôme Glisse Cc: Andrew Morton --- include/linux/hmm.h | 4 ++-- 1 file changed, 2 insertions

[PATCH 02/13] mm/rmap: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
as happening. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Dan Williams <dan.j.willi...@intel.com> Cc: Ross Zwisler <ross.zwis...@linux.intel.com> Cc: Linus Torvalds <torva...@linux-foundation.org> Cc: Bernhard Held <berny...@gmx.de> Cc: Adam Borowski &l

[PATCH 02/13] mm/rmap: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
as happening. Signed-off-by: Jérôme Glisse Cc: Dan Williams Cc: Ross Zwisler Cc: Linus Torvalds Cc: Bernhard Held Cc: Adam Borowski Cc: Andrea Arcangeli Cc: Radim Krčmář Cc: Wanpeng Li Cc: Paolo Bonzini Cc: Takashi Iwai Cc: Nadav Amit Cc: Mike Galbraith Cc: Kirill A. Shutemov Cc

[PATCH 05/13] IB/umem: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Leon Roma

[PATCH 05/13] IB/umem: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Cc: Leon Romanovsky Cc: linux-r

[PATCH 06/13] IB/hfi1: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: l

[PATCH 04/13] drm/amdgpu: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> C

[PATCH 06/13] IB/hfi1: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Cc: linux-r...@vger.kernel.org Cc: Dean

[PATCH 04/13] drm/amdgpu: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Cc: amd-...@lists.freedesktop.org Cc: Felix

[PATCH 03/13] powerpc/powernv: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: li

[PATCH 07/13] iommu/amd: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: S

[PATCH 03/13] powerpc/powernv: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Cc: linuxppc-...@lists.ozlabs.org Cc

[PATCH 07/13] iommu/amd: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Cc: Suravee Suthikulpanit Cc: io

[PATCH 08/13] iommu/intel: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: David Woodhou

[PATCH 08/13] iommu/intel: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Cc: David Woodhouse Cc: io...@lists.linux

[PATCH 11/13] xen/gntdev: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Konrad Rze

[PATCH 11/13] xen/gntdev: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Cc: Konrad Rzeszutek Wilk Cc: Roger Pau

[PATCH 10/13] sgi-gru: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Dimitri Si

[PATCH 09/13] misc/mic/scif: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Sudee

[PATCH 10/13] sgi-gru: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Cc: Dimitri Sivanich Cc: Jack Steiner Cc

[PATCH 09/13] misc/mic/scif: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Cc: Sudeep Dutt Cc: Ashutosh Dixit Cc

[PATCH 12/13] KVM: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Paolo B

[PATCH 12/13] KVM: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Cc: Paolo Bonzini Cc: Radim Krčmář Cc: k

[PATCH 13/13] mm/mmu_notifier: kill invalidate_page

2017-08-29 Thread Jérôme Glisse
clear choice: - invalidate_range_start()/end() callback (which allow you to sleep) - invalidate_range() where you can not sleep but happen right after page table update under page table lock Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Linus Torvalds <torva...@linux-found

[PATCH 13/13] mm/mmu_notifier: kill invalidate_page

2017-08-29 Thread Jérôme Glisse
clear choice: - invalidate_range_start()/end() callback (which allow you to sleep) - invalidate_range() where you can not sleep but happen right after page table update under page table lock Signed-off-by: Jérôme Glisse Cc: Linus Torvalds Cc: Bernhard Held Cc: Adam Borowski Cc: Andrea

[PATCH 00/13] mmu_notifier kill invalidate_page callback

2017-08-29 Thread Jérôme Glisse
happen. Finaly the last page remove it completely so it can RIP. Jérôme Glisse (13): dax: update to new mmu_notifier semantic mm/rmap: update to new mmu_notifier semantic powerpc/powernv: update to new mmu_notifier semantic drm/amdgpu: update to new mmu_notifier semantic IB/umem: update

[PATCH 00/13] mmu_notifier kill invalidate_page callback

2017-08-29 Thread Jérôme Glisse
happen. Finaly the last page remove it completely so it can RIP. Jérôme Glisse (13): dax: update to new mmu_notifier semantic mm/rmap: update to new mmu_notifier semantic powerpc/powernv: update to new mmu_notifier semantic drm/amdgpu: update to new mmu_notifier semantic IB/umem: update

[PATCH 01/13] dax: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
as happening. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Dan Williams <dan.j.willi...@intel.com> Cc: Ross Zwisler <ross.zwis...@linux.intel.com> Cc: Linus Torvalds <torva...@linux-foundation.org> Cc: Bernhard Held <berny...@gmx.de> Cc: Adam Borowski &l

[PATCH 01/13] dax: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
as happening. Signed-off-by: Jérôme Glisse Cc: Dan Williams Cc: Ross Zwisler Cc: Linus Torvalds Cc: Bernhard Held Cc: Adam Borowski Cc: Andrea Arcangeli Cc: Radim Krčmář Cc: Wanpeng Li Cc: Paolo Bonzini Cc: Takashi Iwai Cc: Nadav Amit Cc: Mike Galbraith Cc: Kirill A. Shutemov Cc: axie

[PATCH 0/4] mmu_notifier semantic update

2017-08-29 Thread Jérôme Glisse
https://lkml.kernel.org/r/20170804134928.l4klfcnqatni7...@black.fi.intel.com https://marc.info/?l=kvm=150327081325160=2 Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Linus Torvalds <torva...@linux-foundation.org> Cc: Bernhard Held <berny...@gmx.de> Cc: Adam Borowski <ki

[PATCH 0/4] mmu_notifier semantic update

2017-08-29 Thread Jérôme Glisse
https://lkml.kernel.org/r/20170804134928.l4klfcnqatni7...@black.fi.intel.com https://marc.info/?l=kvm=150327081325160=2 Signed-off-by: Jérôme Glisse Cc: Linus Torvalds Cc: Bernhard Held Cc: Adam Borowski Cc: Andrea Arcangeli Cc: Radim Krčmář Cc: Wanpeng Li Cc: Paolo Bonzini Cc: Takashi Iwai Cc

[PATCH 4/4] iommu/amd: update to new mmu_notifier_invalidate_page() semantic

2017-08-29 Thread Jérôme Glisse
mmu_notifier_invalidate_page() is now be call from under the spinlock. But we can now rely on invalidate_range() being call afterward. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Joerg Roedel <jroe...@suse.de> Cc: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>

[PATCH 4/4] iommu/amd: update to new mmu_notifier_invalidate_page() semantic

2017-08-29 Thread Jérôme Glisse
mmu_notifier_invalidate_page() is now be call from under the spinlock. But we can now rely on invalidate_range() being call afterward. Signed-off-by: Jérôme Glisse Cc: Joerg Roedel Cc: Suravee Suthikulpanit Cc: Linus Torvalds Cc: Bernhard Held Cc: Adam Borowski Cc: Andrea Arcangeli Cc

[PATCH 2/4] dax/mmu_notifier: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
mmu_notifier_invalidate_page() can now be call from under the spinlock. Move it approprietly and add a call to mmu_notifier_invalidate_range() for user that need to be able to sleep. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Dan Williams <dan.j.willi...@intel.com> Cc:

[PATCH 2/4] dax/mmu_notifier: update to new mmu_notifier semantic

2017-08-29 Thread Jérôme Glisse
mmu_notifier_invalidate_page() can now be call from under the spinlock. Move it approprietly and add a call to mmu_notifier_invalidate_range() for user that need to be able to sleep. Signed-off-by: Jérôme Glisse Cc: Dan Williams Cc: Ross Zwisler Cc: Linus Torvalds Cc: Bernhard Held Cc: Adam

[PATCH 3/4] mm/rmap: update to new mmu_notifier_invalidate_page() semantic

2017-08-29 Thread Jérôme Glisse
...@black.fi.intel.com https://marc.info/?l=kvm=150327081325160=2 Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Linus Torvalds <torva...@linux-foundation.org> Cc: Bernhard Held <berny...@gmx.de> Cc: Adam Borowski <kilob...@angband.pl> Cc: Andrea Arcangeli <aar

[PATCH 1/4] mm/mmu_notifier: document new behavior for mmu_notifier_invalidate_page()

2017-08-29 Thread Jérôme Glisse
Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Linus Torvalds <torva...@linux-foundation.org> Cc: Bernhard Held <berny...@gmx.de> Cc: Adam Borowski <kilob...@angband.pl> Cc: Andrea Arcangeli <aarca...@redhat.com> Cc: Radim Krčmář <rkrc...@redhat.com> Cc:

[PATCH 3/4] mm/rmap: update to new mmu_notifier_invalidate_page() semantic

2017-08-29 Thread Jérôme Glisse
...@black.fi.intel.com https://marc.info/?l=kvm=150327081325160=2 Signed-off-by: Jérôme Glisse Cc: Linus Torvalds Cc: Bernhard Held Cc: Adam Borowski Cc: Andrea Arcangeli Cc: Radim Krčmář Cc: Wanpeng Li Cc: Paolo Bonzini Cc: Takashi Iwai Cc: Nadav Amit Cc: Mike Galbraith Cc: Kirill

[PATCH 1/4] mm/mmu_notifier: document new behavior for mmu_notifier_invalidate_page()

2017-08-29 Thread Jérôme Glisse
Signed-off-by: Jérôme Glisse Cc: Linus Torvalds Cc: Bernhard Held Cc: Adam Borowski Cc: Andrea Arcangeli Cc: Radim Krčmář Cc: Wanpeng Li Cc: Paolo Bonzini Cc: Takashi Iwai Cc: Nadav Amit Cc: Mike Galbraith Cc: Kirill A. Shutemov Cc: axie Cc: Andrew Morton --- include/linux

[RFC PATCH] mm/rmap: do not call mmu_notifier_invalidate_page() v3

2017-08-29 Thread Jérôme Glisse
ads: https://lkml.kernel.org/r/20170809204333.27485-1-jgli...@redhat.com https://lkml.kernel.org/r/20170804134928.l4klfcnqatni7...@black.fi.intel.com https://marc.info/?l=kvm=150327081325160=2 Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Linus Torvalds <torva...@linux-foundation.org

[RFC PATCH] mm/rmap: do not call mmu_notifier_invalidate_page() v3

2017-08-29 Thread Jérôme Glisse
ads: https://lkml.kernel.org/r/20170809204333.27485-1-jgli...@redhat.com https://lkml.kernel.org/r/20170804134928.l4klfcnqatni7...@black.fi.intel.com https://marc.info/?l=kvm=150327081325160=2 Signed-off-by: Jérôme Glisse Cc: Linus Torvalds Cc: Bernhard Held Cc: Adam Borowski Cc: Andrea Arcangeli

[HMM-v25 01/19] hmm: heterogeneous memory management documentation v3

2017-08-16 Thread Jérôme Glisse
: - removed outdated section Signed-off-by: Jérôme Glisse <jgli...@redhat.com> --- Documentation/vm/hmm.txt | 384 +++ MAINTAINERS | 7 + 2 files changed, 391 insertions(+) create mode 100644 Documentation/vm/hmm.txt diff

[HMM-v25 01/19] hmm: heterogeneous memory management documentation v3

2017-08-16 Thread Jérôme Glisse
: - removed outdated section Signed-off-by: Jérôme Glisse --- Documentation/vm/hmm.txt | 384 +++ MAINTAINERS | 7 + 2 files changed, 391 insertions(+) create mode 100644 Documentation/vm/hmm.txt diff --git a/Documentation/vm/hmm.txt b

[HMM-v25 03/19] mm/hmm/mirror: mirror process address space on device with HMM helpers v3

2017-08-16 Thread Jérôme Glisse
rdware in the future. Changed since v2: - s/device unaddressable/device private/ Changed since v1: - Kconfig logic (depend on x86-64 and use ARCH_HAS pattern) Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Signed-off-by: Evgeny Baskakov <ebaska...@nvidia.com> Signed-off-by: J

[HMM-v25 04/19] mm/hmm/mirror: helper to snapshot CPU page table v4

2017-08-16 Thread Jérôme Glisse
-by: Jérôme Glisse <jgli...@redhat.com> Signed-off-by: Evgeny Baskakov <ebaska...@nvidia.com> Signed-off-by: John Hubbard <jhubb...@nvidia.com> Signed-off-by: Mark Hairgrove <mhairgr...@nvidia.com> Signed-off-by: Sherry Cheung <sche...@nvidia.com> Signed-off-by: Su

[HMM-v25 02/19] mm/hmm: heterogeneous memory management (HMM for short) v5

2017-08-16 Thread Jérôme Glisse
pattern) Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Signed-off-by: Evgeny Baskakov <ebaska...@nvidia.com> Signed-off-by: John Hubbard <jhubb...@nvidia.com> Signed-off-by: Mark Hairgrove <mhairgr...@nvidia.com> Signed-off-by: Sherry Cheung <sche...@nvidia.com> Sig

[HMM-v25 07/19] mm/ZONE_DEVICE: new type of ZONE_DEVICE for unaddressable memory v5

2017-08-16 Thread Jérôme Glisse
memory (from device unaddressable) Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Acked-by: Dan Williams <dan.j.willi...@intel.com> Cc: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/proc/task_mmu.c | 7 + include/linux/ioport.h | 1 + include/lin

[HMM-v25 03/19] mm/hmm/mirror: mirror process address space on device with HMM helpers v3

2017-08-16 Thread Jérôme Glisse
rdware in the future. Changed since v2: - s/device unaddressable/device private/ Changed since v1: - Kconfig logic (depend on x86-64 and use ARCH_HAS pattern) Signed-off-by: Jérôme Glisse Signed-off-by: Evgeny Baskakov Signed-off-by: John Hubbard Signed-off-by: Mark Hairgrove Signed-off-by:

[HMM-v25 04/19] mm/hmm/mirror: helper to snapshot CPU page table v4

2017-08-16 Thread Jérôme Glisse
-by: Jérôme Glisse Signed-off-by: Evgeny Baskakov Signed-off-by: John Hubbard Signed-off-by: Mark Hairgrove Signed-off-by: Sherry Cheung Signed-off-by: Subhash Gutti --- include/linux/hmm.h | 55 +- mm/hmm.c| 285 2

[HMM-v25 02/19] mm/hmm: heterogeneous memory management (HMM for short) v5

2017-08-16 Thread Jérôme Glisse
pattern) Signed-off-by: Jérôme Glisse Signed-off-by: Evgeny Baskakov Signed-off-by: John Hubbard Signed-off-by: Mark Hairgrove Signed-off-by: Sherry Cheung Signed-off-by: Subhash Gutti --- include/linux/hmm.h | 152 +++ include/linux/mm_types.h

[HMM-v25 07/19] mm/ZONE_DEVICE: new type of ZONE_DEVICE for unaddressable memory v5

2017-08-16 Thread Jérôme Glisse
memory (from device unaddressable) Signed-off-by: Jérôme Glisse Acked-by: Dan Williams Cc: Ross Zwisler --- fs/proc/task_mmu.c | 7 + include/linux/ioport.h | 1 + include/linux/memremap.h | 73 include/linux/mm.h | 12

[HMM-v25 09/19] mm/memcontrol: allow to uncharge page without using page->lru field

2017-08-16 Thread Jérôme Glisse
gic, it is the same as it was before this patch. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Johannes Weiner <han...@cmpxchg.org> Cc: Michal Hocko <mho...@kernel.org> Cc: Vladimir Davydov <vdavydov@gmail.com> Cc: cgro...@vger.kernel.org

[HMM-v25 05/19] mm/hmm/mirror: device page fault handler

2017-08-16 Thread Jérôme Glisse
This handle page fault on behalf of device driver, unlike handle_mm_fault() it does not trigger migration back to system memory for device memory. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Signed-off-by: Evgeny Baskakov <ebaska...@nvidia.com> Signed-off-by: John Hu

[HMM-v25 09/19] mm/memcontrol: allow to uncharge page without using page->lru field

2017-08-16 Thread Jérôme Glisse
gic, it is the same as it was before this patch. Signed-off-by: Jérôme Glisse Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: cgro...@vger.kernel.org --- mm/memcontrol.c | 168 +++- 1 file changed, 92 insertions(+), 76 deletions(-) diff --

[HMM-v25 05/19] mm/hmm/mirror: device page fault handler

2017-08-16 Thread Jérôme Glisse
This handle page fault on behalf of device driver, unlike handle_mm_fault() it does not trigger migration back to system memory for device memory. Signed-off-by: Jérôme Glisse Signed-off-by: Evgeny Baskakov Signed-off-by: John Hubbard Signed-off-by: Mark Hairgrove Signed-off-by: Sherry Cheung

[HMM-v25 08/19] mm/ZONE_DEVICE: special case put_page() for device private pages v4

2017-08-16 Thread Jérôme Glisse
since v1: - use static key to disable special code path in put_page() by default - uninline put_zone_device_private_page() - fix build issues with some kernel config related to header inter-dependency Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Kirill A. Shutemov <kir

[HMM-v25 08/19] mm/ZONE_DEVICE: special case put_page() for device private pages v4

2017-08-16 Thread Jérôme Glisse
since v1: - use static key to disable special code path in put_page() by default - uninline put_zone_device_private_page() - fix build issues with some kernel config related to header inter-dependency Signed-off-by: Jérôme Glisse Cc: Kirill A. Shutemov Cc: Dan Williams Cc: Ross

[HMM-v25 12/19] mm/hmm/devmem: dummy HMM device for ZONE_DEVICE memory v3

2017-08-16 Thread Jérôme Glisse
device_initcall() and drop everything that is module specific Changed since v1: - Improve commit message - Add drvdata parameter to set on struct device Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Signed-off-by: Evgeny Baskakov <ebaska...@nvidia.com> Signed-off-by: John Hubbard <jhub

[HMM-v25 12/19] mm/hmm/devmem: dummy HMM device for ZONE_DEVICE memory v3

2017-08-16 Thread Jérôme Glisse
device_initcall() and drop everything that is module specific Changed since v1: - Improve commit message - Add drvdata parameter to set on struct device Signed-off-by: Jérôme Glisse Signed-off-by: Evgeny Baskakov Signed-off-by: John Hubbard Signed-off-by: Mark Hairgrove Signed-off-by: Sherry Cheung

[HMM-v25 11/19] mm/hmm/devmem: device memory hotplug using ZONE_DEVICE v7

2017-08-16 Thread Jérôme Glisse
- make this x86-64 only for now Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Signed-off-by: Evgeny Baskakov <ebaska...@nvidia.com> Signed-off-by: John Hubbard <jhubb...@nvidia.com> Signed-off-by: Mark Hairgrove <mhairgr...@nvidia.com> Signed-off-by: Sherry Cheung <

[HMM-v25 11/19] mm/hmm/devmem: device memory hotplug using ZONE_DEVICE v7

2017-08-16 Thread Jérôme Glisse
- make this x86-64 only for now Signed-off-by: Jérôme Glisse Signed-off-by: Evgeny Baskakov Signed-off-by: John Hubbard Signed-off-by: Mark Hairgrove Signed-off-by: Sherry Cheung Signed-off-by: Subhash Gutti Signed-off-by: Balbir Singh --- include/linux/hmm.h | 155

[HMM-v25 16/19] mm/migrate: support un-addressable ZONE_DEVICE page in migration v3

2017-08-16 Thread Jérôme Glisse
-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Kirill A. Shutemov <kirill.shute...@linux.intel.com> --- include/linux/migrate.h | 10 +++- mm/migrate.c| 149 +++- mm/page_vma_mapped.c| 10 mm/rmap.c | 25

[HMM-v25 16/19] mm/migrate: support un-addressable ZONE_DEVICE page in migration v3

2017-08-16 Thread Jérôme Glisse
-off-by: Jérôme Glisse Cc: Kirill A. Shutemov --- include/linux/migrate.h | 10 +++- mm/migrate.c| 149 +++- mm/page_vma_mapped.c| 10 mm/rmap.c | 25 4 files changed, 164 insertions(+), 30 deletions

[HMM-v25 15/19] mm/migrate: migrate_vma() unmap page from vma while collecting pages

2017-08-16 Thread Jérôme Glisse
Common case for migration of virtual address range is page are map only once inside the vma in which migration is taking place. Because we already walk the CPU page table for that range we can directly do the unmap there and setup special migration swap entry. Signed-off-by: Jérôme Glisse <j

[HMM-v25 15/19] mm/migrate: migrate_vma() unmap page from vma while collecting pages

2017-08-16 Thread Jérôme Glisse
Common case for migration of virtual address range is page are map only once inside the vma in which migration is taking place. Because we already walk the CPU page table for that range we can directly do the unmap there and setup special migration swap entry. Signed-off-by: Jérôme Glisse Signed

[HMM-v25 14/19] mm/migrate: new memory migration helper for use with device memory v5

2017-08-16 Thread Jérôme Glisse
for page with single mapping Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Signed-off-by: Evgeny Baskakov <ebaska...@nvidia.com> Signed-off-by: John Hubbard <jhubb...@nvidia.com> Signed-off-by: Mark Hairgrove <mhairgr...@nvidia.com> Signed-off-by: Sherry Cheung <sch

[HMM-v25 14/19] mm/migrate: new memory migration helper for use with device memory v5

2017-08-16 Thread Jérôme Glisse
for page with single mapping Signed-off-by: Jérôme Glisse Signed-off-by: Evgeny Baskakov Signed-off-by: John Hubbard Signed-off-by: Mark Hairgrove Signed-off-by: Sherry Cheung Signed-off-by: Subhash Gutti --- include/linux/migrate.h | 104 ++ mm/migrate.c| 492

[HMM-v25 19/19] mm/hmm: add new helper to hotplug CDM memory region v3

2017-08-16 Thread Jérôme Glisse
Unlike unaddressable memory, coherent device memory has a real resource associated with it on the system (as CPU can address it). Add a new helper to hotplug such memory within the HMM framework. Changed since v2: - s/host/public Changed since v1: - s/public/host Signed-off-by: Jérôme Glisse

[HMM-v25 06/19] mm/memory_hotplug: introduce add_pages

2017-08-16 Thread Jérôme Glisse
ne its implementation and select CONFIG_ARCH_HAS_ADD_PAGES. All others use the currently existing __add_pages. Signed-off-by: Michal Hocko <mho...@suse.com> Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Acked-by: Balbir Singh <bsinghar...@gmail.com> --- arch/x86/Kconfig

[HMM-v25 19/19] mm/hmm: add new helper to hotplug CDM memory region v3

2017-08-16 Thread Jérôme Glisse
Unlike unaddressable memory, coherent device memory has a real resource associated with it on the system (as CPU can address it). Add a new helper to hotplug such memory within the HMM framework. Changed since v2: - s/host/public Changed since v1: - s/public/host Signed-off-by: Jérôme Glisse

[HMM-v25 06/19] mm/memory_hotplug: introduce add_pages

2017-08-16 Thread Jérôme Glisse
and select CONFIG_ARCH_HAS_ADD_PAGES. All others use the currently existing __add_pages. Signed-off-by: Michal Hocko Signed-off-by: Jérôme Glisse Acked-by: Balbir Singh --- arch/x86/Kconfig | 4 arch/x86/mm/init_64.c | 22 +++--- include/linux

[HMM-v25 17/19] mm/migrate: allow migrate_vma() to alloc new page on empty entry v4

2017-08-16 Thread Jérôme Glisse
since v1: - 5 level page table fix Signed-off-by: Jérôme Glisse <jgli...@redhat.com> --- include/linux/migrate.h | 9 +++ mm/migrate.c| 205 +--- 2 files changed, 205 insertions(+), 9 deletions(-) diff --git a/include/linux/migra

[HMM-v25 18/19] mm/device-public-memory: device memory cache coherent with CPU v5

2017-08-16 Thread Jérôme Glisse
since v4: - added memory cgroup change to this patch Changed since v3: - s/public/public (going back) Changed since v2: - s/public/public - add proper include in migrate.c and drop useless #if/#endif Changed since v1: - Kconfig and #if/#else cleanup Signed-off-by: Jérôme Glisse <j

[HMM-v25 17/19] mm/migrate: allow migrate_vma() to alloc new page on empty entry v4

2017-08-16 Thread Jérôme Glisse
since v1: - 5 level page table fix Signed-off-by: Jérôme Glisse --- include/linux/migrate.h | 9 +++ mm/migrate.c| 205 +--- 2 files changed, 205 insertions(+), 9 deletions(-) diff --git a/include/linux/migrate.h b/include/linux/migrate.h

[HMM-v25 18/19] mm/device-public-memory: device memory cache coherent with CPU v5

2017-08-16 Thread Jérôme Glisse
since v4: - added memory cgroup change to this patch Changed since v3: - s/public/public (going back) Changed since v2: - s/public/public - add proper include in migrate.c and drop useless #if/#endif Changed since v1: - Kconfig and #if/#else cleanup Signed-off-by: Jérôme Glisse Cc: Aneesh

[HMM-v25 00/19] HMM (Heterogeneous Memory Management) v25

2017-08-16 Thread Jérôme Glisse
https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1404788.html v24 https://lwn.net/Articles/726691/ Jérôme Glisse (18): hmm: heterogeneous memory management documentation v3 mm/hmm: heterogeneous memory management (HMM for short) v5 mm/hmm/mirror: mirror process address space

[HMM-v25 13/19] mm/migrate: new migrate mode MIGRATE_SYNC_NO_COPY

2017-08-16 Thread Jérôme Glisse
for thing like HMM (see include/linux/hmm.h). Signed-off-by: Jérôme Glisse <jgli...@redhat.com> --- fs/aio.c | 8 +++ fs/f2fs/data.c | 5 - fs/hugetlbfs/inode.c | 5 - fs/ubifs/file.c | 5 - include/linux/migrate.h

[HMM-v25 00/19] HMM (Heterogeneous Memory Management) v25

2017-08-16 Thread Jérôme Glisse
https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1404788.html v24 https://lwn.net/Articles/726691/ Jérôme Glisse (18): hmm: heterogeneous memory management documentation v3 mm/hmm: heterogeneous memory management (HMM for short) v5 mm/hmm/mirror: mirror process address space

[HMM-v25 13/19] mm/migrate: new migrate mode MIGRATE_SYNC_NO_COPY

2017-08-16 Thread Jérôme Glisse
for thing like HMM (see include/linux/hmm.h). Signed-off-by: Jérôme Glisse --- fs/aio.c | 8 +++ fs/f2fs/data.c | 5 - fs/hugetlbfs/inode.c | 5 - fs/ubifs/file.c | 5 - include/linux/migrate.h | 5 + include/linux

[HMM-v25 10/19] mm/memcontrol: support MEMORY_DEVICE_PRIVATE v4

2017-08-16 Thread Jérôme Glisse
device memory behave and why Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Acked-by: Balbir Singh <bsinghar...@gmail.com> Cc: Johannes Weiner <han...@cmpxchg.org> Cc: Michal Hocko <mho...@kernel.org> Cc: Vladimir Davydov <vdavydov@gmail.com> Cc: cgro...@vger.ker

[HMM-v25 10/19] mm/memcontrol: support MEMORY_DEVICE_PRIVATE v4

2017-08-16 Thread Jérôme Glisse
device memory behave and why Signed-off-by: Jérôme Glisse Acked-by: Balbir Singh Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: cgro...@vger.kernel.org --- kernel/memremap.c | 1 + mm/memcontrol.c | 52 2 files changed, 49

[PATCH 2/6] mm/device-public-memory: device memory cache coherent with CPU v4

2017-07-13 Thread Jérôme Glisse
since v3: - s/public/public (going back) Changed since v2: - s/public/public - add proper include in migrate.c and drop useless #if/#endif Changed since v1: - Kconfig and #if/#else cleanup Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Balbir Singh <balb...@au1.ibm.com> Cc:

[PATCH 2/6] mm/device-public-memory: device memory cache coherent with CPU v4

2017-07-13 Thread Jérôme Glisse
since v3: - s/public/public (going back) Changed since v2: - s/public/public - add proper include in migrate.c and drop useless #if/#endif Changed since v1: - Kconfig and #if/#else cleanup Signed-off-by: Jérôme Glisse Cc: Balbir Singh Cc: Aneesh Kumar Cc: Paul E. McKenney Cc: Benjamin

[PATCH 1/6] mm/zone-device: rename DEVICE_PUBLIC to DEVICE_HOST

2017-07-13 Thread Jérôme Glisse
the memory is (for instance on board GPU memory). There is no functional change here. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Dan Williams <dan.j.willi...@intel.com> Cc: Ross Zwisler <ross.zwis...@linux.intel.com> --- include/linux/memremap.h | 4 ++-- kernel/memremap.

[PATCH 1/6] mm/zone-device: rename DEVICE_PUBLIC to DEVICE_HOST

2017-07-13 Thread Jérôme Glisse
the memory is (for instance on board GPU memory). There is no functional change here. Signed-off-by: Jérôme Glisse Cc: Dan Williams Cc: Ross Zwisler --- include/linux/memremap.h | 4 ++-- kernel/memremap.c| 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux

[PATCH 3/6] mm/hmm: add new helper to hotplug CDM memory region v3

2017-07-13 Thread Jérôme Glisse
Unlike unaddressable memory, coherent device memory has a real resource associated with it on the system (as CPU can address it). Add a new helper to hotplug such memory within the HMM framework. Changed since v2: - s/host/public Changed since v1: - s/public/host Signed-off-by: Jérôme Glisse

[PATCH 3/6] mm/hmm: add new helper to hotplug CDM memory region v3

2017-07-13 Thread Jérôme Glisse
Unlike unaddressable memory, coherent device memory has a real resource associated with it on the system (as CPU can address it). Add a new helper to hotplug such memory within the HMM framework. Changed since v2: - s/host/public Changed since v1: - s/public/host Signed-off-by: Jérôme Glisse

[PATCH 0/6] Cache coherent device memory (CDM) with HMM v5

2017-07-13 Thread Jérôme Glisse
05 - update memory controller to properly handle ZONE_DEVICE pages when uncharging patch 06 - documentation patch Previous posting: v1 https://lkml.org/lkml/2017/4/7/638 v2 https://lwn.net/Articles/725412/ v3 https://lwn.net/Articles/727114/ v4 https://lwn.net/Articles/727692/ Jérôme

[PATCH 5/6] mm/memcontrol: support MEMORY_DEVICE_PRIVATE and MEMORY_DEVICE_PUBLIC v3

2017-07-13 Thread Jérôme Glisse
or as file back page. So from memcg point of view we want to handle them like regular page for now at least. Changed since v2: - s/host/public Changed since v1: - s/public/host - add comments explaining how device memory behave and why Signed-off-by: Jérôme Glisse <jgli...@redhat.com&

[PATCH 4/6] mm/memcontrol: allow to uncharge page without using page->lru field

2017-07-13 Thread Jérôme Glisse
gic, it is the same as it was before this patch. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Johannes Weiner <han...@cmpxchg.org> Cc: Michal Hocko <mho...@kernel.org> Cc: Vladimir Davydov <vdavydov@gmail.com> Cc: cgro...@vger.kernel.org

[PATCH 6/6] mm/hmm: documents how device memory is accounted in rss and memcg

2017-07-13 Thread Jérôme Glisse
and unaccounted when a process exit. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Michal Hocko <mho...@kernel.org> --- Documentation/vm/hmm.txt | 40 1 file changed, 40 insertions(+) diff --git a/Documentation/vm/hmm.txt b/Documentation/vm/h

[PATCH 0/6] Cache coherent device memory (CDM) with HMM v5

2017-07-13 Thread Jérôme Glisse
05 - update memory controller to properly handle ZONE_DEVICE pages when uncharging patch 06 - documentation patch Previous posting: v1 https://lkml.org/lkml/2017/4/7/638 v2 https://lwn.net/Articles/725412/ v3 https://lwn.net/Articles/727114/ v4 https://lwn.net/Articles/727692/ Jérôme

[PATCH 5/6] mm/memcontrol: support MEMORY_DEVICE_PRIVATE and MEMORY_DEVICE_PUBLIC v3

2017-07-13 Thread Jérôme Glisse
or as file back page. So from memcg point of view we want to handle them like regular page for now at least. Changed since v2: - s/host/public Changed since v1: - s/public/host - add comments explaining how device memory behave and why Signed-off-by: Jérôme Glisse Cc: Johannes Weiner Cc

[PATCH 4/6] mm/memcontrol: allow to uncharge page without using page->lru field

2017-07-13 Thread Jérôme Glisse
gic, it is the same as it was before this patch. Signed-off-by: Jérôme Glisse Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: cgro...@vger.kernel.org --- mm/memcontrol.c | 168 +++- 1 file changed, 92 insertions(+), 76 deletions(-) diff --

[PATCH 6/6] mm/hmm: documents how device memory is accounted in rss and memcg

2017-07-13 Thread Jérôme Glisse
and unaccounted when a process exit. Signed-off-by: Jérôme Glisse Cc: Michal Hocko --- Documentation/vm/hmm.txt | 40 1 file changed, 40 insertions(+) diff --git a/Documentation/vm/hmm.txt b/Documentation/vm/hmm.txt index 192dcdb38bd1..4d3aac9f4a5d 100644

[PATCH 1/5] mm/device-host-memory: device memory cache coherent with CPU v3

2017-07-12 Thread Jérôme Glisse
since v2: - s/public/host - add proper include in migrate.c and drop useless #if/#endif Changed since v1: - Kconfig and #if/#else cleanup Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Balbir Singh <balb...@au1.ibm.com> Cc: Aneesh Kumar <aneesh.ku...@linux.vnet.ibm.

[PATCH 1/5] mm/device-host-memory: device memory cache coherent with CPU v3

2017-07-12 Thread Jérôme Glisse
since v2: - s/public/host - add proper include in migrate.c and drop useless #if/#endif Changed since v1: - Kconfig and #if/#else cleanup Signed-off-by: Jérôme Glisse Cc: Balbir Singh Cc: Aneesh Kumar Cc: Paul E. McKenney Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: Ross Zwisler --- fs

  1   2   3   4   5   6   7   8   9   >