Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933243AbcK1POE (ORCPT ); Mon, 28 Nov 2016 10:14:04 -0500 Received: from mail-cys01nam02on0115.outbound.protection.outlook.com ([104.47.37.115]:44209 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932532AbcK1PN4 (ORCPT ); Mon, 28 Nov 2016 10:13:56 -0500 X-Greylist: delayed 559 seconds by postgrey-1.27 at vger.kernel.org; Mon, 28 Nov 2016 10:13:56 EST Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=zy56@cs.rutgers.edu; From: Zi Yan To: Balbir Singh CC: , , , , , , , , Subject: Re: [PATCH 1/5] mm: migrate: Add mode parameter to support additional page copy routines. Date: Mon, 28 Nov 2016 10:13:48 -0500 Message-ID: In-Reply-To: References: <20161122162530.2370-1-zi.yan@sent.com> <20161122162530.2370-2-zi.yan@sent.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=_MailMate_6BEE98CB-C8FE-460C-9B23-62E71A4F8271_="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Mailer: MailMate (2.0BETAr6067) X-Originating-IP: [128.6.37.146] X-ClientProxiedBy: BY2PR05CA037.namprd05.prod.outlook.com (10.141.250.27) To MWHPR14MB1664.namprd14.prod.outlook.com (10.171.146.146) X-MS-Office365-Filtering-Correlation-Id: 9257df4e-6758-489a-729a-08d417a12b38 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:MWHPR14MB1664; X-Microsoft-Exchange-Diagnostics: 1;MWHPR14MB1664;3:34pSH83PBfEeVmlIFZGi0linE/Bb7fB4ejJ4gAfHIKNWDuvfyWL/fewKRt7HmFbXa3kfgX9AOd3Ac5N1CjhRSYWSLjoFbsQUjhGpGdhVR7zKK6RRveAiacOjjVLWmRWH9eTYX3zMdTokgCLT9pRTY6iDN2fsOuxi9NI+tI7cO/r5JZ7wq/GD4pBaf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UyN3zkgqq+twGQxos747ICfxpL4/SsTi7cH9hL7ZKdgdBE7GEf9wjJustokjL0ydJ4u9URhyw/94qeHiei1P2Lkpw+MawUAHL5KpLLiZePjNtbutj7Q7Qw5/y0+wIPh1+2RpdV6SZe4+i7jgY+2lNEOAht60SAtEc532PeXUppUgRWwm8AzQf4R34U9TwkRhVnqBK+VI1DnfA4c3HnO6t8w=;20:UVfQSSOy+1O1SfzqYNx8Oub1rOuaXI6ZgNYVHSZNUsTL822hHT1im+ePIAgrzaewTwCIXOKDGqvwFYX1nG4sofgneCdZg7d6dFxRtW6TeWtthaS6gmPtj6kHmXe7q58odJWj3otaxTYdfP39w1n75DgT++jxYAgBcFW9xC/RaFe4XdmYxHuC5igDz+LiXW97jdDE0oaNkavvFAO2NW+0Pg7f5icUmtyDKmMTUyLubf466rJeM9PrumQlUUEuheCklLljrRtxSeDuTrLGufD8qgC7eu4ge3AF6F1UJW8zpBB5Ii1Qkhv967nLuAr6DucpdDvVD3RgE/B8Orha7IvTv3ThCPD0vgjG/EaszhcguMd1SN5N02wMChtyk7zRS1Zw9yQtpv8gR/AA0pG9KCkLY6dGaf2ZHHnEz1QMdpRVVlI0kydqU5Z70W8ddmF9FB3XZOfp+1CWRPJW+FUchk/ziLQr73MgdGJehQ4DXMjHR5DvnGjTYphSRcpg9E3alxF8 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6045199)(6040361)(6060326)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6061324)(6041248)(20161123560025)(20161123555025)(20161123564025)(20161123562025)(2016111802025)(6043046);SRVR:MWHPR14MB1664;BCL:0;PCL:0;RULEID:;SRVR:MWHPR14MB1664; X-Microsoft-Exchange-Diagnostics: 1;MWHPR14MB1664;4:B7ULYnemudNI2jvOmeJjQiWCG8lxu2qX5RQR/UbI05RjCHqgiv+rNrIFVEnXv+i7rEk5SvjUwld1NzrISv8EvobYSLPB3MjA0RXmeTuQPjEloRjZW6BwpXOV8hiL0xOqoaBf9C5ZI5sj61nnKOcPeEP2rkEJaigvJn2jU8+1j47Haue33JE5YxAynfoNNX/CI/YV7VbblImfd5/KoYy+auc/ca+HmrVFKURPqzg9E/zmhtaExHtJuqWYqX+R85euUmiuBDcZjs190BTyFANR9KXUQQehTROj/XxpdTiKEK1MfS5TTMNlAqhF5zEGZB6dYflQrxJEDYL7DwmvtcHL//Hcb6PrBpgSi0I1sZlG6FIexjAsWfKJCTiyqbv6x6wgBIAI5X+XHXGaco5vhjZVvFuxIX/1R7MyIzLXL9SavWWEh5o4l4B/3YYGYdg5xkXGVM579fx7rcwAlwhxOqqhZ1I7AU8eJz/gs0lcR4N99n6r6sOK3jnHYp2oAIxNfH4e+yqBUsyl81YNVAcomKvGUl0zcEEBciij5seQTvPClKe1exFvfXJQs4p8KxQBh3bxiRO0LKil/KdCkze1EPDLyaQR55ifqF23uIbo7WmWMJjIauGYpY9hxUEGiXHqV985TODrC9WDJZZwstE8VFhMFp9zYRzmjpD/h4AaLEXt4fU= X-Forefront-PRVS: 01401330D1 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6049001)(6009001)(7916002)(199003)(189002)(24454002)(68736007)(8676002)(39450400002)(6486002)(733004)(81166006)(50226002)(81156014)(77096006)(39410400001)(2906002)(84326002)(39400400001)(5890100001)(21480400002)(39380400001)(6116002)(3846002)(92566002)(75432002)(1411001)(4326007)(82746002)(88552002)(83716003)(97736004)(189998001)(229853002)(101416001)(7846002)(33656002)(89122001)(6666003)(38730400001)(50986999)(7416002)(76176999)(39060400001)(568964002)(2950100002)(66066001)(5660300001)(6916009)(42882006)(106356001)(7736002)(305945005)(105586002)(110136003)(42186005)(72826003)(104396002);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR14MB1664;H:[172.27.42.163];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics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R0EGG9Jmd03n+gD0RZnsHaYtHDXrVEg+XFBghKFqLKO+EW35RSwLJYgaN8riOnpZ4Q96EcUufjF0co1qdaBvre0GqzjOY4vhf+2SSX6bTyUBmWdiTdLc8SCm+LkaK/JZqX86N1xurNT4nnnYxFr20Rdpa4/Hik70Kbvd3/N965PU=;5:IVWpNQvgJb0PkC/riHkdugBCytN8fgxJmYvI74iqHjJLqVAFGtP7h7YKF4lizuk3mA6QZNnpTkw5RRuL/URYpkYs15SeUy+q1FIxMUnNmJv2wxKsTkmfr58SawUjkR3wWHSnwJVaUjq0VS1umUE7jw==;24:hJwh0tW+jnx1X7aTApBxrYtklmDZ2AMnFyh32Q3KxHGsm8Jv1idaICkvWEzYCjcaZ597LwUZKf/Ofg8ho8t42DL9TCNIadTqAJVVaoH9bVo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;MWHPR14MB1664;7:3sNomeBNNDjLGg93kwVXQ60vAJDzjY+rTWi7XljDyNExjpFyemTuhz9IA/T0O7OorofVyOkg9UXvV9h8fZXOTFmH1jePFoLnOHzRE1Fu8IK39ksY9e9W57xpGzSnxIrhC75sxbzkEiwvAjn2Ln9zl00IW+f3i44iQeSeTf3uEpwKwDixklYYRHRI58MIPhvt9XB1ceNfnae/vSXZuU4zSW+H6fxu1bLNHEJ9U2KJfrWPExV44nxLMYisnY1KJg3ZvKc9pYZix0bfBBnahqVsGYst1vLaTTxekAQ42kdQ9X029TDKElGyabe5Uvc3Sj41jKcFIrmhPDEcmJ7YoUgSRbPdZWxKjruBUC0qoQ8uz91x1Tr3vzjUxjIoeRHfqZJuk3SF1uCb2f/EyUHWZpwap/DSCaj7z5JwEaQvXSs9kEQ9LMPBdmvtZrVLY3dPRCA7HQ1tyasjs1G7v74RCCCh0g== X-OriginatorOrg: cs.rutgers.edu X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2016 15:13:53.6457 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR14MB1664 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3010 Lines: 102 --=_MailMate_6BEE98CB-C8FE-460C-9B23-62E71A4F8271_= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 24 Nov 2016, at 18:56, Balbir Singh wrote: > On 23/11/16 03:25, Zi Yan wrote: >> From: Zi Yan >> >> From: Zi Yan >> >> migrate_page_copy() and copy_huge_page() are affected. >> >> Signed-off-by: Zi Yan >> Signed-off-by: Zi Yan >> --- >> fs/aio.c | 2 +- >> fs/hugetlbfs/inode.c | 2 +- >> fs/ubifs/file.c | 2 +- >> include/linux/migrate.h | 6 ++++-- >> mm/migrate.c | 14 ++++++++------ >> 5 files changed, 15 insertions(+), 11 deletions(-) >> >> diff --git a/fs/aio.c b/fs/aio.c >> index 428484f..a67c764 100644 >> --- a/fs/aio.c >> +++ b/fs/aio.c >> @@ -418,7 +418,7 @@ static int aio_migratepage(struct address_space *m= apping, struct page *new, >> * events from being lost. >> */ >> spin_lock_irqsave(&ctx->completion_lock, flags); >> - migrate_page_copy(new, old); >> + migrate_page_copy(new, old, 0); > > Can we have a useful enum instead of 0, its harder to read and understa= nd > 0 How about MIGRATE_SINGLETHREAD =3D 0 ? >> BUG_ON(ctx->ring_pages[idx] !=3D old); >> ctx->ring_pages[idx] =3D new; >> spin_unlock_irqrestore(&ctx->completion_lock, flags); >> diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c >> index 4fb7b10..a17bfef 100644 >> --- a/fs/hugetlbfs/inode.c >> +++ b/fs/hugetlbfs/inode.c >> @@ -850,7 +850,7 @@ static int hugetlbfs_migrate_page(struct address_s= pace *mapping, >> rc =3D migrate_huge_page_move_mapping(mapping, newpage, page); >> if (rc !=3D MIGRATEPAGE_SUCCESS) >> return rc; >> - migrate_page_copy(newpage, page); >> + migrate_page_copy(newpage, page, 0); > > Ditto > >> >> return MIGRATEPAGE_SUCCESS; >> } >> diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c >> index b4fbeef..bf54e32 100644 >> --- a/fs/ubifs/file.c >> +++ b/fs/ubifs/file.c >> @@ -1468,7 +1468,7 @@ static int ubifs_migrate_page(struct address_spa= ce *mapping, >> SetPagePrivate(newpage); >> } >> >> - migrate_page_copy(newpage, page); >> + migrate_page_copy(newpage, page, 0); > > Here as well > > > Balbir Singh. -- Best Regards Yan Zi --=_MailMate_6BEE98CB-C8FE-460C-9B23-62E71A4F8271_= 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 iQEcBAEBCgAGBQJYPEmsAAoJEEGLLxGcTqbMEfQH/iGys3IHsRuqE8ka0/SAL9ya DkyF+t98fB5luJpzVrrOUh/7Sj3tejY+1CAYmCoHx408dm9MhfS95JULCxMxR5Ny MQ3gz1sV6R4PG/BYt74w7w1tN5Q6iD0ha2SOl8KnGp11iNV1H+fvEBQ8Yp09GZIs 4EiX4yr5AcII6gfsZJJl5+3oZN+C4bscAI2ES6cRN9ZaRO0asb9cYbRPxoCQ1ZC/ 19a1z2lSCxeWOkQgrrJqrfewDG0O75ZXF8j/kwismYWz9PjowDrXifYHey1l2l2I NpVMPOjobgdLbvQT3ibKhlZHPZY9+U0u7s8N7ncRHiC1tZ84DbIBg69g7BrbtDI= =0I96 -----END PGP SIGNATURE----- --=_MailMate_6BEE98CB-C8FE-460C-9B23-62E71A4F8271_=--