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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 283F3C4338F for ; Mon, 23 Aug 2021 09:15:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C6B8E61357 for ; Mon, 23 Aug 2021 09:15:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C6B8E61357 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 64F218D0001; Mon, 23 Aug 2021 05:15:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5FC746B0074; Mon, 23 Aug 2021 05:15:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4EB9E8D0001; Mon, 23 Aug 2021 05:15:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0024.hostedemail.com [216.40.44.24]) by kanga.kvack.org (Postfix) with ESMTP id 362106B0073 for ; Mon, 23 Aug 2021 05:15:42 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C9A5B1801751B for ; Mon, 23 Aug 2021 09:15:41 +0000 (UTC) X-FDA: 78505787682.13.422D9CE Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf01.hostedemail.com (Postfix) with ESMTP id 6E0D1501BF1D for ; Mon, 23 Aug 2021 09:15:41 +0000 (UTC) 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 X-Rspamd-Queue-Id: 6E0D1501BF1D Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=VVxUy4js; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=uLV08PrJ; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf01.hostedemail.com: domain of osalvador@suse.de designates 195.135.220.28 as permitted sender) smtp.mailfrom=osalvador@suse.de X-Rspamd-Server: rspam01 X-Stat-Signature: o1haxn6773sa4ho77ahzka7xzrk9j84h X-HE-Tag: 1629710141-616068 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-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