Received: by 10.223.176.5 with SMTP id f5csp3582484wra; Mon, 29 Jan 2018 15:41:01 -0800 (PST) X-Google-Smtp-Source: AH8x226Qh4YQY6Zx8vIgcX7vQ5s+yHsDYMP1WwCyUKiQo9O+Ljov+6rg+v0iFBTYcAB769fPMVBc X-Received: by 2002:a17:902:7d09:: with SMTP id z9-v6mr19324464pll.427.1517269261195; Mon, 29 Jan 2018 15:41:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517269261; cv=none; d=google.com; s=arc-20160816; b=gsnHGMBLJaOYQA49VwZnD2x/ycsxxN+foodKxZfVJn9ge5hUQNJjK5TT5DGjgx44HV nsbSKdpSd5M+IHy36MUUtsHYeBQyY0gk4G5kMoR42+rAx+ZFiOs4jqXIQM6Rhm0nXkOY skuEednVap6mdcaf4UWW1g38kw2GwXZCz4nOptF6K4t8RSVvKJn+5tp0NMG69/Foa8rC gcuJQPInBtstAmSYE1WsEj96QGucX70L+XRTfwHW7PYGxvDWNNugPmLFEntoEc689HbD 53CEHRcbiQjbX2PTmHQr0BI1iYaysxoj2xr0SUbzeF7VEvtfSrFXvuNyrkGG3wpTHRjs MqPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:arc-authentication-results; bh=zjtN8PUphgdZv/QV0Bs3YtQmNPGSg871VQrtBm4vW3I=; b=m8A3XPLmVpgs1ckxX3nkAWVj25e9or+MviLOVP0DyoKO6fMzUQTO1e4C1qnbt5czC1 1giEbJwOGuk3G4IEzfR3/pHZ86lKDAlgaR4AtjRDcNCOMczCJVWzEAqP/NkDOsp3oO8R bN8W4qR9oy+JvQY/aMsVVCn9n5RXBNq+JWidWDWsWt4k0d2eFK0Lx+wDL2RVM54e+1A1 bwtFNEO9vx+vN9VC6f0cY7KeoqvMREHs+RNeWcpCzgayTjYY5mjCHq3R1ItUUPXr/cK8 lt1yx9mjE/GOyaOLS8UlMbN+xyZEH5uEoZH8WOP6qYIZkxOsCtsp2H/mm9i9QmwTe399 S55A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62-v6si10440725ple.267.2018.01.29.15.40.46; Mon, 29 Jan 2018 15:41:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752001AbeA2XjL (ORCPT + 99 others); Mon, 29 Jan 2018 18:39:11 -0500 Received: from mail-co1nam03on0095.outbound.protection.outlook.com ([104.47.40.95]:28928 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751417AbeA2XjJ (ORCPT ); Mon, 29 Jan 2018 18:39:09 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=zi.yan@cs.rutgers.edu; Received: from [172.27.40.195] (128.6.37.110) by DM5PR14MB1657.namprd14.prod.outlook.com (10.171.156.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 23:39:05 +0000 From: "Zi Yan" To: "Andrew Morton" Cc: "Michal Hocko" , "Naoya Horiguchi" , "Kirill A. Shutemov" , "Vlastimil Babka" , "Andrea Reale" , "Anshuman Khandual" , linux-mm@kvack.org, LKML , "Michal Hocko" Subject: Re: [PATCH 1/3] mm, numa: rework do_pages_move Date: Mon, 29 Jan 2018 18:39:01 -0500 X-Mailer: MailMate (2.0BETAr6103) Message-ID: <07425013-A7A9-4BB8-8FAA-9581D966A29B@cs.rutgers.edu> In-Reply-To: <20180129143522.68a5332ae80d28461441a6be@linux-foundation.org> References: <20180103082555.14592-1-mhocko@kernel.org> <20180103082555.14592-2-mhocko@kernel.org> <8ECFD324-D8A0-47DC-A6FD-B9F7D29445DC@cs.rutgers.edu> <20180129143522.68a5332ae80d28461441a6be@linux-foundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=_MailMate_82629931-A273-4C60-BCE9-285C5743D4F6_="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Originating-IP: [128.6.37.110] X-ClientProxiedBy: BN6PR13CA0037.namprd13.prod.outlook.com (10.171.172.23) To DM5PR14MB1657.namprd14.prod.outlook.com (10.171.156.15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3772d717-b0d3-4669-6dd8-08d567717cc1 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:DM5PR14MB1657; X-Microsoft-Exchange-Diagnostics: 1;DM5PR14MB1657;3:6sGwZQS0BhnQrJ3fKUXus1WdvGq3aDizpN9pLh7w7LNZJTZuYrNEbDqSjIPkCaFAvmSJ7XUoJvFXh9jcR/W96a5OKSKc/aPOJyO2bLfqQMuOM0KiYBLCe5FhkP1DSZmC78ejc11boiKv7jkDKGZwwe88c2AEDzw7C+liX9BfaIQQNyFVfWKVs3AI1qSfxdEnJaS30+Br4r1TW+HTPTWfBwCImbdhBmJSbM0PfLEafisWjgCyoU4RTll5joVUTFbS;25:0pT0aQa1P14Da1euli48rhp7U8og6Y4IKrq1PSVRYfcFXYQE+tXeO71BeqS8UxqANR4EQPxVQsPPc2WBCGeRlvmgHX4z3SCfQE6t8OVa4brx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W7PsinvIcqk39cLnVz2A8ncDY16ZiB8vXnQ1+N50Id3mpmwQAUQpGnVZ5cdcZQoNjq53LDmqVGZxnT5zbBFuVMCrFHz1VcAhuWNCleJD+Ploo1JS0NbYFPX3Gb8UdpHmyTbm0EZIoLvmjzEcoJ2J0JEupjST5s39n92c5beK1K8k92Vp7Zaknfmt/isFJ2CQdo1fUGOZDx1r4309d9EonP3sslP2dG5OVTfRAOMLIERAyPAxZiOJ0OteIPEXiLj4ru/T5ILD07b8C1nSZA/okycGCRKYQyuLDHf9Nlj0ZE2nZ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(5005006)(8121501046)(10201501046)(3231101)(11241501184)(944501161)(93006095)(93001095)(3002001)(6041288)(20161123562045)(20161123564045)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR14MB1657;BCL:0;PCL:0;RULEID:;SRVR:DM5PR14MB1657; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(979002)(6049001)(39860400002)(396003)(366004)(39380400002)(346002)(376002)(189003)(199004)(57704003)(786003)(2906002)(88552002)(84326002)(5660300001)(90366009)(33656002)(75432002)(97736004)(54906003)(16586007)(7416002)(316002)(52116002)(53936002)(229853002)(8676002)(82746002)(16576012)(76176011)(478600001)(6486002)(5000100001)(59450400001)(106356001)(16526019)(6246003)(66066001)(186003)(8936002)(86362001)(93886005)(81156014)(3846002)(53546011)(568964002)(6116002)(386003)(6666003)(25786009)(42882006)(6916009)(2950100002)(50226002)(7736002)(81166006)(68736007)(4326008)(105586002)(26005)(83716003)(77096007)(5890100001)(305945005)(72826003)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR14MB1657;H:[172.27.40.195];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: cs.rutgers.edu does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM5PR14MB1657;23:myQxrzz+0C0jB3H3SXu2Y8GYdGYtEn3JmHr0OthNC?= =?us-ascii?Q?GJSW+Me6ksul3ZVjakshztK1dQ6LKw7VJM5xS9+J8N32M1kpA+vBdW0vojWN?= =?us-ascii?Q?D4PeWiagBAtPiQUcy3RNjMyO0N51kOYFPwVkirCxnKSi1iJpay7ShD44z+ZY?= =?us-ascii?Q?cUyVtrwV/+whW5dzndbk5Q7VywK2l+Hj5dArzYqztyJqyhxwcTG1le/AvEmy?= =?us-ascii?Q?uOzTBhy4FmZ60U6Xb+hbhrBAZ7Si1+5789M05sowWJM0gwAFcNqcDG3wVOi+?= =?us-ascii?Q?C0V1pc0Ul8m4rFOiP/LCOIP3YzSX9v7VYj+FfPKS1C3tkF6gH6pxlLG/sNon?= =?us-ascii?Q?g2efUUnDYBsWB1EhUBPADp62QSyGUBzJ3Y8G9I8LXQW5gUI2iX6aXjmwu5m4?= =?us-ascii?Q?qW/8k+IDtWE6hyYXf/UJn6eam58F8XzdOQF3vJP3XaN935n3xoLVarpwY9pg?= =?us-ascii?Q?rswbr1KPqbm8wuQ61pt9YkpGOqfUlqrTVIgc5SIhnGC6deuAC8iXDCwK9BAW?= =?us-ascii?Q?5cvGIc7rBPbfdXglPMsDvAhDKF12UibG3rZhxbVZJZtzAG0OXgLhb12rirpc?= =?us-ascii?Q?g093umSiLloanYpPxSD5wI2NgwgVN5ZHMv2zOglIa+YYS9aYOS1xP28AWLqE?= =?us-ascii?Q?mAoz1Dyvn4YJv3lUo+pmmt5sJKOl/wL/zHHDEtAr0eOj9z27qzm8FWC3tBSn?= =?us-ascii?Q?IiLaWMsAsQ0tHz/ancoHrp1XSnCPIaY2Oiz3k3TFtpU2kPnrupYEY4eNBbsL?= =?us-ascii?Q?m0s3rJg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X2wfQrcdAEXm0mBdJlqbWejSukv6fxPHQHiJfwKD0trPgzEAL3L+XYtZQsE4zxvZbmuuE1du7snyA516lpCplgIz6D1YBT0SSZYl17twjkueibAl1W0oTGHlrUG4rRTqOcOwvsGSaK9ebYY9g0Ci8uC6XL29WqtTZqvFRAuNN9MyKCIqdYGfHdCbdyawIm0ZIuKCKk13s4i64Ak8CP6NqlbY2RWiz712jW5ZsD+Xtp7CRq5sc2OUJLipyegPVv7slK3PHGG+BaePhGiWLPLWVH+Efntt8qgQpxqqfp2ejdlpAUS/FnYAETim/3oD60d0uczlwalt5mvC88=;5:4hkg6/bHmo5ao+ZbUIWvaqkIc9wrXUAJ0ICasx/tcf2VmP9uUPSHcw4r75KbH9dTofYgfp2Y9eDROuOiyeqaJJ3wiTWn4XEGpDYLrsJBbaLgJ5+JQ8bAIgnzdbkysSQSsUJglEhwlsFZhSW7B1AVp8njd+XBFTMrQgVbG0lOn/0=;24:hbKgZxKpeeAk+ETUwa4mcfSmk6Wh33ARRAHCbD8NaFzMcO0UYM9AKssLU3gyhpCrf6FJQVJ+KL1sf3LFlkQXmma/EgESHl3sRq1mh0CBjw4=;7:+Vm/PUVkjOEGG8KiLcg3LjjvBgiJt/y8O8pi9p/nYR7WocVz9+ebPV6WQ9zy8DBZG9bByk1lrqOHgPzcF7CQfa2wV96YmPxHmhX43mMdCmic+6Ncj5sDfEvydeKnWu8TRPIfYl1XO7+j+EZzTvXCxrAVWYJXIUaGI8w3O61lxtsXQJxkuNVyMGa5qZ2WpoBLySMQRuoUvoUagE64nhgMXuhL+028Few+TQok77L6jTAJv4g/QIzcKnlOaFII3U5r SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cs.rutgers.edu X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 23:39:05.7309 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3772d717-b0d3-4669-6dd8-08d567717cc1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b92d2b23-4d35-4470-93ff-69aca6632ffe X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR14MB1657 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 3156 and 4880). --=_MailMate_82629931-A273-4C60-BCE9-285C5743D4F6_= Content-Type: text/plain; markup=markdown On 29 Jan 2018, at 17:35, Andrew Morton wrote: > On Mon, 29 Jan 2018 17:06:14 -0500 "Zi Yan" wrote: > >> I discover that this patch does not hold mmap_sem while migrating pages in >> do_move_pages_to_node(). >> >> A simple fix below moves mmap_sem from add_page_for_migration() >> to the outmost do_pages_move(): > > I'm not surprised. Why does do_move_pages_to_node() need mmap_sem > and how is a reader to discover that fact??? do_move_pages_to_node() calls migrate_pages(), which requires down_read(&mmap_sem). In the outmost do_pages_move(), both add_page_for_migration() and do_move_pages_to_node() inside it need to hold read lock of mmap_sem. Do we need to add comments for both functions? -- Best Regards Yan Zi --=_MailMate_82629931-A273-4C60-BCE9-285C5743D4F6_= 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 iQEcBAEBCgAGBQJab7CWAAoJEEGLLxGcTqbMSAgH/2/8yCgR0MfGqZ4rDG4zFlZo RTL+u7K/cqT3ATheAn2OUrFXIN1PvYnQMtWTZlxD3/UwwiVAVNBjOPgvNfsH8pBU wYpUhLZelY+7eDh76w1gjbXX3mLj8aw/G6iElT9Bn+E2rpdNAGEWIVpRvlCfJhuC namOqKF0O6XmmnInbkjtDpjts2i7I4MRmGF68uHMDUVC22V/rAkG58frdd8ebpi+ 2tjh46d8VftAkNSldAppmhh1CuQzrrrCqmy7cKWh93mmsMCN6ulVjduONZUr9Wu+ 8yWLrK/2imgApk30vcR6avcG63uqUylvzzBNg8z+5za0WLu+oFrxhicpf3jaHL0= =PsUi -----END PGP SIGNATURE----- --=_MailMate_82629931-A273-4C60-BCE9-285C5743D4F6_=--