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: <8735b2cdia.fsf@yhuang6-desk2.ccr.corp.intel.com>
Date:   Wed, 02 Nov 2022 10:10:37 +0800
From:   "Huang, Ying" <ying.huang@...el.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Zi Yan <ziy@...dia.com>, Yang Shi <shy828301@...il.com>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        Oscar Salvador <osalvador@...e.de>
Subject: Re: [RFC 2/2] migrate: convert migrate_pages() to use folios

Matthew Wilcox <willy@...radead.org> writes:

> On Tue, Nov 01, 2022 at 02:21:37PM +0800, Huang Ying wrote:
>> -			is_thp = PageTransHuge(page) && !PageHuge(page);
>> -			nr_subpages = compound_nr(page);
>> +			is_large = folio_test_large(folio) && !PageHuge(&folio->page);
>
> We have folio_test_hugetlb() to replace PageHuge().

Thanks!  Will change this in the next version.

>>  	count_vm_events(PGMIGRATE_SUCCESS, nr_succeeded);
>>  	count_vm_events(PGMIGRATE_FAIL, nr_failed_pages);
>> -	count_vm_events(THP_MIGRATION_SUCCESS, nr_thp_succeeded);
>> -	count_vm_events(THP_MIGRATION_FAIL, nr_thp_failed);
>> -	count_vm_events(THP_MIGRATION_SPLIT, nr_thp_split);
>> -	trace_mm_migrate_pages(nr_succeeded, nr_failed_pages, nr_thp_succeeded,
>> -			       nr_thp_failed, nr_thp_split, mode, reason);
>> +	count_vm_events(THP_MIGRATION_SUCCESS, nr_large_succeeded);
>> +	count_vm_events(THP_MIGRATION_FAIL, nr_large_failed);
>> +	count_vm_events(THP_MIGRATION_SPLIT, nr_split);
>> +	trace_mm_migrate_pages(nr_succeeded, nr_failed_pages, nr_large_succeeded,
>> +			       nr_large_failed, nr_split, mode, reason);
>
> I think this is the biggest question with this patch -- how (or whether)
> to account folios in size between PMD and PTE size.  Since it's
> _called_ THP, I've tended to make the statistics conditional on
> folio_test_pmd_mappable() rather than simply being folio_test_large().

Yes.  This is my biggest concern during development too.  In the next
version, I will distinguish THP and other large folios (between PMD and
PTE size) and do statistics accordingly.

Best Regards,
Huang, Ying

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ