Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3029720imu; Mon, 19 Nov 2018 09:34:44 -0800 (PST) X-Google-Smtp-Source: AJdET5c2n2IK/fwPTT1wJ+hvbxbccqWcpgZ9K11mauXuPqhhjq1nQ8m8OGAnexvF5EMoVeBgf7QT X-Received: by 2002:a63:ce08:: with SMTP id y8mr20611691pgf.388.1542648884106; Mon, 19 Nov 2018 09:34:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542648884; cv=none; d=google.com; s=arc-20160816; b=YUsN6ItL0M7Y9sKQhUyIl/llycgImt+be6tvHW5ruvHAxtxMXLcTQrNK825B5brk5m 6qVKlvdTW0aBBW8s63bIehNDFjFKa6cYp44TXQnL2tbeHwLTNFZDybDIn8iHKqfGv5ia pA/d36U+dIJ5KGXQ1+018NklhKwxobUz2t+k51oGzr+Hb4EZtrnnxy70hud9e4E47jbb UICkXOOuZsI6i3JxsTZovvWJ1WrUC+V9+9xFMd5IGco+sb2wrvllMuhb1Y9ogATtehvC 77+V70LYp8PHWShJpwbXEydwWfG7Wpdf18NnHzqkBkuN1GSWP1qbv0/d+X6cQa5gEiSi Z3Mw== 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; bh=fOO9qr3pXveYHONzWji1HPgvTqs5r/j0KyQUXP5G1gk=; b=K6kjBCiG/43M4vDEjXwAtx86rFoxn8T/g2mpXY/12+Wrh+cIfl7Zwi68TkdCw1Gf0a rH/739dk/QFbo6mP8YvVv1mj54aSLm9ATiYi+rWcCl229OrsH/jMXxZBCKT0htUa0w2A m0iEq1GqAAcfl88IMiyEfEwAlN50ZXPHEdGA663y9CYC3/QiRXax7G7uxTF71ldPHpJv 3MIWwn/44iMuFu2Crj/gfcUTfCBZ4eWxnRdXt0uACTkCrVqOmXrn/l5F3g7bh4CDzBIK xx+2+eZOXtrIry68UmrSCAPZY3RAkAqlFcdEnBUjSEFV/xjkEEeukLFabJf/yLuMNtfB IcDA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4si21744532plf.364.2018.11.19.09.34.22; Mon, 19 Nov 2018 09:34:44 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403990AbeKTD5k (ORCPT + 99 others); Mon, 19 Nov 2018 22:57:40 -0500 Received: from mx2.suse.de ([195.135.220.15]:49124 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2403779AbeKTD5j (ORCPT ); Mon, 19 Nov 2018 22:57:39 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 56FEDB020; Mon, 19 Nov 2018 17:33:13 +0000 (UTC) Date: Mon, 19 Nov 2018 18:33:12 +0100 From: Michal Hocko To: Baoquan He Cc: David Hildenbrand , linux-mm@kvack.org, pifang@redhat.com, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, aarcange@redhat.com, Mel Gorman , Vlastimil Babka , Hugh Dickins Subject: Re: Memory hotplug softlock issue Message-ID: <20181119173312.GV22247@dhcp22.suse.cz> References: <20181115131211.GP2653@MiWiFi-R3L-srv> <20181115131927.GT23831@dhcp22.suse.cz> <20181115133840.GR2653@MiWiFi-R3L-srv> <20181115143204.GV23831@dhcp22.suse.cz> <20181116012433.GU2653@MiWiFi-R3L-srv> <20181116091409.GD14706@dhcp22.suse.cz> <20181119105202.GE18471@MiWiFi-R3L-srv> <20181119124033.GJ22247@dhcp22.suse.cz> <20181119125121.GK22247@dhcp22.suse.cz> <20181119141016.GO22247@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181119141016.GO22247@dhcp22.suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 19-11-18 15:10:16, Michal Hocko wrote: [...] > In other words. Why cannot we do the following? Baoquan, this is certainly not the right fix but I would be really curious whether it makes the problem go away. > diff --git a/mm/migrate.c b/mm/migrate.c > index f7e4bfdc13b7..7ccab29bcf9a 100644 > --- a/mm/migrate.c > +++ b/mm/migrate.c > @@ -324,19 +324,9 @@ void __migration_entry_wait(struct mm_struct *mm, pte_t *ptep, > goto out; > > page = migration_entry_to_page(entry); > - > - /* > - * Once page cache replacement of page migration started, page_count > - * *must* be zero. And, we don't want to call wait_on_page_locked() > - * against a page without get_page(). > - * So, we use get_page_unless_zero(), here. Even failed, page fault > - * will occur again. > - */ > - if (!get_page_unless_zero(page)) > - goto out; > pte_unmap_unlock(ptep, ptl); > - wait_on_page_locked(page); > - put_page(page); > + page_lock(page); > + page_unlock(page); > return; > out: > pte_unmap_unlock(ptep, ptl); -- Michal Hocko SUSE Labs