All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Sierra <alex.sierra@amd.com>
To: <jgg@nvidia.com>
Cc: <david@redhat.com>, <Felix.Kuehling@amd.com>,
	<linux-mm@kvack.org>, <rcampbell@nvidia.com>,
	<linux-ext4@vger.kernel.org>, <linux-xfs@vger.kernel.org>,
	<amd-gfx@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>, <hch@lst.de>,
	<jglisse@redhat.com>, <apopple@nvidia.com>, <willy@infradead.org>,
	<akpm@linux-foundation.org>
Subject: [PATCH v1 0/3] split vm_normal_pages for LRU and non-LRU handling
Date: Thu, 10 Mar 2022 11:26:30 -0600	[thread overview]
Message-ID: <20220310172633.9151-1-alex.sierra@amd.com> (raw)

DEVICE_COHERENT pages introduce a subtle distinction in the way
"normal" pages can be used by various callers throughout the kernel.
They behave like normal pages for purposes of mapping in CPU page
tables, and for COW. But they do not support LRU lists, NUMA
migration or THP. Therefore we split vm_normal_page into two
functions vm_normal_any_page and vm_normal_lru_page. The latter will
only return pages that can be put on an LRU list and that support
NUMA migration, KSM and THP.

HMM tests were added to selftest to excercise these changes with
device coherent pages. New test called hmm_cow_in_device, will test
pages marked as COW, allocated in device zone. Also, more
configurations were added into hmm_gup_test to test basic get
user pages and get user pages fast paths in device zone pages.

Alex Sierra (3):
  mm: split vm_normal_pages for LRU and non-LRU handling
  tools: add more gup configs to hmm_gup selftests
  tools: add selftests to hmm for COW in device memory

 fs/proc/task_mmu.c                     |  12 +--
 include/linux/mm.h                     |  11 +-
 mm/gup.c                               |  10 +-
 mm/hmm.c                               |   2 +-
 mm/huge_memory.c                       |   2 +-
 mm/khugepaged.c                        |   8 +-
 mm/ksm.c                               |   4 +-
 mm/madvise.c                           |   4 +-
 mm/memcontrol.c                        |   2 +-
 mm/memory.c                            |  38 ++++---
 mm/mempolicy.c                         |   4 +-
 mm/migrate.c                           |   2 +-
 mm/migrate_device.c                    |   2 +-
 mm/mlock.c                             |   6 +-
 mm/mprotect.c                          |   2 +-
 tools/testing/selftests/vm/hmm-tests.c | 139 +++++++++++++++++++++----
 16 files changed, 185 insertions(+), 63 deletions(-)

-- 
2.32.0


WARNING: multiple messages have this Message-ID (diff)
From: Alex Sierra <alex.sierra@amd.com>
To: <jgg@nvidia.com>
Cc: rcampbell@nvidia.com, willy@infradead.org, david@redhat.com,
	Felix.Kuehling@amd.com, apopple@nvidia.com,
	amd-gfx@lists.freedesktop.org, linux-xfs@vger.kernel.org,
	linux-mm@kvack.org, jglisse@redhat.com,
	dri-devel@lists.freedesktop.org, akpm@linux-foundation.org,
	linux-ext4@vger.kernel.org, hch@lst.de
Subject: [PATCH v1 0/3] split vm_normal_pages for LRU and non-LRU handling
Date: Thu, 10 Mar 2022 11:26:30 -0600	[thread overview]
Message-ID: <20220310172633.9151-1-alex.sierra@amd.com> (raw)

DEVICE_COHERENT pages introduce a subtle distinction in the way
"normal" pages can be used by various callers throughout the kernel.
They behave like normal pages for purposes of mapping in CPU page
tables, and for COW. But they do not support LRU lists, NUMA
migration or THP. Therefore we split vm_normal_page into two
functions vm_normal_any_page and vm_normal_lru_page. The latter will
only return pages that can be put on an LRU list and that support
NUMA migration, KSM and THP.

HMM tests were added to selftest to excercise these changes with
device coherent pages. New test called hmm_cow_in_device, will test
pages marked as COW, allocated in device zone. Also, more
configurations were added into hmm_gup_test to test basic get
user pages and get user pages fast paths in device zone pages.

Alex Sierra (3):
  mm: split vm_normal_pages for LRU and non-LRU handling
  tools: add more gup configs to hmm_gup selftests
  tools: add selftests to hmm for COW in device memory

 fs/proc/task_mmu.c                     |  12 +--
 include/linux/mm.h                     |  11 +-
 mm/gup.c                               |  10 +-
 mm/hmm.c                               |   2 +-
 mm/huge_memory.c                       |   2 +-
 mm/khugepaged.c                        |   8 +-
 mm/ksm.c                               |   4 +-
 mm/madvise.c                           |   4 +-
 mm/memcontrol.c                        |   2 +-
 mm/memory.c                            |  38 ++++---
 mm/mempolicy.c                         |   4 +-
 mm/migrate.c                           |   2 +-
 mm/migrate_device.c                    |   2 +-
 mm/mlock.c                             |   6 +-
 mm/mprotect.c                          |   2 +-
 tools/testing/selftests/vm/hmm-tests.c | 139 +++++++++++++++++++++----
 16 files changed, 185 insertions(+), 63 deletions(-)

-- 
2.32.0


             reply	other threads:[~2022-03-10 17:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-10 17:26 Alex Sierra [this message]
2022-03-10 17:26 ` [PATCH v1 0/3] split vm_normal_pages for LRU and non-LRU handling Alex Sierra
2022-03-10 17:26 ` [PATCH v1 1/3] mm: " Alex Sierra
2022-03-10 17:26   ` Alex Sierra
2022-03-10 19:25   ` Matthew Wilcox
2022-03-10 19:25     ` Matthew Wilcox
2022-03-10 21:58     ` Felix Kuehling
2022-03-10 21:58       ` Felix Kuehling
2022-03-17  2:50       ` Alistair Popple
2022-03-17  2:50         ` Alistair Popple
2022-03-11  9:16   ` David Hildenbrand
2022-03-11  9:16     ` David Hildenbrand
2022-03-11 17:08     ` Felix Kuehling
2022-03-11 17:08       ` Felix Kuehling
2022-03-17  2:54       ` Alistair Popple
2022-03-17  2:54         ` Alistair Popple
2022-03-17  8:13         ` David Hildenbrand
2022-03-17  8:13           ` David Hildenbrand
2022-03-17 13:25           ` Jason Gunthorpe
2022-03-17 13:25             ` Jason Gunthorpe
2022-03-10 17:26 ` [PATCH v1 2/3] tools: add more gup configs to hmm_gup selftests Alex Sierra
2022-03-10 17:26   ` Alex Sierra
2022-03-10 17:26 ` [PATCH v1 3/3] tools: add selftests to hmm for COW in device memory Alex Sierra
2022-03-10 17:26   ` Alex Sierra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220310172633.9151-1-alex.sierra@amd.com \
    --to=alex.sierra@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=apopple@nvidia.com \
    --cc=david@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hch@lst.de \
    --cc=jgg@nvidia.com \
    --cc=jglisse@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=rcampbell@nvidia.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.