From: Shakeel Butt <shakeelb@google.com>
To: Michal Hocko <mhocko@suse.com>
Cc: "Minchan Kim" <minchan@kernel.org>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Roman Gushchin" <guro@fb.com>,
"Greg Thelen" <gthelen@google.com>,
"David Rientjes" <rientjes@google.com>,
"Michal Koutný" <mkoutny@suse.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Linux MM" <linux-mm@kvack.org>,
Cgroups <cgroups@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
"Yang Shi" <shy828301@gmail.com>
Subject: Re: [PATCH] memcg: introduce per-memcg reclaim interface
Date: Tue, 22 Sep 2020 11:56:13 -0700 [thread overview]
Message-ID: <CALvZod6kfF_r5u2ydZ34Q+6QWvg11ZFwfRMHdiNUvi3NJnms=A@mail.gmail.com> (raw)
In-Reply-To: <20200922183125.GG12990@dhcp22.suse.cz>
On Tue, Sep 22, 2020 at 11:31 AM Michal Hocko <mhocko@suse.com> wrote:
>
> On Tue 22-09-20 11:10:17, Shakeel Butt wrote:
> > On Tue, Sep 22, 2020 at 9:55 AM Michal Hocko <mhocko@suse.com> wrote:
> [...]
> > > So far I have learned that you are primarily working around an
> > > implementation detail in the zswap which is doing the swapout path
> > > directly in the pageout path.
> >
> > Wait how did you reach this conclusion? I have explicitly said that we
> > are not using uswapd like functionality in production. We are using
> > this interface for proactive reclaim and proactive reclaim is not a
> > workaround for implementation detail in the zswap.
>
> Hmm, I must have missed the distinction between the two you have
> mentioned. Correct me if I am wrong but "latency sensitive" workload is
> the one that cannot use the high limit, right.
Yes.
> For some reason I thought
> that your pro-active reclaim usecase is also not compatible with the
> throttling imposed by the high limit. Hence my conclusion above.
>
For proactive reclaim use-case, it is more about the weirdness of
using memory.high interface for proactive reclaim.
Let's suppose I want to reclaim 20 MiB from a job. To use memory.high,
I have to read memory.current and subtract 20MiB from it and then
write that to memory.high and once that is done, I have to set
memory.high to the previous value (job's original high limit).
There is a time window where the allocation of the target job can hit
the temporary memory.high which will cause uninteresting MEMCG_HIGH
event, PSI pressure and can potentially over reclaim. Also there is a
race between reading memory.current and setting the temporary
memory.high. There are many non-deterministic variables added to the
request of reclaiming 20MiB from a job.
Shakeel
next prev parent reply other threads:[~2020-09-22 18:56 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 21:57 [PATCH] memcg: introduce per-memcg reclaim interface Shakeel Butt
2020-09-10 6:36 ` SeongJae Park
2020-09-10 16:10 ` Shakeel Butt
2020-09-10 16:34 ` SeongJae Park
2020-09-21 16:30 ` Michal Hocko
2020-09-21 17:50 ` Shakeel Butt
2020-09-22 11:49 ` Michal Hocko
2020-09-22 15:54 ` Shakeel Butt
2020-09-22 16:55 ` Michal Hocko
2020-09-22 18:10 ` Shakeel Butt
2020-09-22 18:31 ` Michal Hocko
2020-09-22 18:56 ` Shakeel Butt [this message]
2020-09-22 19:08 ` Michal Hocko
2020-09-22 20:02 ` Yang Shi
2020-09-22 22:38 ` Shakeel Butt
2020-09-28 21:02 ` Johannes Weiner
2020-09-29 15:04 ` Michal Hocko
2020-09-29 21:53 ` Johannes Weiner
2020-09-30 15:45 ` Shakeel Butt
2020-10-01 14:31 ` Johannes Weiner
2020-10-06 16:55 ` Shakeel Butt
2020-10-08 14:53 ` Johannes Weiner
2020-10-08 15:55 ` Shakeel Butt
2020-10-08 21:09 ` Johannes Weiner
2020-09-30 15:26 ` Shakeel Butt
2020-10-01 15:10 ` Johannes Weiner
2020-10-05 21:59 ` Shakeel Butt
2020-10-08 15:14 ` Johannes Weiner
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='CALvZod6kfF_r5u2ydZ34Q+6QWvg11ZFwfRMHdiNUvi3NJnms=A@mail.gmail.com' \
--to=shakeelb@google.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=gthelen@google.com \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=mkoutny@suse.com \
--cc=rientjes@google.com \
--cc=shy828301@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).