All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-rmap-try_to_migrate-skip-zone_device-device_private.patch added to -mm tree
@ 2021-07-09 23:15 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2021-07-09 23:15 UTC (permalink / raw)
  To: mm-commits, shy828301, shakeelb, rcampbell, kirill.shutemov, jgg,
	hch, apopple, hughd


The patch titled
     Subject: mm/rmap: try_to_migrate() skip zone_device !device_private
has been added to the -mm tree.  Its filename is
     mm-rmap-try_to_migrate-skip-zone_device-device_private.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-rmap-try_to_migrate-skip-zone_device-device_private.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-rmap-try_to_migrate-skip-zone_device-device_private.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Hugh Dickins <hughd@google.com>
Subject: mm/rmap: try_to_migrate() skip zone_device !device_private

I know nothing about zone_device pages and !device_private pages; but if
try_to_migrate_one() will do nothing for them, then it's better that
try_to_migrate() filter them first, than trawl through all their vmas.

Link: https://lkml.kernel.org/r/1241d356-8ec9-f47b-a5ec-9b2bf66d242@google.com
Signed-off-by: Hugh Dickins <hughd@google.com>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Reviewed-by: Alistair Popple <apopple@nvidia.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: Yang Shi <shy828301@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/rmap.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/mm/rmap.c~mm-rmap-try_to_migrate-skip-zone_device-device_private
+++ a/mm/rmap.c
@@ -1702,9 +1702,6 @@ static bool try_to_migrate_one(struct pa
 	struct mmu_notifier_range range;
 	enum ttu_flags flags = (enum ttu_flags)(long)arg;
 
-	if (is_zone_device_page(page) && !is_device_private_page(page))
-		return true;
-
 	/*
 	 * When racing against e.g. zap_pte_range() on another cpu,
 	 * in between its ptep_get_and_clear_full() and page_remove_rmap(),
@@ -1943,6 +1940,9 @@ void try_to_migrate(struct page *page, e
 					TTU_SYNC)))
 		return;
 
+	if (is_zone_device_page(page) && !is_device_private_page(page))
+		return;
+
 	/*
 	 * During exec, a temporary VMA is setup and later moved.
 	 * The VMA is moved under the anon_vma lock but not the
_

Patches currently in -mm which might be from hughd@google.com are

mm-rmap-fix-comments-left-over-from-recent-changes.patch
mm-rmap-fix-old-bug-munlocking-thp-missed-other-mlocks.patch
mm-rmap-fix-new-bug-premature-return-from-page_mlock_one.patch
mm-rmap-try_to_migrate-skip-zone_device-device_private.patch
fs-mm-fix-race-in-unlinking-swapfile.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-09 23:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09 23:15 + mm-rmap-try_to_migrate-skip-zone_device-device_private.patch added to -mm tree akpm

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.