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] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F0E0390-D9C0-4A67-90F7-42CA944FE4F6@cs.rutgers.edu>
Date:   Sun, 31 Dec 2017 08:09:57 -0500
From:   "Zi Yan" <zi.yan@...rutgers.edu>
To:     "Michal Hocko" <mhocko@...nel.org>
Cc:     linux-mm@...ck.org, "Naoya Horiguchi" <n-horiguchi@...jp.nec.com>,
        "Kirill A. Shutemov" <kirill@...temov.name>,
        "Vlastimil Babka" <vbabka@...e.cz>,
        "Andrew Morton" <akpm@...ux-foundation.org>,
        "Andrea Reale" <ar@...ux.vnet.ibm.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH 3/3] mm: unclutter THP migration

On 31 Dec 2017, at 4:07, Michal Hocko wrote:

> On Fri 29-12-17 10:45:46, Zi Yan wrote:
>> On 29 Dec 2017, at 6:36, Michal Hocko wrote:
>>
>>> On Tue 26-12-17 21:19:35, Zi Yan wrote:
> [...]
>>>> And it seems a little bit strange to only re-migrate the head page, then come back to all tail
>>>> pages after migrating the rest of pages in the list “from”. Is it better to split the THP into
>>>> a list other than “from” and insert the list after “page”, then retry from the split “page”?
>>>> Thus, we attempt to migrate all sub pages of the THP after it is split.
>>>
>>> Why does this matter?
>>
>> Functionally, it does not matter.
>>
>> This behavior is just less intuitive and a little different from current one,
>> which implicitly preserves its original order of the not-migrated pages
>> in the “from” list, although no one relies on this implicit behavior now.
>>
>>
>> Adding one line comment about this difference would be good for code maintenance. :)
>
> OK, I will not argue. I still do not see _why_ we need it but I've added
> the following.
>
> diff --git a/mm/migrate.c b/mm/migrate.c
> index 21b3381a2871..0ac5185d3949 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -1395,6 +1395,11 @@ int migrate_pages(struct list_head *from, new_page_t get_new_page,
>  				 * allocation could've failed so we should
>  				 * retry on the same page with the THP split
>  				 * to base pages.
> +				 *
> +				 * Head page is retried immediatelly and tail
> +				 * pages are added to the tail of the list so
> +				 * we encounter them after the rest of the list
> +				 * is processed.
>  				 */
>  				if (PageTransHuge(page)) {
>  					lock_page(page);
>
> Does that this reflect what you mean?

s/immediatelly/immediately

Yes. Thanks. :)

—
Best Regards,
Yan Zi

Download attachment "signature.asc" of type "application/pgp-signature" (558 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ