From: 贺中坤 <hezhongkun.hzk@bytedance.com>
To: Michal Hocko <mhocko@suse.com>
Cc: minchan@kernel.org, senozhatsky@chromium.org, david@redhat.com,
yosryahmed@google.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [External] Re: [RFC PATCH 0/2] zram: objects charge to mem_cgroup
Date: Fri, 7 Jul 2023 22:25:48 +0800 [thread overview]
Message-ID: <CACSyD1M9rSadO7xb8-H0dU2-xtrZnJMBgqEMTSHhE6M5vFgC-Q@mail.gmail.com> (raw)
In-Reply-To: <ZKfFVfZovt4PnMsy@dhcp22.suse.cz>
> Please state the objective you are trying to achieve by this patchset.
> It is always good to summarize the previous discussion and mention what
> is done differently or how previous review feedback has been addressed
> but the overall idea/purpose should be always explicit.
>
> Please elaborate more about both.
>
Thanks for your reply.
objective:
the compressed memory of zram charge to the cgroup of the user.
summarize the previous discussion:
[1] As I can see, Michal's concern is that the charges are going to fail
and swapout would fail.
The indirect use of zram is in the context of PF_MEMALLOC, so
the charge must be successful.
[2] David's concern is that if there is a page in the BIO that is not charged,
we can not charge the compressed page for the fs->zram and whether
the recompress case is charged.
In the new solution, the recompress case can be charged. But if there is
a BIO not charged, I'm not so sure, to be honest.it would be great if
someone with more FS->BIO experience could comment.
I have to review the relevant code to check it.
[3] Yosry's concern is that the previous patchsets are very complicated,
and do not have wirteback support in zram.
For the new patchset, charging becomes very simple, and zram supports
writing back to disk.At the same time, I am hoping the use of zswap
without a backing swapfile can be enabled.
To summarize the new patchset:
We charge compressed memory directly in the zram module instead of in
the zsmalloc module because zsmallc may be used by zswap, zswap objects
has been charged once in the zswap module, so zsmallc will double charge.
next prev parent reply other threads:[~2023-07-07 14:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-07 4:46 [RFC PATCH 0/2] zram: objects charge to mem_cgroup Zhongkun He
2023-07-07 7:57 ` Michal Hocko
2023-07-07 14:25 ` 贺中坤 [this message]
2023-07-07 14:44 ` [External] " Michal Hocko
2023-07-10 9:35 ` 贺中坤
2023-07-10 10:41 ` Michal Hocko
2023-07-10 13:16 ` 贺中坤
2023-07-10 13:34 ` Michal Hocko
2023-07-10 15:02 ` 贺中坤
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=CACSyD1M9rSadO7xb8-H0dU2-xtrZnJMBgqEMTSHhE6M5vFgC-Q@mail.gmail.com \
--to=hezhongkun.hzk@bytedance.com \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=senozhatsky@chromium.org \
--cc=yosryahmed@google.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).