Re: [PATCH 7/8] memory-hotplug: enable memory hotplug to handle hugepage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 19, 2013 at 01:40:38PM +0800, Hillf Danton wrote:
> On Fri, Jul 19, 2013 at 5:34 AM, Naoya Horiguchi
> <n-horiguchi@xxxxxxxxxxxxx> wrote:
> > @@ -518,9 +519,11 @@ static struct page *dequeue_huge_page_node(struct hstate *h, int nid)
> >  {
> >         struct page *page;
> >
> > -       if (list_empty(&h->hugepage_freelists[nid]))
> > +       list_for_each_entry(page, &h->hugepage_freelists[nid], lru)
> > +               if (!is_migrate_isolate_page(page))
> > +                       break;
> > +       if (&h->hugepage_freelists[nid] == &page->lru)
> 
> For what is this check?

This check returns true unless a non-isolated free hugepage is found.
In "not found" case page points to h->hugepage_freelists, so without
this check successive code doesn't work fine.

Thanks,
Naoya

> >                 return NULL;
> > -       page = list_entry(h->hugepage_freelists[nid].next, struct page, lru);
> >         list_move(&page->lru, &h->hugepage_activelist);
> >         set_page_refcounted(page);
> >         h->free_huge_pages--;
>

--
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>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]