From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39E02C3A5A9 for ; Wed, 4 Sep 2019 08:14:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1592022CF7 for ; Wed, 4 Sep 2019 08:14:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1592022CF7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B922B6B0006; Wed, 4 Sep 2019 04:14:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B41726B0007; Wed, 4 Sep 2019 04:14:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A57FF6B0008; Wed, 4 Sep 2019 04:14:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0061.hostedemail.com [216.40.44.61]) by kanga.kvack.org (Postfix) with ESMTP id 816206B0006 for ; Wed, 4 Sep 2019 04:14:10 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id E79AA181AC9BA for ; Wed, 4 Sep 2019 08:14:09 +0000 (UTC) X-FDA: 75896525418.21.start06_7ba3beba3f05a X-HE-Tag: start06_7ba3beba3f05a X-Filterd-Recvd-Size: 2120 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Wed, 4 Sep 2019 08:14:09 +0000 (UTC) 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 8A303AB9B; Wed, 4 Sep 2019 08:14:08 +0000 (UTC) Date: Wed, 4 Sep 2019 10:14:08 +0200 From: Michal Hocko To: sunqiuyang Cc: "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCH 1/1] mm/migrate: fix list corruption in migration of non-LRU movable pages Message-ID: <20190904081408.GF3838@dhcp22.suse.cz> References: <20190903082746.20736-1-sunqiuyang@huawei.com> <20190903131737.GB18939@dhcp22.suse.cz> <157FC541501A9C4C862B2F16FFE316DC190C1B09@dggeml512-mbx.china.huawei.com> <20190904063836.GD3838@dhcp22.suse.cz> <157FC541501A9C4C862B2F16FFE316DC190C2EBD@dggeml512-mbx.china.huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <157FC541501A9C4C862B2F16FFE316DC190C2EBD@dggeml512-mbx.china.huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Do not top post please On Wed 04-09-19 07:27:25, sunqiuyang wrote: > isolate_migratepages_block() from another thread may try to isolate the page again: > > for (; low_pfn < end_pfn; low_pfn++) { > /* ... */ > page = pfn_to_page(low_pfn); > /* ... */ > if (!PageLRU(page)) { > if (unlikely(__PageMovable(page)) && !PageIsolated(page)) { > /* ... */ > if (!isolate_movable_page(page, isolate_mode)) > goto isolate_success; > /*... */ > isolate_success: > list_add(&page->lru, &cc->migratepages); > > And this page will be added to another list. > Or, do you see any reason that the page cannot go through this path? The page shouldn't be __PageMovable after the migration is done. All the state should have been transfered to the new page IIUC. -- Michal Hocko SUSE Labs