Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2479394imj; Mon, 18 Feb 2019 06:44:33 -0800 (PST) X-Google-Smtp-Source: AHgI3IYLyy4LEbscvCP5V0R4IepiZlNEl9XoWSaxGnWMFIAqmPxFxae8uvMBoSOH86lW+AUsrp0W X-Received: by 2002:a17:902:2dc3:: with SMTP id p61mr25233823plb.166.1550501073349; Mon, 18 Feb 2019 06:44:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550501073; cv=none; d=google.com; s=arc-20160816; b=bBUgyGdCqHZhBQ/cCD/st5o7u4pvOPiWOGSJfGhNWI39nJwEMNJaYvBp/KJrPI+RK0 egdPUX024MpMQh6V1ZTcPcxhfT6oePTNC8wU7m3UQ11dBIKemx7r7op+7zzKj724bnUm MGZOMpNDjQUsoT5OiyrjPfSNiEnh6GNf9NljhxmsZ/168E8WNAVXQGH7vf2SABGXWvvF FMbIntGXgOR+AyoaRVkf4BgsYJ5TbGnacnYM6m9fhnNPmaCVPdPwHz29B7qbIYI72WXz 7UYcbVfeVGcqNGKCwVB9qG2QbaHlFpzstc8KmhRhoPDUCqbZkp+f/X8EvTa+KNAr95TF 2ctA== 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=TcqbY+BfpjZ37ABTVALRqIOPaLbMMvrKrYX/6/cT+ls=; b=RnpRptwlYVeN4fawgbGwU2jIyN/FomdCNQYZx0GODzX9fz6t3hilWNEvARoCAGdTdL Rxaa56fBtJZQ859hjzMqrjLVBZNTUuEA0/RZ4n01iCuo/n32jIeRsF9pMg90BrWsSuZs ITReQdwED9qeIwk+piXDfC3fBsrdMsjtiVwebGX/poNTLbWYzZEDpZAPDEnp7yhA3izM V9jD1n7qFn5cEfvQVCC4rUjoiVnfJ1kmhk4OSzPXTSAvadMiJT31nlvILZ1UqtyK5NPA K4a5jSPU5pmDneU5xsQgmgw6giEFO2th3Fd+Oiuf9H68ekkg/mHIYM30zxVxgZmbxI4r sOjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="mLO/WcTm"; 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 z3si13143982pfi.157.2019.02.18.06.44.17; Mon, 18 Feb 2019 06:44:33 -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="mLO/WcTm"; 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 S1731679AbfBRNtI (ORCPT + 99 others); Mon, 18 Feb 2019 08:49:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:56198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731960AbfBRNtG (ORCPT ); Mon, 18 Feb 2019 08:49:06 -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 0A63020449; Mon, 18 Feb 2019 13:49:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550497745; bh=asEn45jtNeeGS//njbzhj5/xTE1LJZDha6CXgMrElTE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mLO/WcTmQB1SUBWR4KvKQtTalutcTBzkXQG4TeYuvc+eNtv/IlKkwkzPhD9KUkajM UN4kparyIa4z7xHw4AQgD9yC8DPKa1FRoaNjpBqVogdsOKS75ABGCRFzvpyAFjGyKt EFyHIKHusMoeArNCdhw48/GT6LI8S7hp87uT6P9o= 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 71/92] Revert "mm: slowly shrink slabs with a relatively small number of objects" Date: Mon, 18 Feb 2019 14:43:14 +0100 Message-Id: <20190218133501.533140116@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 a9a238e83fbb0df31c3b9b67003f8f9d1d1b6c96 upstream. This reverts commit 172b06c32b9497 ("mm: slowly shrink slabs with a relatively small number of objects"). This change changes the agressiveness of shrinker reclaim, causing small cache and low priority reclaim to greatly increase scanning pressure on small caches. As a result, light memory pressure has a disproportionate affect on small caches, and causes large caches to be reclaimed much faster than previously. As a result, it greatly perturbs the delicate balance of the VFS caches (dentry/inode vs file page cache) such that the inode/dentry caches are reclaimed much, much faster than the page cache and this drives us into several other caching imbalance related problems. As such, this is a bad change and needs to be reverted. [ Needs some massaging to retain the later seekless shrinker modifications.] Link: http://lkml.kernel.org/r/20190130041707.27750-3-david@fromorbit.com Fixes: 172b06c32b9497 ("mm: slowly shrink slabs with a relatively small number of objects") 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 --- mm/vmscan.c | 10 ---------- 1 file changed, 10 deletions(-) --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -487,16 +487,6 @@ static unsigned long do_shrink_slab(stru delta = freeable / 2; } - /* - * Make sure we apply some minimal pressure on default priority - * even on small cgroups. Stale objects are not only consuming memory - * by themselves, but can also hold a reference to a dying cgroup, - * preventing it from being reclaimed. A dying cgroup with all - * corresponding structures like per-cpu stats and kmem caches - * can be really big, so it may lead to a significant waste of memory. - */ - delta = max_t(unsigned long long, delta, min(freeable, batch_size)); - total_scan += delta; if (total_scan < 0) { pr_err("shrink_slab: %pF negative objects to delete nr=%ld\n",