From: Michal Hocko <mhocko@kernel.org>
To: "Li,Rongqing" <lirongqing@baidu.com>
Cc: "hannes@cmpxchg.org" <hannes@cmpxchg.org>,
"vdavydov.dev@gmail.com" <vdavydov.dev@gmail.com>,
"cgroups@vger.kernel.org" <cgroups@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: avoid the unnecessary waiting when force empty a cgroup
Date: Tue, 3 Apr 2018 10:40:24 +0200 [thread overview]
Message-ID: <20180403084024.GH5501@dhcp22.suse.cz> (raw)
In-Reply-To: <2AD939572F25A448A3AE3CAEA61328C23756E4F1@BC-MAIL-M28.internal.baidu.com>
On Tue 03-04-18 08:29:39, Li,Rongqing wrote:
>
>
> > -----e?(R)a>>?a??a>>?-----
> > a??a>>?aoo: Michal Hocko [mailto:mhocko@kernel.org]
> > a??e??ae??e?': 2018a1'4ae??3ae?JPY 16:05
> > ae??a>>?aoo: Li,Rongqing <lirongqing@baidu.com>
> > ae??e??: hannes@cmpxchg.org; vdavydov.dev@gmail.com;
> > cgroups@vger.kernel.org; linux-mm@kvack.org;
> > linux-kernel@vger.kernel.org
> > a,>>ec?: Re: [PATCH] mm: avoid the unnecessary waiting when force empty a
> > cgroup
> >
> > On Tue 03-04-18 15:12:09, Li RongQing wrote:
> > > The number of writeback and dirty page can be read out from memcg, the
> > > unnecessary waiting can be avoided by these counts
> >
> > This changelog doesn't explain the problem and how the patch fixes it.
>
> If a process in a memory cgroup takes some RSS, when force empty this
> memory cgroup, congestion_wait will be called unconditionally, there
> is 0.5 seconds delay
OK, so the problem is that force_empty hits congestion_wait too much?
Why do we have no progress from try_to_free_mem_cgroup_pages?
> If use this patch, nearly no delay.
>
>
> > Why do wee another throttling when we do already throttle in the reclaim
> > path?
>
> Do you mean we should remove congestion_wait(BLK_RW_ASYNC, HZ/10)
> from mem_cgroup_force_empty, since try_to_free_mem_cgroup_pages
> [shrink_inactive_list] has called congestion_wait
If it turns unnecessary, which is quite possible then yes. As I've said
we already throttle when seeing pages under writeback. If that is not
sufficient then we should investigate why.
Please also note that force_empty is considered deprecated. Do you have
any usecase which led you to fixing it?
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2018-04-03 8:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 8:29 [PATCH] mm: avoid the unnecessary waiting when force empty a cgroup Li,Rongqing
2018-04-03 8:40 ` Michal Hocko [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-04-03 7:12 Li RongQing
2018-04-03 8:05 ` Michal Hocko
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=20180403084024.GH5501@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lirongqing@baidu.com \
--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;
as well as URLs for NNTP newsgroup(s).