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=-20.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 A42CEC4338F for ; Mon, 23 Aug 2021 12:15:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 51DFF61391 for ; Mon, 23 Aug 2021 12:15:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 51DFF61391 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 C634B900003; Mon, 23 Aug 2021 08:15:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BEB346B0072; Mon, 23 Aug 2021 08:15:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A8BDD900003; Mon, 23 Aug 2021 08:15:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0155.hostedemail.com [216.40.44.155]) by kanga.kvack.org (Postfix) with ESMTP id 8EB256B006C for ; Mon, 23 Aug 2021 08:15:12 -0400 (EDT) Received: from smtpin32.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3BCDC1E4D1 for ; Mon, 23 Aug 2021 12:15:12 +0000 (UTC) X-FDA: 78506240064.32.B248B5F Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf27.hostedemail.com (Postfix) with ESMTP id DCA12700009D for ; Mon, 23 Aug 2021 12:15:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629720911; 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=VuOutErs/3kz1A1Pl67QiGCXKD6+QoIdF+PyPh/HBMQ=; b=h4/jI115ybfTJVxlfEzTCgcbqlTEhjaRBvLztBQk5JhL1/PFMN9K3+PFRbr5Wpwcs4y9To sC8vlXKjofDYcuOz6I+gxx9eDRTQ3b3oLciEVfDqOx0SuK9192Wr55Ad8H8ik7irqV5H0z 3yIYdrgniEVHNJaOM9MRzdfg736DAms= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-352-psx-KYBWO8Sg0_aYPmQvGw-1; Mon, 23 Aug 2021 08:15:10 -0400 X-MC-Unique: psx-KYBWO8Sg0_aYPmQvGw-1 Received: by mail-wm1-f70.google.com with SMTP id y23-20020a7bcd97000000b002e6e4a2a332so2925978wmj.0 for ; Mon, 23 Aug 2021 05:15:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=VuOutErs/3kz1A1Pl67QiGCXKD6+QoIdF+PyPh/HBMQ=; b=gvg4VYu/uj+MjapZh/Zv9HHik+06UILpgXaR75U0PlqLu4w+v49QZXJ5Fu+7Z5CM2V icZ9re7xs5uonjSHU9qZbmKYdtzQV0mjePAyWDYWog4tXvHpR59ajq6W/YrKptcFVBNk 4hZGbXzek9+UpDs9EfB4EmqZQ92AHqKXCoju37ZhpVmVObqudI1xZLK7PQdRNd4yLYSE Fir8pnvYkfVmSPXZzbBXHpkYuk//u5yb76zDfGkqJZe0OgXvviBHue18hBcwFdt5603/ eDXsij/80qZQ3Sn7Pnlili+QuaMxLDfhhIWFsI3zCTqJ6hyFlI3+pky2NluoEIhEeoUv 1KiQ== X-Gm-Message-State: AOAM530KMUxywGagVK7j9iXVS+F7DqugjzxNXG/AnTiRFEA9ipTGT4M2 KQyQMxGix/CFPNo5sm7sH16UAFYCi32wnuXvidJdvKPGn/UNw1Do5nVnez7MvzRKlUDXy24wK5N 4sjIB8+wZCqg= X-Received: by 2002:a05:600c:198a:: with SMTP id t10mr15935396wmq.181.1629720908982; Mon, 23 Aug 2021 05:15:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybW+zWaolHk2FOUq8+ktueTloCfvGnGzVnfvj/5DjB8RzaLv8qwIpkvrwgPCfE+Yd6cxsUqQ== X-Received: by 2002:a05:600c:198a:: with SMTP id t10mr15935376wmq.181.1629720908785; Mon, 23 Aug 2021 05:15:08 -0700 (PDT) Received: from ?IPv6:2003:d8:2f0a:7f00:fad7:3bc9:69d:31f? (p200300d82f0a7f00fad73bc9069d031f.dip0.t-ipconnect.de. [2003:d8:2f0a:7f00:fad7:3bc9:69d:31f]) by smtp.gmail.com with ESMTPSA id d9sm15001473wrw.26.2021.08.23.05.15.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Aug 2021 05:15:08 -0700 (PDT) Subject: Re: [PATCH 2/3] mm/memory_hotplug: fix potential permanent lru cache disable To: Miaohe Lin , akpm@linux-foundation.org Cc: naoya.horiguchi@nec.com, mhocko@suse.com, minchan@kernel.org, cgoldswo@codeaurora.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20210821094246.10149-1-linmiaohe@huawei.com> <20210821094246.10149-3-linmiaohe@huawei.com> From: David Hildenbrand Organization: Red Hat Message-ID: <985b591a-ef1f-cbbe-c627-a17240dc7bb6@redhat.com> Date: Mon, 23 Aug 2021 14:15:07 +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: <20210821094246.10149-3-linmiaohe@huawei.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="h4/jI115"; spf=none (imf27.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: DCA12700009D X-Stat-Signature: nwyxre77de4zu7rrghiyd66xb93wxys3 X-HE-Tag: 1629720911-53537 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 21.08.21 11:42, Miaohe Lin wrote: > If offline_pages failed after lru_cache_disable(), it forgot to do > lru_cache_enable() in error path. So we would have lru cache disabled > permanently in this case. > > Fixes: d479960e44f2 ("mm: disable LRU pagevec during the migration temporarily") > Signed-off-by: Miaohe Lin > --- > mm/memory_hotplug.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c > index d986d3791986..9fd0be32a281 100644 > --- a/mm/memory_hotplug.c > +++ b/mm/memory_hotplug.c > @@ -2033,6 +2033,7 @@ int __ref offline_pages(unsigned long start_pfn, unsigned long nr_pages, > undo_isolate_page_range(start_pfn, end_pfn, MIGRATE_MOVABLE); > memory_notify(MEM_CANCEL_OFFLINE, &arg); > failed_removal_pcplists_disabled: > + lru_cache_enable(); > zone_pcp_enable(zone); > failed_removal: > pr_debug("memory offlining [mem %#010llx-%#010llx] failed due to %s\n", > Reviewed-by: David Hildenbrand As mentioned, this should be backported to stable. -- Thanks, David / dhildenb