linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nhat Pham <nphamcs@gmail.com>
To: Barry Song <21cnbao@gmail.com>
Cc: usamaarif642@gmail.com, ying.huang@intel.com, linux-mm@kvack.org,
	 akpm@linux-foundation.org, axboe@kernel.dk,
	bala.seshasayee@linux.intel.com,  chrisl@kernel.org,
	david@redhat.com, hannes@cmpxchg.org,
	 kanchana.p.sridhar@intel.com, kasong@tencent.com,
	linux-block@vger.kernel.org,  minchan@kernel.org,
	senozhatsky@chromium.org, surenb@google.com,  terrelln@fb.com,
	v-songbaohua@oppo.com, wajdi.k.feghali@intel.com,
	 willy@infradead.org, yosryahmed@google.com, yuzhao@google.com,
	 zhengtangquan@oppo.com, zhouchengming@bytedance.com,
	ryan.roberts@arm.com
Subject: Re: [PATCH RFC v2 0/2] mTHP-friendly compression in zsmalloc and zram based on multi-pages
Date: Mon, 18 Nov 2024 12:00:48 -0800	[thread overview]
Message-ID: <CAKEwX=N6eTd7_V56fgNLBvs52-R0t0YaxXT3jWT7dbhnywkTcg@mail.gmail.com> (raw)
In-Reply-To: <CAGsJ_4zojYeEqgTcH-sKek9LW0pYOUoXcrzOzjoMuzMMODujbA@mail.gmail.com>

On Mon, Nov 18, 2024 at 2:27 AM Barry Song <21cnbao@gmail.com> wrote:
>

Thanks for the data, Barry and Tangquan!

> On Tue, Nov 12, 2024 at 10:37 AM Barry Song <21cnbao@gmail.com> wrote:
>
> Thus, "swap-in(ms) 68660," where mTHP allocation always fails, is significantly
> slower than "swap-in(ms) 21763," where mTHP allocation succeeds.

As well as the first scenario (the status quo) :( I guess it depends
on how often we are seeing this degenerate case (i.e how often do we
see (m)THP allocation failure?)

>
> If there are no objections, I could send a v3 patch to fall back to 4
> small folios
> instead of one. However, this would significantly increase the complexity of
> do_swap_page(). My gut feeling is that the added complexity might not be
> well-received :-)

Yeah I'm curious too. I'll wait for your numbers - the dynamics are
completely unpredictable to me. OTOH, we'll be less wasteful in terms
of CPU work (no longer have to decompress the same chunk multiple
times). OTOH, we're creating more memory pressure (having to load the
whole chunk in), without the THP benefits.

I think this is an OK workaround for now. Increasing (m)THP allocation
success rate would be the true fix, but that is a hard problem :)

>
> Thanks
> Barry



  reply	other threads:[~2024-11-18 20:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-07 10:10 Barry Song
2024-11-07 10:10 ` [PATCH RFC v2 1/2] mm: zsmalloc: support objects compressed based on multiple pages Barry Song
2024-11-07 10:10 ` [PATCH RFC v2 2/2] zram: support compression at the granularity of multi-pages Barry Song
2024-11-08  5:19 ` [PATCH RFC v2 0/2] mTHP-friendly compression in zsmalloc and zram based on multi-pages Huang, Ying
2024-11-08  6:51   ` Barry Song
2024-11-11 16:43     ` Usama Arif
2024-11-11 20:31       ` Barry Song
2024-11-18  9:56         ` Sergey Senozhatsky
2024-11-18 20:27           ` Barry Song
2024-11-19  2:45             ` Sergey Senozhatsky
2024-11-19  2:51               ` Barry Song
2024-11-12  1:07     ` Huang, Ying
2024-11-12  1:25       ` Barry Song
2024-11-12  1:25         ` Huang, Ying
2024-11-11 19:30 ` Nhat Pham
2024-11-11 21:37   ` Barry Song
2024-11-18 10:27     ` Barry Song
2024-11-18 20:00       ` Nhat Pham [this message]
2024-11-18 20:28       ` Usama Arif
2024-11-18 20:51         ` Barry Song
2024-11-18 21:48           ` Barry Song

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='CAKEwX=N6eTd7_V56fgNLBvs52-R0t0YaxXT3jWT7dbhnywkTcg@mail.gmail.com' \
    --to=nphamcs@gmail.com \
    --cc=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=bala.seshasayee@linux.intel.com \
    --cc=chrisl@kernel.org \
    --cc=david@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=kanchana.p.sridhar@intel.com \
    --cc=kasong@tencent.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=ryan.roberts@arm.com \
    --cc=senozhatsky@chromium.org \
    --cc=surenb@google.com \
    --cc=terrelln@fb.com \
    --cc=usamaarif642@gmail.com \
    --cc=v-songbaohua@oppo.com \
    --cc=wajdi.k.feghali@intel.com \
    --cc=willy@infradead.org \
    --cc=ying.huang@intel.com \
    --cc=yosryahmed@google.com \
    --cc=yuzhao@google.com \
    --cc=zhengtangquan@oppo.com \
    --cc=zhouchengming@bytedance.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