From: Tim Chen <tim.c.chen@linux.intel.com>
To: Chris Li <chrisl@kernel.org>
Cc: "Huang, Ying" <ying.huang@intel.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
"Wei Xu" <weixugc@google.com>, "Yu Zhao" <yuzhao@google.com>,
"Greg Thelen" <gthelen@google.com>,
"Chun-Tse Shao" <ctshao@google.com>,
"Suren Baghdasaryan" <surenb@google.com>,
"Yosry Ahmed" <yosryahmed@google.com>,
"Brain Geffon" <bgeffon@google.com>,
"Minchan Kim" <minchan@kernel.org>,
"Michal Hocko" <mhocko@suse.com>,
"Mel Gorman" <mgorman@techsingularity.net>,
"Nhat Pham" <nphamcs@gmail.com>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Kairui Song" <kasong@tencent.com>,
"Zhongkun He" <hezhongkun.hzk@bytedance.com>,
"Kemeng Shi" <shikemeng@huaweicloud.com>,
"Barry Song" <v-songbaohua@oppo.com>
Subject: Re: [PATCH v2] mm: swap: async free swap slot cache entries
Date: Fri, 09 Feb 2024 09:52:44 -0800 [thread overview]
Message-ID: <4f1d0c0369e3b08cb0c8d2271396277df6e1d37e.camel@linux.intel.com> (raw)
In-Reply-To: <CAF8kJuNC1D0sy90GoSt6yiA7T0Htsu_-gXsbTkmK5GAdO4udgA@mail.gmail.com>
On Tue, 2024-02-06 at 17:51 -0800, Chris Li wrote:
> On Tue, Feb 6, 2024 at 5:08 PM Tim Chen <tim.c.chen@linux.intel.com> wrote:
> >
> > On Mon, 2024-02-05 at 11:10 -0800, Chris Li wrote:
> > >
> > >
> > > In our system, a really heavy swap load is rare and it means something
> > > is already wrong. At that point the app's SLO is likely at risk,
> > > regardless of long tail swap latency. It is already too late to
> > > address it at the swap fault end. We need to address the source of the
> > > problem which is swapping out too much.
> > >
> > >
> >
> > Could some usage scenarios put more pressure on swap than your
> > usage scenario? Say system with limited RAM and rely on zswap?
> >
> Of course. In that case what I proposed to do will already doing what
> I think is the best of this situation. After grabbing the cache lock
> and finding out async fre hasn't started the freeing yet. Just free
> all 64 entries in the swap slot cache. It is similar to the old code
> behavior.
> Yes, it will have the long tail latency due to batch freeing 64 entries.
> My point is not that I don't care about heavy swap behavior.
> My point is that the app will suffer from the swap strom anyway, it is
> unavoidable. That will be the dominant factor shadowing the batch free
> optimization effect.
The original optimization introducing swap_slots target such heavy
swap use cases when we have fast swap backend to allow higher sustainable
swap throughput. We should not ignore it. And I am afraid your current
patch as is will hurt that performance. If you change the direct free
path to free all entries, that could maintain the throughput and I'll
be okay with that.
>
> Or do I miss your point as you want to purpose the swap cache double
> buffer so it can perform better under swap storm situations?
>
I am not actually proposing doubling the buffer as that proposal have
its own downside.
Tim
next prev parent reply other threads:[~2024-02-09 17:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 1:17 Chris Li
2024-02-01 5:33 ` Huang, Ying
2024-02-01 23:20 ` Tim Chen
2024-02-03 18:12 ` Chris Li
2024-02-05 18:15 ` Tim Chen
2024-02-05 19:10 ` Chris Li
2024-02-07 1:08 ` Tim Chen
2024-02-07 1:51 ` Chris Li
2024-02-09 17:52 ` Tim Chen [this message]
2024-02-13 22:46 ` Chris Li
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=4f1d0c0369e3b08cb0c8d2271396277df6e1d37e.camel@linux.intel.com \
--to=tim.c.chen@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=bgeffon@google.com \
--cc=chrisl@kernel.org \
--cc=ctshao@google.com \
--cc=gthelen@google.com \
--cc=hannes@cmpxchg.org \
--cc=hezhongkun.hzk@bytedance.com \
--cc=kasong@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=nphamcs@gmail.com \
--cc=shikemeng@huaweicloud.com \
--cc=surenb@google.com \
--cc=v-songbaohua@oppo.com \
--cc=weixugc@google.com \
--cc=ying.huang@intel.com \
--cc=yosryahmed@google.com \
--cc=yuzhao@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