Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2421718imj; Mon, 18 Feb 2019 05:49:37 -0800 (PST) X-Google-Smtp-Source: AHgI3IZPAylejJBg1/Q0SajvHYoQ1d3NyoZEh0gj1eby8KuPCyZ5bbObShFGhio3WYxhehyHdOnW X-Received: by 2002:a63:4342:: with SMTP id q63mr19099521pga.63.1550497777838; Mon, 18 Feb 2019 05:49:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550497777; cv=none; d=google.com; s=arc-20160816; b=J6anogqVx+k8m86l4aaVP7Wnfe5AA+lbjJNtObYHkp3cdRXtCr8xJDh61Lf+f4YCT4 ndheUT+H9S0cZNyyMZPSn2hfFTutSOyGAK7RpOmxAw2frQYYG3XYaE7mHx+fJCC3T+Fl VoqhTy1WODchGMqXYaxUsaoc1Uo/4pomSSTL1Cu60NwiSAKMXZzBY4ePGNfJ/bpCbGQW r+SB+sji6m/E3FmCG6m07ovjiuuC+l7B7vlL10uYVC/YEhhLjjSCLBfC+yY9qp6Cm0QU 69LFTbRfGz4UdPJkOom6FGP0KfSWX5zu34iU3ESeR8sJf5KycOaC82xvGMhh0BKROlmC 0ucQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=v+v2Uv0VzEp5xzumGF87PVkQS2C4+b9/1Mt3SKp/4a8=; b=k9sS29WKxLcRTsdjwqIvmWoMyQYTgF8fF18H1pyL7XtdHhs8+b8p7f0e17S6Hr09Gl rN7rD4SZ2zqjbOVLQfJhx1bvwG5UjosYtLASiWJKDGtSdnV9qBPldLRHyug4XAPboeO0 qikO6D1SsrYYp651Jgou+9gnPGdCR8K8XA0JbL1x8ISznEcNl+roRJqzKXurp8vgOnbz +O1J2aTQRF/vLZK1ttL/tjw254ur45yfC4+X4PbwJSVultDD9/1PUPWe8/AKA8WPjL4s N0+2YCbpEPafX6kkol+Q1SdaqFta0bXq4cobddhwYiDY7EaNHaQejB7tjND9Hnuqhf3/ z9Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=P+bl775j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y4si12532648pgv.520.2019.02.18.05.49.22; Mon, 18 Feb 2019 05:49:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=P+bl775j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730932AbfBRNsd (ORCPT + 99 others); Mon, 18 Feb 2019 08:48:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:55342 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731369AbfBRNsb (ORCPT ); Mon, 18 Feb 2019 08:48:31 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0959221901; Mon, 18 Feb 2019 13:48:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550497710; bh=vuvWRDl0I68gISq54wooq2UtzO3HGEvjvSMfTcBVv9U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P+bl775j5h4RHdfcIWL3UbRDBBKGmvhUA4I1rPepvJST2l1WM6G7EGqdJQWJFAWwr +Qbc8ysfrOglJnFYo/pfxQR78XIrAf82tqop/8zfrgQDabIOYRP19yZNocEjQsmKJR VUCET2KDrkY9ApFUqDoQ0HHixf4h8swnLskTB4CQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dave Chinner , Wolfgang Walter , Roman Gushchin , Spock , Rik van Riel , Michal Hocko , Andrew Morton , Linus Torvalds Subject: [PATCH 4.20 70/92] Revert "mm: dont reclaim inodes with many attached pages" Date: Mon, 18 Feb 2019 14:43:13 +0100 Message-Id: <20190218133501.437460479@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218133454.668268457@linuxfoundation.org> References: <20190218133454.668268457@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dave Chinner commit 69056ee6a8a3d576ed31e38b3b14c70d6c74edcc upstream. This reverts commit a76cf1a474d7d ("mm: don't reclaim inodes with many attached pages"). This change causes serious changes to page cache and inode cache behaviour and balance, resulting in major performance regressions when combining worklaods such as large file copies and kernel compiles. https://bugzilla.kernel.org/show_bug.cgi?id=202441 This change is a hack to work around the problems introduced by changing how agressive shrinkers are on small caches in commit 172b06c32b94 ("mm: slowly shrink slabs with a relatively small number of objects"). It creates more problems than it solves, wasn't adequately reviewed or tested, so it needs to be reverted. Link: http://lkml.kernel.org/r/20190130041707.27750-2-david@fromorbit.com Fixes: a76cf1a474d7d ("mm: don't reclaim inodes with many attached pages") Signed-off-by: Dave Chinner Cc: Wolfgang Walter Cc: Roman Gushchin Cc: Spock Cc: Rik van Riel Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- fs/inode.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) --- a/fs/inode.c +++ b/fs/inode.c @@ -730,11 +730,8 @@ static enum lru_status inode_lru_isolate return LRU_REMOVED; } - /* - * Recently referenced inodes and inodes with many attached pages - * get one more pass. - */ - if (inode->i_state & I_REFERENCED || inode->i_data.nrpages > 1) { + /* recently referenced inodes get one more pass */ + if (inode->i_state & I_REFERENCED) { inode->i_state &= ~I_REFERENCED; spin_unlock(&inode->i_lock); return LRU_ROTATE;