linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Huge pmds and puds for graphics questions
@ 2019-09-19  8:53 Thomas Hellström (VMware)
  0 siblings, 0 replies; only message in thread
From: Thomas Hellström (VMware) @ 2019-09-19  8:53 UTC (permalink / raw)
  To: linux-mm

Hi!

I'm looking at supporting huge pmds and puds on VM_MIXEDMAPs for the TTM 
graphics memory manager. While huge puds might not be that common, huge 
pmds will probably be.

We would also want to support vrite-notify vmas, in which case we need 
to split the pud / pmds, and handle the write-notification on the pte 
level. Today we also support cow mappings, but I'm not sure anyone ever 
used it in this context. I figure in this case we just split the huge 
puds / pmds and we should be fine.

In any case, over to the questions:

In __handle_mm_fault() we call pmd_alloc() without considering puds 
being unstable (somewone faulting in a huge pud entry, or madvise() 
removing a huge pud entry). Is there some kind of special mechanism 
taking care of that potential race?

https://elixir.bootlin.com/linux/latest/source/mm/memory.c#L3931

In wp_huge_pmd() and wp_huge_pud(), if huge_fault() returns 
VM_FAULT_FALLBACK, and there is an existing read-only huge entry, we 
don't split that entry, causing the write fault to be endlessly retried. 
Is this an oversight or is the huge_fault handler responsible for 
splitting the huge entry?

https://elixir.bootlin.com/linux/latest/source/mm/memory.c#L3738

https://elixir.bootlin.com/linux/latest/source/mm/memory.c#L3769


Any insight or comments would be appreciated.

Thanks,

Thomas




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

only message in thread, other threads:[~2019-09-19  8:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-19  8:53 Huge pmds and puds for graphics questions Thomas Hellström (VMware)

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