linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Splitting pinned folios
@ 2024-03-13  3:16 Matthew Wilcox
  2024-03-13  9:20 ` David Hildenbrand
  0 siblings, 1 reply; 11+ messages in thread
From: Matthew Wilcox @ 2024-03-13  3:16 UTC (permalink / raw)
  To: Jane Chu; +Cc: linux-mm, John Hubbard, David Hildenbrand

On Tue, Mar 12, 2024 at 06:23:43PM -0700, Jane Chu wrote:
> I noticed this recently

OK, this is entirely different, so I'm going to start a new thread ;-)

>  * GUP pin and PG_locked transferred to @page. Rest subpages can be freed if
>  * they are not mapped.
>  *
>  * Returns 0 if the hugepage is split successfully.
>  * Returns -EBUSY if the page is pinned or if anon_vma disappeared from under
>  * us.
>  */
> int split_huge_page_to_list(struct page *page, struct list_head *list)
> {
> 
> I have a test case with poisoned shmem THP page that was mlocked and
> 
> GUP pinned (FOLL_LONGTERM|FOLL_WRITE), but the split succeeded.

I'm going to blame John for this!  There's no reference to pincount
anywhere in huge_memory.c, so I have no clue how this comment is even
close to true, nor do I understand how it could be done, since we don't
know which pages in a folio are pinned.

I think we have to prohibit splits of folios that are GUP pinned.


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

end of thread, other threads:[~2024-03-14 17:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-13  3:16 Splitting pinned folios Matthew Wilcox
2024-03-13  9:20 ` David Hildenbrand
2024-03-13 15:27   ` Matthew Wilcox
2024-03-13 16:53     ` David Hildenbrand
2024-03-13 18:52       ` Jane Chu
2024-03-13 22:25     ` John Hubbard
2024-03-14  2:46   ` updated documentation: " John Hubbard
2024-03-14 16:22     ` David Hildenbrand
2024-03-14 17:51       ` John Hubbard
2024-03-14 17:45     ` Matthew Wilcox
2024-03-14 17:57       ` John Hubbard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox