Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1807460pxb; Mon, 23 Aug 2021 05:16:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqxq2VP86y87Dae4dgx4JYuAlSaxStZDvsd+O9E+CzX+xVb12EouubNuNVWea9Y9Gi5Em3 X-Received: by 2002:a05:6e02:20cd:: with SMTP id 13mr22460070ilq.156.1629721016791; Mon, 23 Aug 2021 05:16:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629721016; cv=none; d=google.com; s=arc-20160816; b=xJs4wdUfeezBdL8E+odjX2eJwWcrBmMDt3pWY3BFzDIrX1vm3zJYmfbnr6LY1vCSxS 2sSWkTNvbTNNlvR4B0aiXaZJdv1OR6GU5lnDiGB5weG/cVExNb7mYYZrVpPaqUkvkRom vb/AmmngkzStiUnm1K8OCK6fONkIjeHtXVZysQL6hZuzuQrR97oso5fbmQzVUFNHlHQm Y/PSfaxqJTyKmC2ydgIg0J489AtarDy3G+pNtgjWG8mb0TL0MceOIdZ/xjOj5X7CIqI2 GFRvSKwb8JKm3w1UA4TnQSw5A20jVI1CnhHqK93n6OgnYOWj+KyFBS/dX+l9oYTI90JD zGaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=VuOutErs/3kz1A1Pl67QiGCXKD6+QoIdF+PyPh/HBMQ=; b=eaKVgObfDSJrPkEn2RMXJbCf4XID8NZ9TFM81rbeV1+8piA1RpupVdYd546pWzk9wR G3cvW01pFtJtyvwteg83blvZ2YDWWQD0QlejPma5SByzmfWiKmIFyDUo52jxMxKqx9D/ ZHCzjFC5WYSY+ZfCNuATSni1TyyuHHrJi+/RoKZVO1HOkF/IZPrDKohYy/roqqB80wlW iIDRsivVdIqL8e0a0uOwF7c670417ONd8SKIuXWgExQEsU/BnviJrdp+kYehUNgnnA3L LDoW42d11d1ANtQAmUefnPGzFb/xZBmViNDroxSDKcYXKFrZj0q/EFlxUB+oO0ON7pUf nrEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="h4/jI115"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v17si14463642iln.134.2021.08.23.05.16.36; Mon, 23 Aug 2021 05:16:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="h4/jI115"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236594AbhHWMP4 (ORCPT + 99 others); Mon, 23 Aug 2021 08:15:56 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:31519 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235092AbhHWMPy (ORCPT ); Mon, 23 Aug 2021 08:15:54 -0400 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-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-217-G_80OA5TMauyF0T70Bs8hA-1; Mon, 23 Aug 2021 08:15:10 -0400 X-MC-Unique: G_80OA5TMauyF0T70Bs8hA-1 Received: by mail-wm1-f71.google.com with SMTP id z15-20020a7bc7cf0000b02902e6a68ffd3cso4396061wmk.2 for ; Mon, 23 Aug 2021 05:15:10 -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=g3AeqNdliVo45qqIdKIhY4oKiSwT0EV74Gr1tp1RywseiMeo/UJcbELblRaVsi9FRY s7vGcS584K+YU+nmiXty51dlDFr9Kl0X6Z0CbVrm/jaQZQ9Fc63OYlCm9d+lysABEWAQ z0uBNJBQwCPv3jxg/iSgPtjiXWPlKB0tRF16lny1K6LyUq9KKAGHmKOhP3ani0dYv+o8 vWNEJT6aruOqun4Spdr36bGWAvIX8iyJSXeBOQ8C037skNTfEwNeIHWNxEQ9RD5EWwOT AXwoOYYDcACgANM91Eg5oDBhh0Zx7qMcrlOcvLL9KFuAGr6E9rlP6K82+Xxw3F/l+92i MF2w== X-Gm-Message-State: AOAM530Lk3yFwCxfApHJKgU227c/2mFLRkSUx2FeojSJBbUX2Xh3Iyk/ RZ3dxuXeSOzvqio9eAjjB9AX8SspeKBe1nu77fC+gDTOGyZeJFQ2azMrPhQ7JZszrIBJpF2Du7v HZUfrEEBhjP1STo25RI851WyBTVMXZeVL7sNC5cWyNv4wvD6vM2CGfhmobTeNktWzPjRRzz6x X-Received: by 2002:a05:600c:198a:: with SMTP id t10mr15935406wmq.181.1629720909068; Mon, 23 Aug 2021 05:15:09 -0700 (PDT) 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> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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