linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* THP handling with driver compound page on fault
@ 2021-01-30  0:13 Minchan Kim
  2021-01-30  1:00 ` Matthew Wilcox
  0 siblings, 1 reply; 7+ messages in thread
From: Minchan Kim @ 2021-01-30  0:13 UTC (permalink / raw)
  To: willy, hughd, kirill; +Cc: linux-mm

Hi Folks,

A custom driver overrides (vm_operations_struct.fault) and map their
compound page(__GFP_COMP) to page table on userprocess on demand.

Here problem is

page fault occur:

__do_fault
	vma->vm_ops->fault <- driver returns their compould page 

finish_fault
	alloc_set_pte
		PageTransCompound(page)
			do_set_pmd
				map the page as THP page

Since it's not a THP page, system goes random crash after a while due to
conflict of VM THP handling with the driver compound page handling.
Even though it happens in old kernel with backporting THP pagecache,
I think it's still valid on recent kernel.

What's the best way to fix it? Driver don't do that or VM need to
deal with it?

Thank you.


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

end of thread, other threads:[~2021-01-30  2:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-30  0:13 THP handling with driver compound page on fault Minchan Kim
2021-01-30  1:00 ` Matthew Wilcox
2021-01-30  1:22   ` Minchan Kim
2021-01-30  1:28     ` Matthew Wilcox
2021-01-30  1:49       ` Minchan Kim
2021-01-30  2:09         ` Matthew Wilcox
2021-01-30  2:40           ` Minchan Kim

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).