Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1696187pxb; Mon, 23 Aug 2021 02:19:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNksLZwhwOm85iu2w7fieI56dOMugxzHI1gLr74tGDSMgW5UqoHEooCUYEqTW6FjGFLMF6 X-Received: by 2002:a05:6402:184a:: with SMTP id v10mr35621533edy.324.1629710368027; Mon, 23 Aug 2021 02:19:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629710368; cv=none; d=google.com; s=arc-20160816; b=Z4A7PMGJiHpJ/yH37tFTHiY11tKWCC8ZBYbKT69Swv/4ib5ZCnBSGgCWk3v0ONqCC4 eT3YearLkH333GvL23W1VdSTZQqByIGD7Nd3CDnswr+duql6zna+co7elzq6sgwtz48a Lyhirso9iPeN96+5IKUzLTmFynvcB5XqrgKnfdbp0bwK7+qh2naIg0ENMsWA1zRUejNM CYdZr5yXit5Zy4ihfHlwlFZhXOu3j6ZaRVomU3DXvd3u+dxo8dkvWFGTgRdhukBxU5Em px+7qVEGD+u32c6nMfPkAKMkaS2fGGexYNE/DOXfqYJ5WN034oniD7I2lVav/LVjOzUc gxnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature:dkim-signature; bh=nwz7ZVM9+zz4C9vi+jtjj4eUPvRpsQp2HFYv2dz4ENQ=; b=SU/+5POeF1DMZDYJN0inlZwc2EsxSy9Kl+5DfE4MH2NxonReAjnasa381y78Xfufqd 7lJKE6u+duMDXHR2KDw/ar7+ma6S8pw/EN5/8UJP7uwpXTTr7TjP+rbrYQudsmEGCzIZ uczneB30q3DNqxahHsKY9121JP4TaAWyeWr6BwpHe6zy73HoGLNcdv5HdX84wtZjkHxV WnsrI+3nhTMBkn8vs/IuUAx0lDyktT+f/FjBv/QvLJ9ADKRh8n/UB9x/xhyiiJ4A9Qe9 jCZPAUpkH8y8qd1u5O4gR5veEv18iAowpbBCbdUHwxQ672+C04mn4BSeUJMGLuGSB/AK DHzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=VVxUy4js; dkim=neutral (no key) header.i=@suse.de; 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=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d1si14779960ejz.402.2021.08.23.02.19.05; Mon, 23 Aug 2021 02:19:28 -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=@suse.de header.s=susede2_rsa header.b=VVxUy4js; dkim=neutral (no key) header.i=@suse.de; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235703AbhHWJQ1 (ORCPT + 99 others); Mon, 23 Aug 2021 05:16:27 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:35748 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229967AbhHWJQX (ORCPT ); Mon, 23 Aug 2021 05:16:23 -0400 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 695F021E30; Mon, 23 Aug 2021 09:15:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1629710140; h=from:from:reply-to: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=nwz7ZVM9+zz4C9vi+jtjj4eUPvRpsQp2HFYv2dz4ENQ=; b=VVxUy4js0bImYmnlsLav7yFPRCnIvpxQONjK4yPuwJ+qieZQbfxMqds4ZPcR68tF97SFTs b5/SMfezCg1CfGU/cGe6TIqoT1XCyVEPKADgASeWLLsrVSChMR46JFotQCgE/hSeD7JaCA dy1SIf/AKjbfflvpXm9sVXUwytUh3ww= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1629710140; h=from:from:reply-to: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=nwz7ZVM9+zz4C9vi+jtjj4eUPvRpsQp2HFYv2dz4ENQ=; b=uLV08PrJO4WMgJ1g2mMe4OjtqnqvExfSv7S3pFhYnEE4yDSQUtZogv7+H9/kayWMjyEhVM xJBbqRHcxzRlOkDg== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 5DD2C13A92; Mon, 23 Aug 2021 09:15:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id uV+pFjxnI2F1bQAAGKfGzw (envelope-from ); Mon, 23 Aug 2021 09:15:40 +0000 MIME-Version: 1.0 Date: Mon, 23 Aug 2021 11:15:40 +0200 From: Oscar Salvador To: Miaohe Lin Cc: akpm@linux-foundation.org, naoya.horiguchi@nec.com, mhocko@suse.com, minchan@kernel.org, cgoldswo@codeaurora.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] mm/memory_hotplug: fix potential permanent lru cache disable In-Reply-To: <20210821094246.10149-3-linmiaohe@huawei.com> References: <20210821094246.10149-1-linmiaohe@huawei.com> <20210821094246.10149-3-linmiaohe@huawei.com> User-Agent: Roundcube Webmail Message-ID: X-Sender: osalvador@suse.de Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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? > --- > 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", -- Oscar Salvador SUSE L3