linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mm/gup: Fix hugepd for longterm R/O pin on Power
@ 2024-04-28 19:01 Peter Xu
  2024-04-28 19:01 ` [PATCH 1/2] mm/gup: Fix hugepd handling in hugetlb rework Peter Xu
  2024-04-28 19:01 ` [PATCH 2/2] mm/selftests: Don't prefault in gup_longterm tests Peter Xu
  0 siblings, 2 replies; 8+ messages in thread
From: Peter Xu @ 2024-04-28 19:01 UTC (permalink / raw)
  To: linux-kernel, linux-mm
  Cc: Christophe Leroy, peterx, David Hildenbrand, Andrew Morton,
	Aneesh Kumar K . V, Lorenzo Stoakes, John Hubbard, linuxppc-dev,
	Muchun Song, Jason Gunthorpe

This series should apply to both mm-stable and mm-unstable, I am not sure
whether it's even applicable to apply on mm-stable directly, but perhaps
not urgently needed either.  Anyway, it'll apply to either tree.  It also
means cc stable is not needed even if I had the Fixes attached.

Patch 1 fixes that bug in mm-stable, patch 2 enhances the gup_longterm to
be able to discover such issue.

In general, the previous hugetlb rework [1] on gup-slow introduced an issue
with R/O longterm pin.  Nobody yet found it in either a real report or test
case, probably because our test case doesn't yet cover it (not before patch
2), and it's also a pretty rare path: it only happens with Power longterm
R/O pins on a page cache that is installed as a hugepd read-only.

Please read each of the patch for details.

I retested "./run_vmtests.sh -t gup_test -a" on a Power8 system with a
Power8 VM, with 16MB hugepd hugepd entries installed.  Note that I tested
exactly the same matrix before, but patch 2 will change gup_longterm test,
so it's actually slightly different test carried out, and the new test
(gup_longterm.c, when apply patch 2 only) will hang mm-stable on Andrew's
tree with that 16MB huge page.

Thanks,

[1] https://lore.kernel.org/r/20240327152332.950956-1-peterx@redhat.com

Peter Xu (2):
  mm/gup: Fix hugepd handling in hugetlb rework
  mm/selftests: Don't prefault in gup_longterm tests

 mm/gup.c                                  | 64 ++++++++++++++---------
 tools/testing/selftests/mm/gup_longterm.c | 12 +++--
 2 files changed, 48 insertions(+), 28 deletions(-)

-- 
2.44.0



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-29 13:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-28 19:01 [PATCH 0/2] mm/gup: Fix hugepd for longterm R/O pin on Power Peter Xu
2024-04-28 19:01 ` [PATCH 1/2] mm/gup: Fix hugepd handling in hugetlb rework Peter Xu
2024-04-29  7:17   ` David Hildenbrand
2024-04-28 19:01 ` [PATCH 2/2] mm/selftests: Don't prefault in gup_longterm tests Peter Xu
2024-04-29  7:28   ` David Hildenbrand
2024-04-29 13:10     ` Peter Xu
2024-04-29 13:26       ` David Hildenbrand
2024-04-29 13:51         ` Peter Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).