Re: [PATCH v4 RESEND 0/2] Align mmap address for DAX pmd mappings

From: Kani, Toshimitsu
Date: Fri Sep 09 2016 - 13:21:51 EST


On Fri, 2016-09-09 at 15:36 +0300, Kirill A. Shutemov wrote:
> On Thu, Sep 08, 2016 at 11:21:46PM +0000, Kani, Toshimitsu wrote:
> >
> > On Thu, 2016-09-08 at 07:48 -0600, Kani, Toshimitsu wrote:
> > >
> > > On Thu, 2016-09-08 at 13:57 +0300, Kirill A. Shutemov wrote:
> > > >
> > > > On Mon, Aug 29, 2016 at 10:00:43PM +0000, Kani, Toshimitsu
> > > > wrote:
> > Â:
> > > > > Looking further, these shmem_huge handlings only check pre-
> > > > > conditions.ÂÂSo,ÂweÂshouldÂbeÂableÂtoÂmakeÂshmem_get_unmapped
> > > > > _are a() as a wrapper, which checks such shmem-specific
> > > > > conitions, and thenÂcallÂ__thp_get_unmapped_area() for the
> > > > > actual work. ÂAll DAX-specific checks are performed in
> > > > > thp_get_unmapped_area() as well. ÂWe can make
> > > > > Â__thp_get_unmapped_area() as a common
> > > > > function.
> > > > >
> > > > > I'd prefer to make such change as a separate item,
> > > >
> > > > Do you have plan to submit such change?
> > >
> > > Yes, I will submit the change once I finish testing.
> >
> > I found a bug in the current code, and need some clarification.
> > ÂThe if-statement below is reverted.
>
> <two-hands-facepalm>
>
> Yeah. It was repored by Hillf[1]. The fixup got lost. :(
>
> Could you post a proper patch with the fix?
>
> I would be nice to credit Hillf there too.
>
> [1] http://lkml.kernel.org/r/054f01d1c86f$2994d5c0$7cbe8140$@alibaba-
> inc.com

Yes, I will submit the fix as well.

I will not change the default value of sbinfo->huge in this fix. ÂSo,
user will have to specify "huge=" option to enable huge page mappings.
ÂIf this is not desireable, we will need a separate patch.

Thanks,
-Toshi