LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Kirill Tkhai <ktkhai@virtuozzo.com>
Cc: darrick.wong@oracle.com, linux-xfs@vger.kernel.org,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH RFC] xfs, memcg: Call xfs_fs_nr_cached_objects() only in case of global reclaim
Date: Thu, 15 Mar 2018 20:32:24 +0100 [thread overview]
Message-ID: <20180315193224.GV23100@dhcp22.suse.cz> (raw)
In-Reply-To: <c6a9bf24-50e6-8e60-94af-28e99c51f516@virtuozzo.com>
On Thu 15-03-18 22:28:43, Kirill Tkhai wrote:
> On 15.03.2018 20:49, Michal Hocko wrote:
> > On Thu 15-03-18 18:01:34, Kirill Tkhai wrote:
> >> xfs_reclaim_inodes_count(XFS_M(sb)) does not care about memcg.
> >> So, it's called for memcg reclaim too, e.g. this list is shrinked
> >> disproportionality to another lists.
> >>
> >> This looks confusing, so I'm reporting about this.
> >> Consider this patch as RFC.
> >
> > Could you be more specific about the problem you are trying to solve?
> > Because we do skip shrinkers which are not memcg aware by
> > shrink_slab:
> > /*
> > * If kernel memory accounting is disabled, we ignore
> > * SHRINKER_MEMCG_AWARE flag and call all shrinkers
> > * passing NULL for memcg.
> > */
> > if (memcg_kmem_enabled() &&
> > !!memcg != !!(shrinker->flags & SHRINKER_MEMCG_AWARE))
> > continue;
> >
> > Or am I missing something?
>
> sb->s_op->nr_cached_objects is a sub-method of generic super_cache_count().
> super_cache_count() is owned and only called by superblock's shrinker,
> which does have SHRINKER_MEMCG_AWARE flag.
Ohh, I see. I thought it was a standard "top-level" shrinker.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2018-03-15 19:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-15 15:01 Kirill Tkhai
2018-03-15 15:53 ` Darrick J. Wong
2018-03-15 16:06 ` Kirill Tkhai
2018-03-15 17:49 ` Michal Hocko
2018-03-15 19:28 ` Kirill Tkhai
2018-03-15 19:32 ` Michal Hocko [this message]
2018-03-15 19:42 ` Kirill Tkhai
2018-03-15 23:03 ` Dave Chinner
2018-03-16 8:55 ` Kirill Tkhai
2018-03-16 21:39 ` Dave Chinner
2018-03-19 11:06 ` Kirill Tkhai
2018-03-19 11:25 ` Kirill Tkhai
2018-03-20 0:18 ` Dave Chinner
2018-03-20 13:15 ` Kirill Tkhai
2018-03-20 14:34 ` Dave Chinner
2018-03-21 16:15 ` Kirill Tkhai
2018-03-22 5:01 ` Dave Chinner
2018-03-22 16:52 ` Kirill Tkhai
2018-03-22 23:46 ` Dave Chinner
2018-03-23 12:39 ` Kirill Tkhai
2018-03-26 2:37 ` Dave Chinner
2018-03-26 11:16 ` 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=20180315193224.GV23100@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=darrick.wong@oracle.com \
--cc=ktkhai@virtuozzo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--subject='Re: [PATCH RFC] xfs, memcg: Call xfs_fs_nr_cached_objects() only in case of global reclaim' \
/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
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).