Re: [PATCH 01/21] mm: Join struct fault_env and vm_fault

From
Peter Zijlstra <peterz@infradead.org>
Date
2016-11-16 17:21:08
Also in
linux-fsdevel, nvdimm
Reply to
Jan Kara, 2016-11-16
On Wed, Nov 16, 2016 at 12:01:01PM +0100, Jan Kara wrote:
On Wed 16-11-16 11:51:32, Peter Zijlstra wrote:
quoted
Now, I'm entirely out of touch wrt DAX, so I've not idea what that
needs/wants.
Yeah, DAX does not have 'struct page' for its pages so it directly installs
PFNs in the page tables. As a result it needs to know about page tables and
stuff.
Not convinced, a physical address should then be the equivalent of a
struct page. You still don't need access to the actual pages tables. The
VM core can then convert the physical address to a PFN and stuff it in
the PTE entry.
Now I've abstracted knowledge about that into helper functions back
in mm/ but still we need to pass the information through the ->fault handler
into those helpers and vm_fault structure is simply natural for that.
So far we have tried to avoid that but the result was not pretty (special
return codes from DAX ->fault handlers essentially leaking information
about DAX internal locking into mm/ code to direct generic mm code to do
the right thing for DAX).
Its probably the DAX locking bit I'm missing, because I cannot see why
VM_FAULT_DAX_LOCKED is 'broken' -- also, I'd have called that
VM_FAULT_PFN or similar and not have used the full entry but only the
PFN bits from it.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Thread (56 messages) 56 messages, 4 authors, last reply 2016-11-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help