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]
Message-ID: <d24ef706-1b34-a7d8-3893-aadb9cf19ddf@huawei.com>
Date:   Sun, 29 Jan 2023 11:26:57 +0800
From:   Chen Wandun <chenwandun@...wei.com>
To:     "Huang, Ying" <ying.huang@...el.com>
CC:     <akpm@...ux-foundation.org>, <linux-mm@...ck.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm/migrate: Continue to migrate for small pages



On 2023/1/29 11:01, Huang, Ying wrote:
> Chen Wandun <chenwandun@...wei.com> writes:
>
>> migrate_hugetlbs returns -ENOMEM when no enough huge page,
>> however maybe there are still free small pages, so continue
>> to migrate for small pages.
> Better to replace "page" with "folio", and "small" with "non-hugetlb".
Will do.
>
>> Signed-off-by: Chen Wandun <chenwandun@...wei.com>
>> ---
>>   mm/migrate.c | 7 ++++++-
>>   1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/mm/migrate.c b/mm/migrate.c
>> index b971edbf32fc..c9d0d2058036 100644
>> --- a/mm/migrate.c
>> +++ b/mm/migrate.c
>> @@ -1939,7 +1939,12 @@ int migrate_pages(struct list_head *from, new_page_t get_new_page,
>>   
>>   	rc_gather = migrate_hugetlbs(from, get_new_page, put_new_page, private,
>>   				     mode, reason, &stats, &ret_folios);
>> -	if (rc_gather < 0)
>> +	/* Maybe there are free small pages, continue to migrate.
> There may be free non-hugetlb folios available, continue to migrate.
will do
>
>> +	 * Nowdays the only negtive return value of migrate_hugetlbs
>> +	 * is -ENOMEM, keep compatible for coming negtive return
>> +	 * value instead of ignore return value.
> This can be moved to patch description.
will do
thanks for your review.

Best Regards.
Wandun
>
>> +	 */
>> +	if (rc_gather < 0 && rc_gather != -ENOMEM)
>>   		goto out;
>>   again:
>>   	nr_pages = 0;
> Best Regards,
> Huang, Ying
> .

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ