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=-7.4 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, 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 938B5C433EF for ; Mon, 6 Sep 2021 09:46:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 11E1060E76 for ; Mon, 6 Sep 2021 09:46:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 11E1060E76 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 8852F900002; Mon, 6 Sep 2021 05:46:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 833CD6B0072; Mon, 6 Sep 2021 05:46:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6FC48900002; Mon, 6 Sep 2021 05:46:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0042.hostedemail.com [216.40.44.42]) by kanga.kvack.org (Postfix) with ESMTP id 629E76B0071 for ; Mon, 6 Sep 2021 05:46:54 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 0E3492A037 for ; Mon, 6 Sep 2021 09:46:54 +0000 (UTC) X-FDA: 78556669548.26.0712658 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf21.hostedemail.com (Postfix) with ESMTP id B742CD028CE5 for ; Mon, 6 Sep 2021 09:46:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630921613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/5PtHHIZDp8gAWvUlkCms1Gx7x4SSQagx1CFC8z46SQ=; b=Zqty5OwxVbP1xAlBz3barh/iawJC7Uylg5yf5lKrsXA0LYr9HftdwTGROmf6jIazRTvCxi MXZxpMDAw+wpJQL7J1zrxjBvjQB+b7VLqvfmFYLqIXXY0DqrKMDYD0QYD599AIBs6/lAZ4 +ZjYJ5dAQ+FD1Dc/P6iFqZx6rFkXKJc= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-351-FeMM4V0aMS-16xXXlzyFDA-1; Mon, 06 Sep 2021 05:46:52 -0400 X-MC-Unique: FeMM4V0aMS-16xXXlzyFDA-1 Received: by mail-wr1-f69.google.com with SMTP id b8-20020a5d5508000000b001574e8e9237so1037873wrv.16 for ; Mon, 06 Sep 2021 02:46:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:organization:subject :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=/5PtHHIZDp8gAWvUlkCms1Gx7x4SSQagx1CFC8z46SQ=; b=eAiprXUg567R/UVUMxkf4Iozw8kQ98gmJpLbHunBRBCgT17owanVJvpNy+hFpFGoP1 SMBKj/8wXKR8DcbUbLHCK6ggh50iTTR9U2wq4Yo1VlI/OlIgOPN9NllVtf6pFvng6+UP 15iRR1x3ah2dHPTrHBMsUiUAodcB3luAWqrVY4usatANClvW99cWU0VbPw070idyS1JW XevIo0Tj2YmOQeBH8gODbmkkbXbhs5GDZCxtW87ibjumA4V0cCR+Wl59/TM0fyMNcOn1 qi0fQNNp+R3PM6gohdHdvv9CujHav4gCGb2XL7BIyAB3ay1+UOodFGC90uQ3w1gRoTyO AasQ== X-Gm-Message-State: AOAM532ToSPHEVfiglZVvzMin/InjIyOaQLv14aBCijBQC6jcm3Nm3Nw lBkD//Cwu2m8bxMax+ebSp+Lnd4S//OxEce6BnJKAMzqGtl9T9M/Dq+7jfu3rtSU71KqY5StiZ5 eDASgl3+6oMM= X-Received: by 2002:a7b:cb44:: with SMTP id v4mr10406967wmj.169.1630921610888; Mon, 06 Sep 2021 02:46:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXS8yCWHtLRpU75iEnxvwJNw91CV8ByCD0LRmJTGiky9SdAVEEtluv2gYbDJU33Fj6vuzfBg== X-Received: by 2002:a7b:cb44:: with SMTP id v4mr10406952wmj.169.1630921610640; Mon, 06 Sep 2021 02:46:50 -0700 (PDT) Received: from [192.168.3.132] (p5b0c6323.dip0.t-ipconnect.de. [91.12.99.35]) by smtp.gmail.com with ESMTPSA id t14sm6615395wmi.12.2021.09.06.02.46.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Sep 2021 02:46:50 -0700 (PDT) To: Miaohe Lin , akpm@linux-foundation.org Cc: mhocko@suse.com, vbabka@suse.cz, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20210904092053.33037-1-linmiaohe@huawei.com> From: David Hildenbrand Organization: Red Hat Subject: Re: [PATCH] mm/page_isolation: fix potential missing call to unset_migratetype_isolate() Message-ID: Date: Mon, 6 Sep 2021 11:46:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Zqty5Owx; spf=none (imf21.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 216.205.24.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: B742CD028CE5 X-Stat-Signature: umexrcr8sbfn84xsrg8wfdfb8o66micn X-HE-Tag: 1630921613-895518 Content-Transfer-Encoding: quoted-printable 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: On 06.09.21 11:38, Miaohe Lin wrote: > On 2021/9/6 17:27, David Hildenbrand wrote: >> On 04.09.21 11:20, Miaohe Lin wrote: >>> In start_isolate_page_range() undo path, pfn_to_online_page() just ch= ecks >>> the first pfn in a pageblock while __first_valid_page() will traverse= the >>> pageblock until the first online pfn is found. So we may miss the cal= l to >>> unset_migratetype_isolate() in undo path and pages will remain isolat= ed >>> unexpectedly. Fix this by calling undo_isolate_page_range() and this = will >>> also help to remove some duplicated codes. >>> >>> Fixes: 2ce13640b3f4 ("mm: __first_valid_page skip over offline pages"= ) >> >> While that is true, we shouldn't ever trigger, neither via cma, virtio= -mem nor memory offlining, because essentially all operate on MAX_ORDER -= 1 -aligned ranges without memory holes. >=20 > I think this should never trigger too. It's a theoretical issue. So is = the Fixes tag necessary ? >=20 I think it's one of these "let's add Fixes: but no need for Cc: stable". BUT in older kernels we could have triggered this via memory offlining=20 eventually ... before c5e79ef561b0 ("mm/memory_hotplug.c: don't allow to=20 online/offline memory blocks with holes") ... so maybe even a Cc: stable? --=20 Thanks, David / dhildenb