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=-17.3 required=3.0 tests=BAYES_00, 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 BC60FC4338F for ; Mon, 23 Aug 2021 11:13:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1324A6136F for ; Mon, 23 Aug 2021 11:13:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1324A6136F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 6B3F76B006C; Mon, 23 Aug 2021 07:13:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 664318D0001; Mon, 23 Aug 2021 07:13:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 52C436B0073; Mon, 23 Aug 2021 07:13:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0074.hostedemail.com [216.40.44.74]) by kanga.kvack.org (Postfix) with ESMTP id 32CE66B006C for ; Mon, 23 Aug 2021 07:13:18 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id CC3B9181AF5CA for ; Mon, 23 Aug 2021 11:13:17 +0000 (UTC) X-FDA: 78506084034.17.A774482 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf28.hostedemail.com (Postfix) with ESMTP id 1E18290000AE for ; Mon, 23 Aug 2021 11:13:17 +0000 (UTC) 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 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 Authentication-Results: imf28.hostedemail.com; dkim=none; spf=pass (imf28.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=none) header.from=huawei.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 1E18290000AE X-Stat-Signature: kj5j7eznz4hatfjyzmfnrkoo58okgf1r X-HE-Tag: 1629717197-365133 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 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 tem= porarily") >> Signed-off-by: Miaohe Lin >=20 > Reviewed-by: Oscar Salvador >=20 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 anyti= me we add a new page to the LRU which might lead to severe performance re= gression? >=20 Agree with you. I think this should go to stable too. >> --- >> =C2=A0mm/memory_hotplug.c | 1 + >> =C2=A01 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, >> =C2=A0=C2=A0=C2=A0=C2=A0 undo_isolate_page_range(start_pfn, end_pfn, M= IGRATE_MOVABLE); >> =C2=A0=C2=A0=C2=A0=C2=A0 memory_notify(MEM_CANCEL_OFFLINE, &arg); >> =C2=A0failed_removal_pcplists_disabled: >> +=C2=A0=C2=A0=C2=A0 lru_cache_enable(); >> =C2=A0=C2=A0=C2=A0=C2=A0 zone_pcp_enable(zone); >> =C2=A0failed_removal: >> =C2=A0=C2=A0=C2=A0=C2=A0 pr_debug("memory offlining [mem %#010llx-%#01= 0llx] failed due to %s\n", >=20