[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180324185018.iibbx3zjtzikjtlc@esperanza>
Date: Sat, 24 Mar 2018 21:50:18 +0300
From: Vladimir Davydov <vdavydov.dev@...il.com>
To: Kirill Tkhai <ktkhai@...tuozzo.com>
Cc: viro@...iv.linux.org.uk, hannes@...xchg.org, mhocko@...nel.org,
akpm@...ux-foundation.org, tglx@...utronix.de,
pombredanne@...b.com, stummala@...eaurora.org,
gregkh@...uxfoundation.org, sfr@...b.auug.org.au, guro@...com,
mka@...omium.org, penguin-kernel@...ove.SAKURA.ne.jp,
chris@...is-wilson.co.uk, longman@...hat.com, minchan@...nel.org,
hillf.zj@...baba-inc.com, ying.huang@...el.com,
mgorman@...hsingularity.net, shakeelb@...gle.com, jbacik@...com,
linux@...ck-us.net, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, willy@...radead.org
Subject: Re: [PATCH 04/10] fs: Propagate shrinker::id to list_lru
On Wed, Mar 21, 2018 at 04:21:51PM +0300, Kirill Tkhai wrote:
> The patch adds list_lru::shrk_id field, and populates
> it by registered shrinker id.
>
> This will be used to set correct bit in memcg shrinkers
> map by lru code in next patches, after there appeared
> the first related to memcg element in list_lru.
>
> Signed-off-by: Kirill Tkhai <ktkhai@...tuozzo.com>
> ---
> fs/super.c | 5 +++++
> include/linux/list_lru.h | 1 +
> mm/list_lru.c | 7 ++++++-
> mm/workingset.c | 3 +++
> 4 files changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/fs/super.c b/fs/super.c
> index 0660083427fa..1f3dc4eab409 100644
> --- a/fs/super.c
> +++ b/fs/super.c
> @@ -521,6 +521,11 @@ struct super_block *sget_userns(struct file_system_type *type,
> if (err) {
> deactivate_locked_super(s);
> s = ERR_PTR(err);
> + } else {
> +#if defined(CONFIG_MEMCG) && !defined(CONFIG_SLOB)
> + s->s_dentry_lru.shrk_id = s->s_shrink.id;
> + s->s_inode_lru.shrk_id = s->s_shrink.id;
> +#endif
I don't really like the new member name. Let's call it shrink_id or
shrinker_id, shall we?
Also, I think we'd better pass shrink_id to list_lru_init rather than
setting it explicitly.
Powered by blists - more mailing lists