From: Rik van Riel <riel@redhat.com>
To: Josef Bacik <josef@toxicpanda.com>,
linux-mm@kvack.org, hannes@cmpxchg.org, kernel-team@fb.com
Subject: Re: [PATCH][RFC] mm: make kswapd try harder to keep active pages in cache
Date: Wed, 03 May 2017 14:24:48 -0400 [thread overview]
Message-ID: <1493835888.20270.4.camel@redhat.com> (raw)
In-Reply-To: <1493760444-18250-1-git-send-email-jbacik@fb.com>
[-- Attachment #1.1: Type: text/plain, Size: 1352 bytes --]
On Tue, 2017-05-02 at 17:27 -0400, Josef Bacik wrote:
> + /*
> + * If we don't have a lot of inactive or slab pages then
> there's no
> + * point in trying to free them exclusively, do the normal
> scan stuff.
> + */
> + if (nr_inactive < total_high_wmark && nr_slab <
> total_high_wmark)
> + sc->inactive_only = 0;
This part looks good. Below this point, there is obviously no
point in skipping the active list.
> + if (!global_reclaim(sc))
> + sc->inactive_only = 0;
Why the different behaviour with and without cgroups?
Have you tested both of these?
> + /*
> + * We still want to slightly prefer slab over inactive, so
> if inactive
> + * is large enough just skip slab shrinking for now. If we
> aren't able
> + * to reclaim enough exclusively from the inactive lists
> then we'll
> + * reset this on the first loop and dip into slab.
> + */
> + if (nr_inactive > total_high_wmark && nr_inactive > nr_slab)
> + skip_slab = true;
I worry that this may be a little too aggressive,
and result in the slab cache growing much larger
than it should be on some systems.
I wonder if it may make more sense to have the
aggressiveness of slab scanning depend on the
ratio of inactive to reclaimable slab pages, rather
than having a hard cut-off like this?
--
All rights reversed
[-- Attachment #1.2: Type: text/html, Size: 1942 bytes --]
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2017-05-03 18:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-02 21:27 [PATCH][RFC] mm: make kswapd try harder to keep active pages in cache Josef Bacik
2017-05-03 18:24 ` Rik van Riel [this message]
2017-05-03 18:38 ` Josef Bacik
2017-05-03 19:20 ` Rik van Riel
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=1493835888.20270.4.camel@redhat.com \
--to=riel@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).