Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751858AbdGML2e (ORCPT ); Thu, 13 Jul 2017 07:28:34 -0400 Received: from mail-sn1nam02on0113.outbound.protection.outlook.com ([104.47.36.113]:31846 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751106AbdGML2c (ORCPT ); Thu, 13 Jul 2017 07:28:32 -0400 Authentication-Results: ah.jp.nec.com; dkim=none (message not signed) header.d=none;ah.jp.nec.com; dmarc=none action=none header.from=cs.rutgers.edu; From: "Zi Yan" To: "Naoya Horiguchi" Cc: "kirill.shutemov@linux.intel.com" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "akpm@linux-foundation.org" , "minchan@kernel.org" , "vbabka@suse.cz" , "mgorman@techsingularity.net" , "mhocko@kernel.org" , "khandual@linux.vnet.ibm.com" , "dnellans@nvidia.com" , "dave.hansen@intel.com" Subject: Re: [PATCH v8 05/10] mm: thp: enable thp migration in generic path Date: Thu, 13 Jul 2017 07:28:24 -0400 Message-ID: In-Reply-To: <20170713093040.GA24851@hori1.linux.bs1.fc.nec.co.jp> References: <20170701134008.110579-1-zi.yan@sent.com> <20170701134008.110579-6-zi.yan@sent.com> <20170711064736.GB22052@hori1.linux.bs1.fc.nec.co.jp> <20170713093040.GA24851@hori1.linux.bs1.fc.nec.co.jp> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=_MailMate_773430CB-F76A-4A3A-A9BD-72F39805FF95_="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Mailer: MailMate (1.9.6r5382) X-Originating-IP: [173.63.110.9] X-ClientProxiedBy: BN6PR03CA0010.namprd03.prod.outlook.com (10.168.230.148) To CY4PR14MB1654.namprd14.prod.outlook.com (10.171.166.16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e43f8142-f0b6-426b-c5fd-08d4c9e24942 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY4PR14MB1654; X-Microsoft-Exchange-Diagnostics: 1;CY4PR14MB1654;3:mc0CMFNmehcRsFXihxdFJ1wCRevIbUzlAkKWnEfDav0KAzezgoOo3VWftGOdGihZOymqb10NTyrDjfN2SdfCF5my9Xco63XrUAagM2w265nr9e1/G0OVhsLfNqw/pOTpWPhvWVOno5/cBnaRabm9f4fnkSCgyqPTIEpVyT3vmjABpO7637n08BHyLV6fTd8RhcPS4ShUgeIfrLnQxqU25vkHYp0BTdU5CJycTJGGXUJbs8ENBIUGq9EmAYzmupUpJwCcji4XG4Pj+8CNogp4IN8t3bvpQkJM7qWLh23tm4GtIr1+Jrm/6BjZf/fiQtRm9z2UcQGhE8kcnk6RSBI+D/KSqCHYkk4vHm0XgRbISuVeArFkeEX21/8xRBkDMPLEi/OJ9Y1HMm2Bd4G4UXTcr4OQj3ThgZVjShi8vd5/VDzrQno8jmv+1KmoGqZLGBzSIXnz4uFd7iJYOHgbvXhbZH2bRvqd1zMLmGkPLhDVgX57HGreIA9/yTEwoemO0ozMf1QWvC35yLzWVvnbdCztMD5HH6sPmhKmnqgS5lPBuzDwgC2En4yaSzpVAshQytAewTxsyO6GZlSso6khYLR2Vkjy480NA3NV0NSZxHTrlqyU0QXu7wchi8TwR3MTdTdKH8J8DNU9gZFY1OT74CH8GGx1QpNlwZ0kN/Dm5+Dy2Fr9Fv9B7n3cC1Yb0yHd1dwsgXyPohZPNMu7xsma64Gsos8m6ZD11X7y7au6ECBp/z8= X-MS-TrafficTypeDiagnostic: CY4PR14MB1654: X-Microsoft-Exchange-Diagnostics: 1;CY4PR14MB1654;25:IYT+29xQfLkm7Uq67i2S2Ft/scPPebIydu+BHVrYg1Ev0uG8pA7uqZVojnDn5TW+b/pcjKrBNlnv3lqUK9KJu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quRILJN0oULBSVEOp38mPYB/v4Y24Y2X/V5tmowT2haJeuBx3Jlx6 X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(209352067349851)(236129657087228)(48057245064654)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(11241501159)(6040450)(601004)(2401047)(2017060910075)(5005006)(8121501046)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6041248)(20161123564025)(201703131423075)(201702281528075)(201702281529075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123560025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR14MB1654;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR14MB1654; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjE0TUIxNjU0OzQ6UUhtQjU1VElvOFlvSzVSV2treDRPK2hHTUd3?= =?utf-8?B?eVlEMzVQS0tUZEIxVWI2VGRWY3RCNmNyVVRIS0xxcUVXbzNzWDdYYVViSlVG?= =?utf-8?B?UHBnQVAyUS9HL2g0bmJUZXNhWE40eENqd0NkbkhYdzcyS1FrWUo4OWRrUDVG?= =?utf-8?B?WlZRMysyZTB6OCtqdzlnVi9jSEhuNnZyR3pKZU9Id1dwVDVPb0pLQUUyd3Zo?= =?utf-8?B?WHFpc1EraWRiT0FCRmxrSDhEb2tseC94bS9kZHB1UzRhQTYycEZ6Si9MRjZH?= =?utf-8?B?bXBkeHJOOWQwQUVreXhwMStVQURDOEhnS1UvWVVUVE0zMHUyU3M4dHJMcGxy?= =?utf-8?B?b0Y1WThXWjlteXdiVEdYUXZFa2hEdWd3WUd2N1dkZ0NDRWU2MGREcUlYOTJ6?= =?utf-8?B?eGQzak5yNEp3R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?B?eW1ZdWhteVFaOFoxbzhZeDgrSHZzWVhENU1McmV5eTROZU1FS1Jpa0tTckZI?= =?utf-8?B?MkpURWRNOUZLNWw0aGJ2djNYNWZnRUh3TmVyUVhKMFVVbWFDNXdId2djVEtM?= =?utf-8?B?UG9GeW1GUWQ1ZXU3NnpxaGh3SEh5K0g4eUFpMlNRSUZkSHJIRHh2OUgxNUhN?= =?utf-8?B?dkFMOUYvdXRmeUNYeWJaN1YxZy9ZMndmR0RjVm5xMWZNWHJ1WFpQQnN0T2lw?= =?utf-8?B?N3AwSWFQQkt6YmFFWTM2M1h5QzZiNDZhemY2aWdiTEhoSm56NWZFUWpwN0Er?= =?utf-8?B?dFcrNnNlTXp2TUVOeTZFRUpPTHBhMUVSQzB6WmJyNStNZWFNbWRUM3lVMjVU?= =?utf-8?B?NWNubzU1c0JTdE1USEJzVUF1dmpka25SUG1FUlNKQjltaWlrN256UVN2STJa?= =?utf-8?B?a0E4UkRKZkhkWmxKemx0MzU2cTFWUGNjbUtaUFUweGUrazNEKzkwZm11VnZJ?= =?utf-8?B?SmZubVhUT1pPVzN6VTd1eStHTG9yMWhjK2wyNTM4eGRGQUFnTTJwR0ErOFRH?= =?utf-8?B?dm1IRlBMWFEzMmJMdXRKTTRIdk96S3lkMTJudmFockF2dlVkRk0wU1AzOUtW?= =?utf-8?B?RE5HaGorNlE9PQ==?= X-Forefront-PRVS: 0367A50BB1 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(7370300001)(4630300001)(6049001)(6009001)(39840400002)(39850400002)(39400400002)(39410400002)(39450400003)(24454002)(4326008)(6916009)(5890100001)(3846002)(6246003)(6666003)(478600001)(38730400002)(229853002)(84326002)(110136004)(93886004)(83716003)(6116002)(77096006)(2950100002)(54906002)(6486002)(42882006)(568964002)(53936002)(42186005)(50986999)(76176999)(7350300001)(5660300001)(305945005)(7736002)(66066001)(25786009)(88552002)(82746002)(81166006)(2906002)(53546010)(7416002)(8676002)(50226002)(117156002)(75432002)(33656002)(189998001)(86362001)(575784001)(72826003);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR14MB1654;H:[192.168.1.153];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjE0TUIxNjU0OzIzOno3UHBMM0xHSWExaHNMbDZ6Wlh6MkU3bE1h?= =?utf-8?B?UnZoRi8vRG9jVTdhQTRINnVKZUtnYjd4bjhCcDllcXdCRm4xU1R4T2trVkxm?= =?utf-8?B?eW9STzV1ZFA5c3c4NE9CUWFYaXdkc01KL2pBWG1uTFErZllnM1JiZ3JqL1A3?= =?utf-8?B?Nmhuc3hWOS9WU3d3TFFYWkEyUXV3c00rOTA2NUZ0MmJaOHFUR0M5MWxkaEVu?= =?utf-8?B?VU5DMUxuZndMdENYeVB1eXNybkJGU203SytCZUthRkRzUkVBYnFpSmtwR1Z1?= =?utf-8?B?aGYxWUxMakJJcldNTVdXbVZCVzVCa1Nmd0hXU2F6V2hVYjVobDQxN1FkTHdm?= =?utf-8?B?UkxNYm92U1A4S3pLNjhpcWJyQ0ROOU9jM0NoMnhoY042SXNaYWQ0UExpSkpo?= =?utf-8?B?OHJOKzVXNTAwRGZzWnlWV3ZVUUpWOGJYMllhMGVVTnBrMGxLbzRsUHpvd3F1?= =?utf-8?B?NHV4WGhYcHNRaHVZNndhUTZHNVgwcHNLZ3U4MHY5Skw3WHhyZmJmUGQya3VU?= =?utf-8?B?NDFxTnJTZkZVTGZnUEVZa3YvWTNZMXU5UGtxTVB4aFh5S1JTYnVSRDI0WHdX?= =?utf-8?B?clh4MndQSnVTNUpWbVNYbExrb3RGRTNOTW1QOHBYcHJxc1cxSUpvcVNHcHFS?= =?utf-8?B?STBiOXJmZi9vUmdUNFdreFdIN1p5bGRidjQxbzR6bmhYS01sZXZKaVhLOHNL?= =?utf-8?B?QnBZUVl1eEdHSnRQYVdjWVRBbWRINW1nM0lnSWkvcWc0eEhQM2laRG5MTkFm?= =?utf-8?B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mc+4JP2EskwyrmszxjA7/jEoT9SKzV+TQIram14zvphssREyGVCwjN8jswjbHPK7eOrX3A/6V0l6nal9lVd13BE+hZ9BvD4SQEX7zDDKxF/eOIPx3cDKSjmHQjl52zL9Eb8MsoqzOMGUBr8hpRhriNjPUEfS5QAc73vRFEquirbcgC1ZTSvTDgJrWTztScjvAzycz46kcu9h+knY4wHTSs8BvGre1aTH/86eGCYVlK/0qX2LGLEAu66PSacPblVeLzpVV8lzKOyZkyZjL8l7C/7ygI7DLbM5VqKuW+8YahQbcYdyM/32IgR1xMw;24:DuPHojPjJY80M20yeJiaruGzBpVjSoQW8sH/H9T3tKjjRtTzKjfDxhV6dUfqO86iFSquD9rrTnb+pmGo/MAyWVRguIfAPlTktZfvnfwNqTE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR14MB1654;7:NcpynqYvqoiXnAk2uTt2Qn/fqND6V0r75JCtadekLltoEWPdYRkQEtzYvo6FaqS8WcJBAwiP2gwv8BMZVQyE97XK9Argzyc9fzHsxdoPDl559PLEtryUoAHDtBk8uzZhM/6wRW60FgeZxqetiHkcny02WzlvANPaNkSrwAF27tslbky4Uk3uy85ITd3xiHWx7Da26tCoUlF7f/CH/358pPsNJELSpbwwuNc9LNVwT1ffLWvN+AsQda5Zu5OlapUgZbbdc4+A8j3yzWDIMuFKNYHvEl/YL71BgfS8TrHQSygnk/55yb40538TlQQctlGOST5NHrv4IN2G4fNn2eqIdCdKspcP0WSnQFSuLx9f2x/9Y4HyTmRXlqI/kK6JGGTcox8LJcyQQOOHIP7Ac3TGHRCFxw2ozxGI2efdmyTTlxL+O2LXdAvmK8LkTs+R05rGUqJlA2pycIxqN4nNFxZY/SJ+YU/EI2masKgHVOGuEhKwRkO39eMwJM7C9+sHPLB9mXKYQPUkj5LW1iFM4Ry/91Uh1csyWVUDEYD4GsO4KCEQZEJuuOxbGAzCOCjf1wCDWEVHUgtlQzQIvisw86XfDht4ucIEtcEt7mwruuFbCXOcZ/zf5lK9MxHTIsyy4yNPon4HJDmlEjv6rbhoZjZU7ogwPLozijEmmCQdLdBxsMVyM0AmwMlcSAOemFWhI1qMtVUstAv1KuThJHrO0sW9RcLct7TEIaM+F+AfTCH5m7xmyBKGLRotroLGbRB9TUfBIBogCCkZ4xfzolwg85qkbsqM1BWSly3L9kuSTfZHjhE= X-OriginatorOrg: cs.rutgers.edu X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2017 11:28:28.4674 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR14MB1654 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5866 Lines: 171 This is an OpenPGP/MIME signed message (RFC 3156 and 4880). --=_MailMate_773430CB-F76A-4A3A-A9BD-72F39805FF95_= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 13 Jul 2017, at 5:30, Naoya Horiguchi wrote: > On Tue, Jul 11, 2017 at 10:00:30AM -0400, Zi Yan wrote: >> On 11 Jul 2017, at 2:47, Naoya Horiguchi wrote: >> >>> On Sat, Jul 01, 2017 at 09:40:03AM -0400, Zi Yan wrote: >>>> From: Zi Yan >>>> >>>> This patch adds thp migration's core code, including conversions >>>> between a PMD entry and a swap entry, setting PMD migration entry, >>>> removing PMD migration entry, and waiting on PMD migration entries. >>>> >>>> This patch makes it possible to support thp migration. >>>> If you fail to allocate a destination page as a thp, you just split >>>> the source thp as we do now, and then enter the normal page migratio= n. >>>> If you succeed to allocate destination thp, you enter thp migration.= >>>> Subsequent patches actually enable thp migration for each caller of >>>> page migration by allowing its get_new_page() callback to >>>> allocate thps. >>>> >>>> ChangeLog v1 -> v2: >>>> - support pte-mapped thp, doubly-mapped thp >>>> >>>> Signed-off-by: Naoya Horiguchi >>>> >>>> ChangeLog v2 -> v3: >>>> - use page_vma_mapped_walk() >>>> - use pmdp_huge_clear_flush() instead of pmdp_huge_get_and_clear() i= n >>>> set_pmd_migration_entry() >>>> >>>> ChangeLog v3 -> v4: >>>> - factor out the code of removing pte pgtable page in zap_huge_pmd()= >>>> >>>> ChangeLog v4 -> v5: >>>> - remove unnecessary PTE-mapped THP code in remove_migration_pmd() >>>> and set_pmd_migration_entry() >>>> - restructure the code in zap_huge_pmd() to avoid factoring out >>>> the pte pgtable page code >>>> - in zap_huge_pmd(), check that PMD swap entries are migration entri= es >>>> - change author information >>>> >>>> ChangeLog v5 -> v7 >>>> - use macro to disable the code when thp migration is not enabled >>>> >>>> ChangeLog v7 -> v8 >>>> - use IS_ENABLED instead of macro to make code look clean in >>>> zap_huge_pmd() and page_vma_mapped_walk() >>>> - remove BUILD_BUG() in pmd_to_swp_entry() and swp_entry_to_pmd() to= >>>> avoid compilation error >>>> - rename variable 'migration' to 'flush_needed' and invert the logic= in >>>> zap_huge_pmd() to make code more descriptive >>>> - use pmdp_invalidate() in set_pmd_migration_entry() to avoid race >>>> with MADV_DONTNEED >>>> - remove unnecessary tlb flush in remove_migration_pmd() >>>> - add the missing migration flag check in page_vma_mapped_walk() >>>> >>>> Signed-off-by: Zi Yan >>>> Cc: Kirill A. Shutemov >>>> --- >>>> arch/x86/include/asm/pgtable_64.h | 2 + >>>> include/linux/swapops.h | 67 ++++++++++++++++++++++++++++= ++- >>>> mm/huge_memory.c | 84 ++++++++++++++++++++++++++++= ++++++++--- >>>> mm/migrate.c | 32 ++++++++++++++- >>>> mm/page_vma_mapped.c | 18 +++++++-- >>>> mm/pgtable-generic.c | 3 +- >>>> mm/rmap.c | 13 ++++++ >>>> 7 files changed, 207 insertions(+), 12 deletions(-) >>>> >>> ... >>> >>>> diff --git a/mm/rmap.c b/mm/rmap.c >>>> index 91948fbbb0bb..b28f633cd569 100644 >>>> --- a/mm/rmap.c >>>> +++ b/mm/rmap.c >>>> @@ -1302,6 +1302,7 @@ static bool try_to_unmap_one(struct page *page= , struct vm_area_struct *vma, >>>> bool ret =3D true; >>>> enum ttu_flags flags =3D (enum ttu_flags)arg; >>>> >>>> + >>>> /* munlock has nothing to gain from examining un-locked vmas */ >>>> if ((flags & TTU_MUNLOCK) && !(vma->vm_flags & VM_LOCKED)) >>>> return true; >>>> @@ -1312,6 +1313,18 @@ static bool try_to_unmap_one(struct page *pag= e, struct vm_area_struct *vma, >>>> } >>>> >>>> while (page_vma_mapped_walk(&pvmw)) { >>>> +#ifdef CONFIG_ARCH_ENABLE_THP_MIGRATION >>>> + /* PMD-mapped THP migration entry */ >>>> + if (flags & TTU_MIGRATION) { >>> >>> My testing based on mmotm-2017-07-06-16-18 showed that migrating shme= m thp >>> caused kernel crash. I don't think this is critical because that case= is >>> just not-prepared yet. So in order to avoid the crash, please add >>> PageAnon(page) check here. This makes shmem thp migration just fail. >>> >>> + if (!PageAnon(page)) >>> + continue; >>> >> >> Thanks for your testing. I will add this check in my next version. > > Sorry, the code I'm suggesting above doesn't work because it makes norm= al > pagecache migration fail. This check should come after making sure tha= t > pvmw.pte is NULL. Right. I think the two ifs are confusing. Replacing the chunk with: if (!pvmw.pte && (flags & TTU_MIGRATION)) { VM_BUG_ON_PAGE(PageHuge(page) || !PageTransCompound(page), page); if (!PageAnon(page)) continue; set_pmd_migration_entry(&pvmw, page); continue; } would be better. BTW, is your page migration test suite available online? If so, I could u= se it to test my code. Thanks. =E2=80=94 Best Regards, Yan Zi --=_MailMate_773430CB-F76A-4A3A-A9BD-72F39805FF95_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJZZ1lYAAoJEEGLLxGcTqbMATcH/jlryvtdD8CdWHv0Nn+mjFZF OmFqpxbSJ9yCHVPNC/YTd79FI25lF/F7YcSkl5U2cXL2JSkJmeqcDink1dEs1mP6 64wnONqDtRqJWCMEBrdnC9gftKZNhjyV80O3OdRl5oG0LPRk3pi/1fwuSCE1COq9 1u8r1BL84aK0d59XuvRTmTJEbmZ6naI3pk3Zfq6k5UAcyXDt9jgisph6xvqKPhq7 QQIx3scYTS3HTcfbDwi0C844jH8u9bIIlBnAgKc6evV8FN7z8r6wZif32+4vZit7 Cy5fD0jaENV/Q8ly+edWHMEWGh4Wo1V+hj73ozwm+PKIhA322kd1c5p+wPINzF4= =gCIF -----END PGP SIGNATURE----- --=_MailMate_773430CB-F76A-4A3A-A9BD-72F39805FF95_=--