On Wed 02-11-16 12:58:48, Kirill A. Shutemov wrote: > On Tue, Nov 01, 2016 at 11:36:08PM +0100, Jan Kara wrote: > > Currently we have two different structures for passing fault information > > around - struct vm_fault and struct fault_env. DAX will need more > > information in struct vm_fault to handle its faults so the content of > > that structure would become event closer to fault_env. Furthermore it > > would need to generate struct fault_env to be able to call some of the > > generic functions. So at this point I don't think there's much use in > > keeping these two structures separate. Just embed into struct vm_fault > > all that is needed to use it for both purposes. > > What about just reference fault_env from vm_fault? We don't always need > vm_fault where we nee fault_env. It may save space on stack for some > codepaths. I was considering that as well but there is some duplication between those two which I'd prefer to avoid and you would need both structures for the fault handler which you eventually end up calling anyway (and that is very likely the most stack-demanding path) so maximum stack consumption would likely be even slightly higher. Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>