Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp290071pxb; Sat, 21 Aug 2021 02:44:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYBX5npY6X36s88Akua8WFHIQ2L+Cui0qEXoeghoIdyCKpVB4AXfX03b+EOSLdICs3bxFa X-Received: by 2002:a92:c6d1:: with SMTP id v17mr16927279ilm.302.1629539056376; Sat, 21 Aug 2021 02:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629539056; cv=none; d=google.com; s=arc-20160816; b=baP2NPDRud+8c8+NKSHtlTwdFnFjggbr9zBzrwtj1UvmrozR6GBf7wkMa0ynUvHQGC LNiALiNR1MAJMGroDYjYi0tSm7uvqt/P8INXRn7HD+le/OH6XRwyTmLoMwAr45pPdaGA F1PrFKnoC6ORWAp0AzyFDQ9d5lIEDxmev1KVRtfzH3KShBpwHMNzaX8Rnw75pljeCvWj aSPSdAWevMmPYhtm4blyB3PShej1r9Pgqzx+WGeEH6DdPhFVrgmgCBiWNrIzgDOnnTpk HJ29/TxwUBTq043i+taYIe1WPoSGjuCdQSplIiXihjdyNcyfODGwIlfEPAt2YAbBmjGl tCvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=K3gdamXUIP3QCRIytwD7WD0OXxAqwF5Z/oQf5PGWBWY=; b=GPbKwhVJo27oQtHTZGUcZzNmEioNynC+WQU51TWt00aiqpdw0YiRK3525fTaLFNzrK Ys0cZgRq2JllTbI1MDQ7SN6l/TBMzI6hmc66uiLuG+FbjnYiKkuNpBcrGfQ0IthAVTP8 UI9rc3glVdPQjZ8djBzlf8yKbnbxZHH6Ce++n5cxHuKfu0Ze7NENvbFpNN4UikJzGOm+ /9tqYHSI/pzsPtJ72LSWxfJjrh8RrzyxVR0ejbLytPlQx1oeegm/YsMK4rxL0YHxTjmq EpihzfHF0GoMJ25kwYmVBDf1AE9EWrKLbR8XjgphT+4swrRakWiKzGbj+ZZ8RGf4Uxo1 pvkw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si8919963ilq.96.2021.08.21.02.44.04; Sat, 21 Aug 2021 02:44:16 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233966AbhHUJng (ORCPT + 99 others); Sat, 21 Aug 2021 05:43:36 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:14310 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233859AbhHUJnf (ORCPT ); Sat, 21 Aug 2021 05:43:35 -0400 Received: from dggeme703-chm.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4GsD7l5vY0z87pK; Sat, 21 Aug 2021 17:42:43 +0800 (CST) Received: from huawei.com (10.175.124.27) by dggeme703-chm.china.huawei.com (10.1.199.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Sat, 21 Aug 2021 17:42:54 +0800 From: Miaohe Lin To: CC: , , , , , , Subject: [PATCH 2/3] mm/memory_hotplug: fix potential permanent lru cache disable Date: Sat, 21 Aug 2021 17:42:45 +0800 Message-ID: <20210821094246.10149-3-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210821094246.10149-1-linmiaohe@huawei.com> References: <20210821094246.10149-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggeme703-chm.china.huawei.com (10.1.199.99) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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", -- 2.23.0