From: Michal Hocko <mhocko@kernel.org>
To: Vladimir Davydov <vdavydov@virtuozzo.com>
Cc: Zhou Chengming <zhouchengming1@huawei.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
akpm@linux-foundation.org, riel@redhat.com, guohanjun@huawei.com
Subject: Re: [PATCH] update sc->nr_reclaimed after each shrink_slab
Date: Fri, 22 Jul 2016 10:18:28 +0200 [thread overview]
Message-ID: <20160722081828.GE794@dhcp22.suse.cz> (raw)
In-Reply-To: <20160722081259.GE26049@esperanza>
On Fri 22-07-16 11:12:59, Vladimir Davydov wrote:
> On Fri, Jul 22, 2016 at 09:49:13AM +0200, Michal Hocko wrote:
> > On Fri 22-07-16 11:43:30, Zhou Chengming wrote:
> > > In !global_reclaim(sc) case, we should update sc->nr_reclaimed after each
> > > shrink_slab in the loop. Because we need the correct sc->nr_reclaimed
> > > value to see if we can break out.
> >
> > Does this actually change anything? Maybe I am missing something but
> > try_to_free_mem_cgroup_pages which is the main entry for the memcg
> > reclaim doesn't set reclaim_state. I don't remember why... Vladimir?
>
> We don't set reclaim_state on memcg reclaim, because there might be a
> lot of unrelated slab objects freed from the interrupt context (e.g.
> RCU freed) while we're doing memcg reclaim. Obviously, we don't want
> them to contribute to nr_reclaimed.
>
> Link to the thread with the problem discussion:
>
> http://marc.info/?l=linux-kernel&m=142132698209680&w=2
Ohh, now I rememeber again. Thanks for the refresh ;)
So the patch doesn't make any difference in the end.
--
Michal Hocko
SUSE Labs
--
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>
prev parent reply other threads:[~2016-07-22 8:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-22 3:43 Zhou Chengming
2016-07-22 7:49 ` Michal Hocko
2016-07-22 8:12 ` Vladimir Davydov
2016-07-22 8:18 ` Michal Hocko [this message]
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=20160722081828.GE794@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=guohanjun@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=riel@redhat.com \
--cc=vdavydov@virtuozzo.com \
--cc=zhouchengming1@huawei.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