Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1766694pxb; Mon, 23 Aug 2021 04:14:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFAUVNlijnzcYq8EBz6hstHg+Q5zEXoZls2VS6xI50GgYEal8z0/tKioGRS7LI4g1+J04m X-Received: by 2002:a05:6e02:1bab:: with SMTP id n11mr21357249ili.85.1629717269639; Mon, 23 Aug 2021 04:14:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629717269; cv=none; d=google.com; s=arc-20160816; b=X9bTZSoU2CVb3K33ml1pg0P3maAVE4V0oz6WehDVFj5GUcNaOHfaEZrECWwEfvGh/t BeuTWsNHX9UWYG/26kWR3ujqmoSupfEUzw8rCkafYwiAky+oYXVtNZ/9oO65IXz1rqpu 2fWV/V22J3Y6UcEnqRiCjVscUAc8RqHnY6LskjRo1PfPdBMu7uv8PDROVDaHc+/fg18z FXilD5h6uv930SrzfFSHs3JY5Z93Nn3L/kHVrhuyzyWysjgnx6D2jmwcrGimC88+sZcS WzkUkN6FocnpPzCqMQu7jZ9gSO3HLg5hWgUdUoqhUv4IY4wxxCZsNBxIPHvVQTemyQMT Y6zw== 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:from:references :cc:to:subject; bh=GseYtOH/gKdcaC5+e1xAGSSj9yx/8n+uoBfM55TGK1k=; b=idNTOjPo9+9D41bbuUFo9gLyn6HvcbGZBbYTZ5BEaSFmJSiF42CevvTWm0nIL11Eyl 0wt1Vqly547m5ACwo/pTMjJeoT4KDDIIYU0+yLlVp0z7mZtSQf4In8TcHcznxAHzEHZY 1hDmmi3VfWKQKnYwpmB9tJpuz5UDQwNSdLzKxXG/O0djdbLSRetjlKOnuU/oB9wgVait p7f9GpYSZBE+vl5KDtMgTZHy21jQcW8xZPi/xLMTk0/xY7Dl4H0+Di4etv6H1LTOjmc1 DBJGVfHWctr6he6ynDGTx7UQMLtYoaQ2Zayk+7v1KolLWo9JmWvjAsaN5cZSS+g8e2FW Byng== 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 a5si14921727ilb.36.2021.08.23.04.14.17; Mon, 23 Aug 2021 04:14:29 -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 S236355AbhHWLOM (ORCPT + 99 others); Mon, 23 Aug 2021 07:14:12 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:14410 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234865AbhHWLN5 (ORCPT ); Mon, 23 Aug 2021 07:13:57 -0400 Received: from dggeme703-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4GtTyr6zxyzbdQ6; Mon, 23 Aug 2021 19:09:24 +0800 (CST) Received: from [10.174.177.35] (10.174.177.35) 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.2308.8; Mon, 23 Aug 2021 19:13:13 +0800 Subject: Re: [PATCH 2/3] mm/memory_hotplug: fix potential permanent lru cache disable To: Oscar Salvador CC: , , , , , , References: <20210821094246.10149-1-linmiaohe@huawei.com> <20210821094246.10149-3-linmiaohe@huawei.com> From: Miaohe Lin Message-ID: <3a124653-31de-5eb6-3812-73c4ea20bbbf@huawei.com> Date: Mon, 23 Aug 2021 19:13:12 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.35] 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 On 2021/8/23 17:15, Oscar Salvador wrote: > On 2021-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 > > Reviewed-by: Oscar Salvador > Many thanks for your review and reply. :) > Should this go to stable? > In case we fail to enable it again, we will bypass the pvec cache anytime we add a new page to the LRU which might lead to severe performance regression? > Agree with you. I think this should go to stable too. >> --- >>  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", >