All of lore.kernel.org
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: stable@vger.kernel.org, riel@surriel.com, mhocko@kernel.org,
	linux@stwm.de, guro@fb.com, dairinin@gmail.com,
	dchinner@redhat.com, akpm@linux-foundation.org,
	mm-commits@vger.kernel.org, torvalds@linux-foundation.org
Subject: [patch 2/6] Revert "mm: slowly shrink slabs with a relatively small number of objects"
Date: Tue, 12 Feb 2019 15:35:55 -0800	[thread overview]
Message-ID: <20190212233555.SLq81%akpm@linux-foundation.org> (raw)

From: Dave Chinner <dchinner@redhat.com>
Subject: Revert "mm: slowly shrink slabs with a relatively small number of objects"

This reverts 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 <dchinner@redhat.com>
Cc: Wolfgang Walter <linux@stwm.de>
Cc: Roman Gushchin <guro@fb.com>
Cc: Spock <dairinin@gmail.com>
Cc: Rik van Riel <riel@surriel.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/vmscan.c |   10 ----------
 1 file changed, 10 deletions(-)

--- a/mm/vmscan.c~revert-mm-slowly-shrink-slabs-with-a-relatively-small-number-of-objects
+++ a/mm/vmscan.c
@@ -491,16 +491,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",
_

                 reply	other threads:[~2019-02-12 23:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190212233555.SLq81%akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dairinin@gmail.com \
    --cc=dchinner@redhat.com \
    --cc=guro@fb.com \
    --cc=linux@stwm.de \
    --cc=mhocko@kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=riel@surriel.com \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.