Received: by 10.223.176.5 with SMTP id f5csp1074176wra; Wed, 31 Jan 2018 00:38:46 -0800 (PST) X-Google-Smtp-Source: AH8x225V6tPDgFBgiiBPRXRhd2wbz36mGOQbuaoZhxZtndpj2whjRCyRShwV0MthX+xR+kvyj1w5 X-Received: by 2002:a17:902:9a9:: with SMTP id 38-v6mr27446923pln.202.1517387925931; Wed, 31 Jan 2018 00:38:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517387925; cv=none; d=google.com; s=arc-20160816; b=BqJEP3zpFC0K0JLIHxfF5DdFJtp7K9aC9/X3gWSn4BL8L+qQUEpD/mzW33PJ31N7r1 xZWmOcbOC9Cxfk1mAqVj15sQslDxsa0auIqGzAA8Q2BoLy4l91scOJoa0/zjEpQc8bTf iEM4AzjLvwlWpBU7TMLDv2+ZaVlA+o2mp/TaFGEYKQci3QDZw7nHxjHNUpfOP6pec3CX 24jn1bfnJrc8Ppe+aGiQ+JbBFm/qO+WecrDVfeJCXR7TYL2SLa9LStYMRyJP8Y0aAipY IPi20BiuEuUDlDs9r9xZM9DXFRWPXhrrZ80cOUNdP3wHbOZdLw4uVXPA6YU+rhVssxVg 74Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=vCeA3xbwiypDBvcMlSe0vN7MWPS7Hpl59NqC8k3ASJ8=; b=v14oPkrcBpGfj30xZCByZSKEZKnKUi9lIfnMFqdrwFstCggoaG5o4ddp/2O8F/guWz ALPeX0aAoCwscIw8qTRpHSYfPGBA7xE1XVW0o5+oWEi2dnJhVbys+F8HEKydse6tp6wS vRRwXiCBVNq6dJUR+rEXb4vqBaHNIYKEjdnvZQLTW1OVYUFj6lJoWWclLiHjsb2GMCPh Lf6aHuAa1JzqxVuLywL0M8lru+okZ50zDDSf+IZH4apAmyicwqqljOJye5WRCjlMI1Ce yPJFXEUDrDoWF1GqOayCRsK8qsQ24zy257HT+iYRc10R0d/uBrHgDU6R2pHOLokdqeMv G07Q== 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 s74si3055234pgc.774.2018.01.31.00.38.31; Wed, 31 Jan 2018 00:38:45 -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 S1752187AbeAaIBR (ORCPT + 99 others); Wed, 31 Jan 2018 03:01:17 -0500 Received: from mx2.suse.de ([195.135.220.15]:47307 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750983AbeAaIBQ (ORCPT ); Wed, 31 Jan 2018 03:01:16 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 42A8EACAD; Wed, 31 Jan 2018 08:01:15 +0000 (UTC) Date: Wed, 31 Jan 2018 09:01:14 +0100 From: Michal Hocko To: Zi Yan Cc: Andrew Morton , "Kirill A . Shutemov" , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Hugh Dickins Subject: Re: [PATCH] Lock mmap_sem when calling migrate_pages() in do_move_pages_to_node() Message-ID: <20180131080114.GM21609@dhcp22.suse.cz> References: <20180130030011.4310-1-zi.yan@sent.com> <20180130081415.GO21609@dhcp22.suse.cz> <5A7094DA.4000804@cs.rutgers.edu> <20180130161025.GH21609@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 30-01-18 14:12:28, Zi Yan wrote: > On 30 Jan 2018, at 11:10, Michal Hocko wrote: [...] > I think the question is whether we need to hold mmap_sem for > migrate_pages(). Hugh also agrees it is not necessary on a separate > email. But it is held in the original code. I would be really surprised if we really needed the lock. If we do, however, then we really need a very good explanation why. The code used to do so is not a valid reason. -- Michal Hocko SUSE Labs