[RFC] early_fault handler
Matthew Wilcox
willy at linux.intel.com
Wed Nov 13 11:03:41 EST 2013
On Wed, Nov 13, 2013 at 07:50:46AM -0800, Dave Hansen wrote:
> On 11/13/2013 05:47 AM, Matthew Wilcox wrote:
> > (Mostly the patch is so big because I have to change the calling
> > convention of either hugetlb or hpage_xip. I chose the latter for
> > obvious reasons).
>
> That looks pretty sane, although hugetlbfs is _bad_ company to be in. :)
Well, I could change the calling convention for both ... passing the
mm_struct is a bit redundant, for example.
> I'm glad you also managed to nuke this gem:
>
> > - vmf.pgoff = (((address & PAGE_MASK) - vma->vm_start) >> PAGE_SHIFT)
> > - + vma->vm_pgoff;
I only moved it ...
+ unsigned long address = user_address & PAGE_MASK;
+ unsigned long pgoff = ((address - vma->vm_start) >> PAGE_SHIFT) +
+ vma->vm_pgoff;
More information about the Linux-pmfs
mailing list