From: Andrew Morton <akpm@linux-foundation.org>
To: Kirill Tkhai <ktkhai@virtuozzo.com>
Cc: vdavydov.dev@gmail.com, apolyakov@beget.ru,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
aryabinin@virtuozzo.com
Subject: Re: [PATCH] mm: Make count list_lru_one::nr_items lockless
Date: Wed, 27 Sep 2017 14:15:30 -0700 [thread overview]
Message-ID: <20170927141530.25286286fb92a2573c4b548f@linux-foundation.org> (raw)
In-Reply-To: <150583358557.26700.8490036563698102569.stgit@localhost.localdomain>
On Tue, 19 Sep 2017 18:06:33 +0300 Kirill Tkhai <ktkhai@virtuozzo.com> wrote:
> During the reclaiming slab of a memcg, shrink_slab iterates
> over all registered shrinkers in the system, and tries to count
> and consume objects related to the cgroup. In case of memory
> pressure, this behaves bad: I observe high system time and
> time spent in list_lru_count_one() for many processes on RHEL7
> kernel (collected via $perf record --call-graph fp -j k -a):
>
> 0,50% nixstatsagent [kernel.vmlinux] [k] _raw_spin_lock [k] _raw_spin_lock
> 0,26% nixstatsagent [kernel.vmlinux] [k] shrink_slab [k] shrink_slab
> 0,23% nixstatsagent [kernel.vmlinux] [k] super_cache_count [k] super_cache_count
> 0,15% nixstatsagent [kernel.vmlinux] [k] __list_lru_count_one.isra.2 [k] _raw_spin_lock
> 0,15% nixstatsagent [kernel.vmlinux] [k] list_lru_count_one [k] __list_lru_count_one.isra.2
>
> 0,94% mysqld [kernel.vmlinux] [k] _raw_spin_lock [k] _raw_spin_lock
> 0,57% mysqld [kernel.vmlinux] [k] shrink_slab [k] shrink_slab
> 0,51% mysqld [kernel.vmlinux] [k] super_cache_count [k] super_cache_count
> 0,32% mysqld [kernel.vmlinux] [k] __list_lru_count_one.isra.2 [k] _raw_spin_lock
> 0,32% mysqld [kernel.vmlinux] [k] list_lru_count_one [k] __list_lru_count_one.isra.2
>
> 0,73% sshd [kernel.vmlinux] [k] _raw_spin_lock [k] _raw_spin_lock
> 0,35% sshd [kernel.vmlinux] [k] shrink_slab [k] shrink_slab
> 0,32% sshd [kernel.vmlinux] [k] super_cache_count [k] super_cache_count
> 0,21% sshd [kernel.vmlinux] [k] __list_lru_count_one.isra.2 [k] _raw_spin_lock
> 0,21% sshd [kernel.vmlinux] [k] list_lru_count_one [k] __list_lru_count_one.isra.2
>
> This patch aims to make super_cache_count() (and other functions,
> which count LRU nr_items) more effective.
> It allows list_lru_node::memcg_lrus to be RCU-accessed, and makes
> __list_lru_count_one() count nr_items lockless to minimize
> overhead introduced by locking operation, and to make parallel
> reclaims more scalable.
And... what were the effects of the patch? Did you not run the same
performance tests after applying it?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-09-27 21:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 15:06 Kirill Tkhai
2017-09-27 21:15 ` Andrew Morton [this message]
2017-09-28 7:48 ` Kirill Tkhai
2017-09-28 21:02 ` Andrew Morton
2017-09-29 8:15 ` Kirill Tkhai
2017-11-30 0:27 ` Shakeel Butt
2017-11-30 10:36 ` Kirill Tkhai
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=20170927141530.25286286fb92a2573c4b548f@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=apolyakov@beget.ru \
--cc=aryabinin@virtuozzo.com \
--cc=ktkhai@virtuozzo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=vdavydov.dev@gmail.com \
/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