Received: by 10.223.176.5 with SMTP id f5csp3521427wra; Mon, 29 Jan 2018 14:36:06 -0800 (PST) X-Google-Smtp-Source: AH8x227UMS9Sf2hSeIA9hSGAhG8ykIN2wceMTB8ZC14qo3hBbBIKLgM5A2iddfJ5+qmtta6/nSII X-Received: by 10.98.101.71 with SMTP id z68mr28229549pfb.181.1517265365887; Mon, 29 Jan 2018 14:36:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517265365; cv=none; d=google.com; s=arc-20160816; b=ZIUqpSZkneDUzRe6IyjGVfDvIrSUKhQI58+FiLLAhqYR4o1QTdy3vdFnANFAUHQS91 EijbePbi1DZcsA6PMTZZnOU35LB2xs+X27Ea3Y2S64vK7LS/DRVmvpzGtcOa8YEa4LZt V/H4NVQisEcx5BN92cVbpPky5RbpRKIVlcQhpQ5P4Y4uyvZL7nFNxXm+nUoDFjdguhOk fAv/zEh0b6JfHLSJYsavyiJP3K4eYdWmhJANECPQpGM9vQnK6auQlUBg4h6lLlaBfbSl Yeuq+ZIeR0wddqIA/KthLNEt9r96JxsV2RSZNR9p9TfS2oBIYxSTC9vK18GzGlO4uqB2 IlEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=3j+rkOCrqLDe5RsubPcfB6RyEBD2qDqFmieGCMpKba0=; b=zuZOzpGTJdvtxtVlY5wqHflBwPHkefE1MKAqUeZLmeFs9VamOr7b8Id9RTIcwF8O11 j8+cTj/1frs1u2rLPF+anFY8HuxzQd0SgQkUQ3QNGDVqKS1l2iMLQVaJrE5Eu8rKH+RA SQqy961+YH+95XNohlFiXr25mZLxx4vtICDGVMyttOv2yjjZOTsEQrDJeNZ0S9tWSI8f 6slAw378/kDw8veWIwGYlgj/zQrP7Rbb6w+OBsX6tQ3j1KoUS3t8lDQI4+IO/9T6hfa0 5JS1vuZf2DiF4JzK5aAuuSDIz2zi6MrNPTMEvN+ZpFrvfb69+mHmCOwvxci9V3y/BFyu /dtA== 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 b17-v6si2266280pls.483.2018.01.29.14.35.49; Mon, 29 Jan 2018 14:36:05 -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 S1751603AbeA2WfZ (ORCPT + 99 others); Mon, 29 Jan 2018 17:35:25 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:57212 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751434AbeA2WfY (ORCPT ); Mon, 29 Jan 2018 17:35:24 -0500 Received: from akpm3.svl.corp.google.com (unknown [104.133.9.92]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 9B7021102; Mon, 29 Jan 2018 22:35:23 +0000 (UTC) Date: Mon, 29 Jan 2018 14:35:22 -0800 From: Andrew Morton To: "Zi Yan" 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 Message-Id: <20180129143522.68a5332ae80d28461441a6be@linux-foundation.org> In-Reply-To: <8ECFD324-D8A0-47DC-A6FD-B9F7D29445DC@cs.rutgers.edu> References: <20180103082555.14592-1-mhocko@kernel.org> <20180103082555.14592-2-mhocko@kernel.org> <8ECFD324-D8A0-47DC-A6FD-B9F7D29445DC@cs.rutgers.edu> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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???