lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 20 Jul 2013 18:04:22 +0800
From:	Hillf Danton <dhillf@...il.com>
To:	Naoya Horiguchi <n-horiguchi@...jp.nec.com>
Cc:	linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
	Mel Gorman <mgorman@...e.de>, Hugh Dickins <hughd@...gle.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Andi Kleen <andi@...stfloor.org>,
	Michal Hocko <mhocko@...e.cz>, Rik van Riel <riel@...hat.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org,
	Naoya Horiguchi <nao.horiguchi@...il.com>
Subject: Re: [PATCH 7/8] memory-hotplug: enable memory hotplug to handle hugepage

On Fri, Jul 19, 2013 at 10:39 PM, Naoya Horiguchi
<n-horiguchi@...jp.nec.com> wrote:
> 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@...jp.nec.com> 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 for your explanation, and looks another local variable
struct page *found for easing reader.

Good weekend
Hillf
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ