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

2017-05-24 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 03/15] mm/hmm/mirror: mirror process address space on device with HMM helpers v3

2017-05-24 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 09/18] mm/hmm/devmem: device memory hotplug using ZONE_DEVICE v5

2017-05-23 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 09/18] mm/hmm/devmem: device memory hotplug using ZONE_DEVICE v5

2017-05-23 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 | 114 ++ mm/Kconfig | 9 ++ mm/hmm.c| 416

[HMM 07/18] mm/ZONE_DEVICE: new type of ZONE_DEVICE for unaddressable memory v3

2017-05-23 Thread Jérôme Glisse
: - s/DEVICE_UNADDRESSABLE/DEVICE_PRIVATE Changed since v1: - rename to device private 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> ---

[HMM 07/18] mm/ZONE_DEVICE: new type of ZONE_DEVICE for unaddressable memory v3

2017-05-23 Thread Jérôme Glisse
: - s/DEVICE_UNADDRESSABLE/DEVICE_PRIVATE Changed since v1: - rename to device private 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

[HMM 08/18] mm/ZONE_DEVICE: special case put_page() for device private pages v2

2017-05-23 Thread Jérôme Glisse
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 <kirill.shute...@linux.intel.com> Cc: Dan Williams <dan.j.willi...@intel.com> Cc: Ross

[HMM 08/18] mm/ZONE_DEVICE: special case put_page() for device private pages v2

2017-05-23 Thread Jérôme Glisse
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 Zwisler --- include/linux/memremap.h | 13 + include/linux/mm.h | 31

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

2017-05-22 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 03/15] mm/hmm/mirror: mirror process address space on device with HMM helpers v3

2017-05-22 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 02/15] mm/hmm: heterogeneous memory management (HMM for short) v3

2017-05-22 Thread Jérôme Glisse
to all of those 3 functionality. 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-

[HMM 02/15] mm/hmm: heterogeneous memory management (HMM for short) v3

2017-05-22 Thread Jérôme Glisse
to all of those 3 functionality. 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

[HMM 01/15] hmm: heterogeneous memory management documentation

2017-05-22 Thread Jérôme Glisse
This add documentation for HMM (Heterogeneous Memory Management). It presents the motivation behind it, the features necessary for it to be useful and and gives an overview of how this is implemented. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> --- Documentation/vm/hmm.txt

[HMM 01/15] hmm: heterogeneous memory management documentation

2017-05-22 Thread Jérôme Glisse
This add documentation for HMM (Heterogeneous Memory Management). It presents the motivation behind it, the features necessary for it to be useful and and gives an overview of how this is implemented. Signed-off-by: Jérôme Glisse --- Documentation/vm/hmm.txt | 362

[HMM 05/15] mm/hmm/mirror: device page fault handler

2017-05-22 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 11/15] mm/migrate: new migrate mode MIGRATE_SYNC_NO_COPY

2017-05-22 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 11/15] mm/migrate: new migrate mode MIGRATE_SYNC_NO_COPY

2017-05-22 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 05/15] mm/hmm/mirror: device page fault handler

2017-05-22 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 10/15] mm/hmm/devmem: dummy HMM device for ZONE_DEVICE memory v3

2017-05-22 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 10/15] mm/hmm/devmem: dummy HMM device for ZONE_DEVICE memory v3

2017-05-22 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 09/15] mm/hmm/devmem: device memory hotplug using ZONE_DEVICE v4

2017-05-22 Thread Jérôme Glisse
v3: - s/device unaddressable/device private/ Changed since v2: - s/SECTION_SIZE/PA_SECTION_SIZE Changed since v1: - change to adapt to new add_pages() helper - make this x86-64 only for now Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Signed-off-by: Evgeny Baskakov &

[HMM 09/15] mm/hmm/devmem: device memory hotplug using ZONE_DEVICE v4

2017-05-22 Thread Jérôme Glisse
v3: - s/device unaddressable/device private/ Changed since v2: - s/SECTION_SIZE/PA_SECTION_SIZE Changed since v1: - change to adapt to new add_pages() helper - 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

[HMM 08/15] mm/ZONE_DEVICE: special case put_page() for device private pages

2017-05-22 Thread Jérôme Glisse
A ZONE_DEVICE page that reach a refcount of 1 is free ie no longer have any user. For device private pages this is important to catch and thus we need to special case put_page() for this. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Kirill A. Shutemov <kirill.shute...@linux.inte

[HMM 08/15] mm/ZONE_DEVICE: special case put_page() for device private pages

2017-05-22 Thread Jérôme Glisse
A ZONE_DEVICE page that reach a refcount of 1 is free ie no longer have any user. For device private pages this is important to catch and thus we need to special case put_page() for this. Signed-off-by: Jérôme Glisse Cc: Kirill A. Shutemov Cc: Dan Williams Cc: Ross Zwisler --- include/linux

[HMM 15/15] mm/migrate: allow migrate_vma() to alloc new page on empty entry v2

2017-05-22 Thread Jérôme Glisse
memory than having to fault later on. Changed since v1: - 5 level page table fix Signed-off-by: Jérôme Glisse <jgli...@redhat.com> --- mm/migrate.c | 135 +-- 1 file changed, 131 insertions(+), 4 deletions(-) diff --git a/mm/migra

[HMM 15/15] mm/migrate: allow migrate_vma() to alloc new page on empty entry v2

2017-05-22 Thread Jérôme Glisse
memory than having to fault later on. Changed since v1: - 5 level page table fix Signed-off-by: Jérôme Glisse --- mm/migrate.c | 135 +-- 1 file changed, 131 insertions(+), 4 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index

[HMM 04/15] mm/hmm/mirror: helper to snapshot CPU page table v3

2017-05-22 Thread Jérôme Glisse
This does not use existing page table walker because we want to share same code for our page fault handler. Changed since v2: - s/device unaddressable/device private/ Changes since v1: - Use spinlock instead of rcu synchronized list traversal Signed-off-by: Jérôme Glisse <jgli...@redhat.

[HMM 06/15] mm/memory_hotplug: introduce add_pages

2017-05-22 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> --- arch/x86/Kconfig | 4 arch/x86/mm/init_

[HMM 04/15] mm/hmm/mirror: helper to snapshot CPU page table v3

2017-05-22 Thread Jérôme Glisse
This does not use existing page table walker because we want to share same code for our page fault handler. Changed since v2: - s/device unaddressable/device private/ Changes since v1: - Use spinlock instead of rcu synchronized list traversal Signed-off-by: Jérôme Glisse Signed-off

[HMM 06/15] mm/memory_hotplug: introduce add_pages

2017-05-22 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 --- arch/x86/Kconfig | 4 arch/x86/mm/init_64.c | 22 +++--- include/linux/memory_hotplug.h | 11 +++ 3

[HMM 14/15] mm/migrate: support un-addressable ZONE_DEVICE page in migration v2

2017-05-22 Thread Jérôme Glisse
Allow to unmap and restore special swap entry of un-addressable ZONE_DEVICE memory. Changed since v1: - s/device unaddressable/device private/ Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Kirill A. Shutemov <kirill.shute...@linux.intel.com> --- include/linux/migrate.h |

[HMM 14/15] mm/migrate: support un-addressable ZONE_DEVICE page in migration v2

2017-05-22 Thread Jérôme Glisse
Allow to unmap and restore special swap entry of un-addressable ZONE_DEVICE memory. Changed since v1: - s/device unaddressable/device private/ Signed-off-by: Jérôme Glisse Cc: Kirill A. Shutemov --- include/linux/migrate.h | 10 +++- mm/migrate.c| 134

[HMM 12/15] mm/migrate: new memory migration helper for use with device memory v4

2017-05-22 Thread Jérôme Glisse
for device that have large pool of such like GPU, NVidia plans to use HMM for that. Changes since v3: - Rebase Changes since v2: - droped HMM prefix and HMM specific code Changes since v1: - typos fix - split early unmap optimization for page with single mapping Signed-off-by: Jérôme Glisse

[HMM 12/15] mm/migrate: new memory migration helper for use with device memory v4

2017-05-22 Thread Jérôme Glisse
for device that have large pool of such like GPU, NVidia plans to use HMM for that. Changes since v3: - Rebase Changes since v2: - droped HMM prefix and HMM specific code Changes since v1: - typos fix - split early unmap optimization for page with single mapping Signed-off-by: Jérôme Glisse

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

2017-05-22 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 13/15] mm/migrate: migrate_vma() unmap page from vma while collecting pages

2017-05-22 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 07/15] mm/ZONE_DEVICE: new type of ZONE_DEVICE for unaddressable memory v2

2017-05-22 Thread Jérôme Glisse
: - rename to device private memory (from device unaddressable) 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> --- fs/proc/task_mmu.c | 7 + include/linux/ioport.h |

[HMM 07/15] mm/ZONE_DEVICE: new type of ZONE_DEVICE for unaddressable memory v2

2017-05-22 Thread Jérôme Glisse
: - rename to device private memory (from device unaddressable) Signed-off-by: Jérôme Glisse Cc: Dan Williams Cc: Ross Zwisler --- fs/proc/task_mmu.c | 7 + include/linux/ioport.h | 1 + include/linux/memremap.h | 70 include

[HMM 00/15] HMM (Heterogeneous Memory Management) v22

2017-05-22 Thread Jérôme Glisse
/Articles/720715/ v21 https://lkml.org/lkml/2017/4/24/747 Jérôme Glisse (14): hmm: heterogeneous memory management documentation mm/hmm: heterogeneous memory management (HMM for short) v3 mm/hmm/mirror: mirror process address space on device with HMM helpers v3 mm/hmm/mirror: helper

[HMM 00/15] HMM (Heterogeneous Memory Management) v22

2017-05-22 Thread Jérôme Glisse
/Articles/720715/ v21 https://lkml.org/lkml/2017/4/24/747 Jérôme Glisse (14): hmm: heterogeneous memory management documentation mm/hmm: heterogeneous memory management (HMM for short) v3 mm/hmm/mirror: mirror process address space on device with HMM helpers v3 mm/hmm/mirror: helper

[PATCH] x86/mm: synchronize pgd in vmemmap_free()

2017-05-19 Thread Jérôme Glisse
When we free kernel virtual map we should synchronize p4d/pud for all the pgds to avoid any stall entry in non canonical pgd. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Kirill A. Shutemov <kirill.shute...@linux.intel.com> Cc: Andrew Morton <a...@linux-foundation.org&g

[PATCH] x86/mm: pgds getting out of sync after memory hot remove

2017-05-19 Thread Jérôme Glisse
irill.shute...@linux.intel.com> Cc: Andrew Morton <a...@linux-foundation.org> Cc: Ingo Molnar <mi...@kernel.org> Cc: Michal Hocko <mho...@suse.com> Cc: Mel Gorman <mgor...@suse.de> Jérôme Glisse (1): x86/mm: synchronize pgd in vmemmap_free() arch/x86/mm/init_64.c | 17

[PATCH] x86/mm: synchronize pgd in vmemmap_free()

2017-05-19 Thread Jérôme Glisse
When we free kernel virtual map we should synchronize p4d/pud for all the pgds to avoid any stall entry in non canonical pgd. Signed-off-by: Jérôme Glisse Cc: Kirill A. Shutemov Cc: Andrew Morton Cc: Ingo Molnar Cc: Michal Hocko Cc: Mel Gorman --- arch/x86/mm/init_64.c | 17

[PATCH] x86/mm: pgds getting out of sync after memory hot remove

2017-05-19 Thread Jérôme Glisse
w Morton Cc: Ingo Molnar Cc: Michal Hocko Cc: Mel Gorman Jérôme Glisse (1): x86/mm: synchronize pgd in vmemmap_free() arch/x86/mm/init_64.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) -- 2.4.11

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

2017-04-24 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 06/15] mm/migrate: migrate_vma() unmap page from vma while collecting pages

2017-04-24 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 07/15] mm/hmm: heterogeneous memory management (HMM for short) v3

2017-04-24 Thread Jérôme Glisse
to all of those 3 functionality. 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-

[HMM 07/15] mm/hmm: heterogeneous memory management (HMM for short) v3

2017-04-24 Thread Jérôme Glisse
to all of those 3 functionality. 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

[HMM 08/15] mm/hmm/mirror: mirror process address space on device with HMM helpers v3

2017-04-24 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 09/15] mm/hmm/mirror: helper to snapshot CPU page table v3

2017-04-24 Thread Jérôme Glisse
This does not use existing page table walker because we want to share same code for our page fault handler. Changed since v2: - s/device unaddressable/device private/ Changes since v1: - Use spinlock instead of rcu synchronized list traversal Signed-off-by: Jérôme Glisse <jgli...@redhat.

[HMM 08/15] mm/hmm/mirror: mirror process address space on device with HMM helpers v3

2017-04-24 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 09/15] mm/hmm/mirror: helper to snapshot CPU page table v3

2017-04-24 Thread Jérôme Glisse
This does not use existing page table walker because we want to share same code for our page fault handler. Changed since v2: - s/device unaddressable/device private/ Changes since v1: - Use spinlock instead of rcu synchronized list traversal Signed-off-by: Jérôme Glisse Signed-off

[HMM 10/15] mm/hmm/mirror: device page fault handler

2017-04-24 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 10/15] mm/hmm/mirror: device page fault handler

2017-04-24 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 11/15] mm/migrate: support un-addressable ZONE_DEVICE page in migration v2

2017-04-24 Thread Jérôme Glisse
Allow to unmap and restore special swap entry of un-addressable ZONE_DEVICE memory. Changed since v1: - s/device unaddressable/device private/ Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Cc: Kirill A. Shutemov <kirill.shute...@linux.intel.com> --- include/linux/migrate.h |

[HMM 11/15] mm/migrate: support un-addressable ZONE_DEVICE page in migration v2

2017-04-24 Thread Jérôme Glisse
Allow to unmap and restore special swap entry of un-addressable ZONE_DEVICE memory. Changed since v1: - s/device unaddressable/device private/ Signed-off-by: Jérôme Glisse Cc: Kirill A. Shutemov --- include/linux/migrate.h | 10 +++- mm/migrate.c| 136

[HMM 12/15] mm/migrate: allow migrate_vma() to alloc new page on empty entry v2

2017-04-24 Thread Jérôme Glisse
memory than having to fault later on. Changed since v1: - 5 level page table fix Signed-off-by: Jérôme Glisse <jgli...@redhat.com> --- mm/migrate.c | 135 +-- 1 file changed, 131 insertions(+), 4 deletions(-) diff --git a/mm/migra

[HMM 12/15] mm/migrate: allow migrate_vma() to alloc new page on empty entry v2

2017-04-24 Thread Jérôme Glisse
memory than having to fault later on. Changed since v1: - 5 level page table fix Signed-off-by: Jérôme Glisse --- mm/migrate.c | 135 +-- 1 file changed, 131 insertions(+), 4 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index

[HMM 13/15] mm/hmm/devmem: device memory hotplug using ZONE_DEVICE v4

2017-04-24 Thread Jérôme Glisse
v3: - s/device unaddressable/device private/ Changed since v2: - s/SECTION_SIZE/PA_SECTION_SIZE Changed since v1: - change to adapt to new add_pages() helper - make this x86-64 only for now Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Signed-off-by: Evgeny Baskakov &

[HMM 02/15] mm/put_page: move ZONE_DEVICE page reference decrement v2

2017-04-24 Thread Jérôme Glisse
page refcount never reach 0). This patch is just a preparatory patch for HMM. Changes since v1: - commit message Signed-off-by: Jérôme Glisse <jgli...@redhat.com> Reviewed-by: Dan Williams <dan.j.willi...@intel.com> Cc: Ross Zwisler <ross.zwis...@linux.intel.com> --- inclu

[HMM 13/15] mm/hmm/devmem: device memory hotplug using ZONE_DEVICE v4

2017-04-24 Thread Jérôme Glisse
v3: - s/device unaddressable/device private/ Changed since v2: - s/SECTION_SIZE/PA_SECTION_SIZE Changed since v1: - change to adapt to new add_pages() helper - 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

[HMM 02/15] mm/put_page: move ZONE_DEVICE page reference decrement v2

2017-04-24 Thread Jérôme Glisse
page refcount never reach 0). This patch is just a preparatory patch for HMM. Changes since v1: - commit message Signed-off-by: Jérôme Glisse Reviewed-by: Dan Williams Cc: Ross Zwisler --- include/linux/mm.h | 14 +++--- kernel/memremap.c | 6 ++ 2 files changed, 17 insertions

[HMM 15/15] hmm: heterogeneous memory management documentation

2017-04-24 Thread Jérôme Glisse
This add documentation for HMM (Heterogeneous Memory Management). It presents the motivation behind it, the features necessary for it to be useful and and gives an overview of how this is implemented. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> --- Documentation/vm/hmm.txt

[HMM 15/15] hmm: heterogeneous memory management documentation

2017-04-24 Thread Jérôme Glisse
This add documentation for HMM (Heterogeneous Memory Management). It presents the motivation behind it, the features necessary for it to be useful and and gives an overview of how this is implemented. Signed-off-by: Jérôme Glisse --- Documentation/vm/hmm.txt | 362

[HMM 14/15] mm/hmm/devmem: dummy HMM device for ZONE_DEVICE memory v3

2017-04-24 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 05/15] mm/migrate: new memory migration helper for use with device memory v4

2017-04-24 Thread Jérôme Glisse
for device that have large pool of such like GPU, NVidia plans to use HMM for that. Changes since v3: - Rebase Changes since v2: - droped HMM prefix and HMM specific code Changes since v1: - typos fix - split early unmap optimization for page with single mapping Signed-off-by: Jérôme Glisse

[HMM 14/15] mm/hmm/devmem: dummy HMM device for ZONE_DEVICE memory v3

2017-04-24 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 05/15] mm/migrate: new memory migration helper for use with device memory v4

2017-04-24 Thread Jérôme Glisse
for device that have large pool of such like GPU, NVidia plans to use HMM for that. Changes since v3: - Rebase Changes since v2: - droped HMM prefix and HMM specific code Changes since v1: - typos fix - split early unmap optimization for page with single mapping Signed-off-by: Jérôme Glisse

[HMM 03/15] mm/private-memory: new type of ZONE_DEVICE for unaddressable memory v2

2017-04-24 Thread Jérôme Glisse
: - rename to device private memory (from device unaddressable) 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> --- fs/proc/task_mmu.c | 7 + include/linux/ioport.h |

[HMM 04/15] mm/migrate: new migrate mode MIGRATE_SYNC_NO_COPY

2017-04-24 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 03/15] mm/private-memory: new type of ZONE_DEVICE for unaddressable memory v2

2017-04-24 Thread Jérôme Glisse
: - rename to device private memory (from device unaddressable) Signed-off-by: Jérôme Glisse Cc: Dan Williams Cc: Ross Zwisler --- fs/proc/task_mmu.c | 7 + include/linux/ioport.h | 1 + include/linux/memremap.h | 82 include

[HMM 04/15] mm/migrate: new migrate mode MIGRATE_SYNC_NO_COPY

2017-04-24 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 01/15] mm, memory_hotplug: introduce add_pages

2017-04-24 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> --- arch/x86/Kconfig | 4 arch/x86/mm/init_

[HMM 01/15] mm, memory_hotplug: introduce add_pages

2017-04-24 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 --- arch/x86/Kconfig | 4 arch/x86/mm/init_64.c | 22 +++--- include/linux/memory_hotplug.h | 11 +++ 3

[HMM 00/15] HMM (Heterogeneous Memory Management) v21

2017-04-24 Thread Jérôme Glisse
://lwn.net/Articles/720715/ Jérôme Glisse (14): mm/put_page: move ZONE_DEVICE page reference decrement v2 mm/private-memory: new type of ZONE_DEVICE for unaddressable memory v2 mm/migrate: new migrate mode MIGRATE_SYNC_NO_COPY mm/migrate: new memory migration helper for use with device memory v4

[HMM 00/15] HMM (Heterogeneous Memory Management) v21

2017-04-24 Thread Jérôme Glisse
://lwn.net/Articles/720715/ Jérôme Glisse (14): mm/put_page: move ZONE_DEVICE page reference decrement v2 mm/private-memory: new type of ZONE_DEVICE for unaddressable memory v2 mm/migrate: new migrate mode MIGRATE_SYNC_NO_COPY mm/migrate: new memory migration helper for use with device memory v4

[HMM 14/15] mm/hmm/devmem: dummy HMM device for ZONE_DEVICE memory v3

2017-04-21 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 14/15] mm/hmm/devmem: dummy HMM device for ZONE_DEVICE memory v3

2017-04-21 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 07/15] mm/hmm: heterogeneous memory management (HMM for short) v2

2017-04-21 Thread Jérôme Glisse
to all of those 3 functionality. 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: John Hubbard <jhubb...@nvidia.com> Signed-off-

[HMM 08/15] mm/hmm/mirror: mirror process address space on device with HMM helpers v2

2017-04-21 Thread Jérôme Glisse
rdware in the future. 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: John Hubbard <jhubb...@nvidia.com> Signed-off-by:

[HMM 07/15] mm/hmm: heterogeneous memory management (HMM for short) v2

2017-04-21 Thread Jérôme Glisse
to all of those 3 functionality. 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: Sherry Cheung Signed-off-by: Subhash Gutti

[HMM 08/15] mm/hmm/mirror: mirror process address space on device with HMM helpers v2

2017-04-21 Thread Jérôme Glisse
rdware in the future. 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: Sherry Cheung Signed-off-by: Subhash Gutti --- include

[HMM 01/15] mm, memory_hotplug: introduce add_pages

2017-04-21 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> --- arch/x86/Kconfig | 4 arch/x86/mm/init_

[HMM 01/15] mm, memory_hotplug: introduce add_pages

2017-04-21 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 --- arch/x86/Kconfig | 4 arch/x86/mm/init_64.c | 22 +++--- include/linux/memory_hotplug.h | 11 +++ 3

[HMM 03/15] mm/unaddressable-memory: new type of ZONE_DEVICE for unaddressable memory

2017-04-21 Thread Jérôme Glisse
-by: Jérôme Glisse <jgli...@redhat.com> Cc: 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/linux/memremap.h | 82 +

[HMM 03/15] mm/unaddressable-memory: new type of ZONE_DEVICE for unaddressable memory

2017-04-21 Thread Jérôme Glisse
-by: Jérôme Glisse Cc: Dan Williams Cc: Ross Zwisler --- fs/proc/task_mmu.c | 7 + include/linux/ioport.h | 1 + include/linux/memremap.h | 82 include/linux/swap.h | 24 -- include/linux/swapops.h | 68

[HMM 04/15] mm/migrate: new migrate mode MIGRATE_SYNC_NO_COPY

2017-04-21 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 11/15] mm/migrate: support un-addressable ZONE_DEVICE page in migration

2017-04-21 Thread Jérôme Glisse
Allow to unmap and restore special swap entry of un-addressable ZONE_DEVICE memory. Signed-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

[HMM 04/15] mm/migrate: new migrate mode MIGRATE_SYNC_NO_COPY

2017-04-21 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 11/15] mm/migrate: support un-addressable ZONE_DEVICE page in migration

2017-04-21 Thread Jérôme Glisse
Allow to unmap and restore special swap entry of un-addressable ZONE_DEVICE memory. Signed-off-by: Jérôme Glisse Cc: Kirill A. Shutemov --- include/linux/migrate.h | 10 +++- mm/migrate.c| 136 ++-- mm/page_vma_mapped.c| 10 mm

[HMM 05/15] mm/migrate: new memory migration helper for use with device memory v4

2017-04-21 Thread Jérôme Glisse
for device that have large pool of such like GPU, NVidia plans to use HMM for that. Changes since v3: - Rebase Changes since v2: - droped HMM prefix and HMM specific code Changes since v1: - typos fix - split early unmap optimization for page with single mapping Signed-off-by: Jérôme Glisse

[HMM 05/15] mm/migrate: new memory migration helper for use with device memory v4

2017-04-21 Thread Jérôme Glisse
for device that have large pool of such like GPU, NVidia plans to use HMM for that. Changes since v3: - Rebase Changes since v2: - droped HMM prefix and HMM specific code Changes since v1: - typos fix - split early unmap optimization for page with single mapping Signed-off-by: Jérôme Glisse

[HMM 02/15] mm/put_page: move ZONE_DEVICE page reference decrement v2

2017-04-21 Thread Jérôme Glisse
page refcount never reach 0). This patch is just a preparatory patch for HMM. Changes since v1: - commit message 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> --- inclu

[HMM 02/15] mm/put_page: move ZONE_DEVICE page reference decrement v2

2017-04-21 Thread Jérôme Glisse
page refcount never reach 0). This patch is just a preparatory patch for HMM. Changes since v1: - commit message Signed-off-by: Jérôme Glisse Cc: Dan Williams Cc: Ross Zwisler --- include/linux/mm.h | 14 +++--- kernel/memremap.c | 6 ++ 2 files changed, 17 insertions(+), 3

[HMM 15/15] hmm: heterogeneous memory management documentation

2017-04-21 Thread Jérôme Glisse
This add documentation for HMM (Heterogeneous Memory Management). It presents the motivation behind it, the features necessary for it to be useful and and gives an overview of how this is implemented. Signed-off-by: Jérôme Glisse <jgli...@redhat.com> --- Documentation/vm/hmm.txt

[HMM 15/15] hmm: heterogeneous memory management documentation

2017-04-21 Thread Jérôme Glisse
This add documentation for HMM (Heterogeneous Memory Management). It presents the motivation behind it, the features necessary for it to be useful and and gives an overview of how this is implemented. Signed-off-by: Jérôme Glisse --- Documentation/vm/hmm.txt | 362

[HMM 10/15] mm/hmm/mirror: device page fault handler

2017-04-21 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 12/15] mm/migrate: allow migrate_vma() to alloc new page on empty entry v2

2017-04-21 Thread Jérôme Glisse
memory than having to fault later on. Changed since v1: - 5 level page table fix Signed-off-by: Jérôme Glisse <jgli...@redhat.com> --- mm/migrate.c | 135 +-- 1 file changed, 131 insertions(+), 4 deletions(-) diff --git a/mm/migra

[HMM 10/15] mm/hmm/mirror: device page fault handler

2017-04-21 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 12/15] mm/migrate: allow migrate_vma() to alloc new page on empty entry v2

2017-04-21 Thread Jérôme Glisse
memory than having to fault later on. Changed since v1: - 5 level page table fix Signed-off-by: Jérôme Glisse --- mm/migrate.c | 135 +-- 1 file changed, 131 insertions(+), 4 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index

<    1   2   3   4   5   6   7   8   9   >