lkml.org 
[lkml]   [2013]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 8/8] prepare to remove /proc/sys/vm/hugepages_treat_as_movable
On Thu, Aug 01, 2013 at 11:29:39AM +0530, Aneesh Kumar K.V wrote:
> Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> writes:
>
> > On Wed, Jul 31, 2013 at 12:02:30AM +0530, Aneesh Kumar K.V wrote:
> >> Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> writes:
> >>
> >> > Now hugepages are definitely movable. So allocating hugepages from
> >> > ZONE_MOVABLE is natural and we have no reason to keep this parameter.
> >> > In order to allow userspace to prepare for the removal, let's leave
> >> > this sysctl handler as noop for a while.
> >>
> >> I guess you still need to handle architectures for which pmd_huge is
> >>
> >> int pmd_huge(pmd_t pmd)
> >> {
> >> return 0;
> >> }
> >>
> >> embedded powerpc is one. They don't store pte information at the PMD
> >> level. Instead pmd contains a pointer to hugepage directory which
> >> contain huge pte.
> >
> > It seems that this comment is for the whole series, not just for this
> > patch, right?
> >
> > Some users of hugepage migration (mbind, move_pages, migrate_pages)
> > walk over page tables to collect hugepages to be migrated, where
> > hugepages are just ignored in such architectures due to pmd_huge.
> > So no problem for these users.
> >
> > But the other users (softoffline, memory hotremove) choose hugepages
> > to be migrated based on pfn, where they don't check pmd_huge.
> > As you wrote, this can be problematic for such architectures.
> > So I think of adding pmd_huge() check somewhere (in unmap_and_move_huge_page
> > for example) to make it fail for such architectures.
>
> Considering that we have architectures that won't support migrating
> explicit hugepages with this patch series, is it ok to use
> GFP_HIGHUSER_MOVABLE for hugepage allocation ?

Originally this parameter was introduced to make hugepage pool on ZONE_MOVABLE.
The benefit is that we can extend the hugepage pool more easily,
because external fragmentation less likely happens than other zone type
by rearranging fragmented pages with page migration/reclaim.

So I think using ZONE_MOVABLE for hugepage allocation by default makes sense
even on the architectures which don't support hugepage migration.

Thanks,
Naoya Horiguchi


\
 
 \ /
  Last update: 2013-08-02 05:01    [W:1.913 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site