From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Jenhao Chen <jenhaochen@google.com>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
Minchan Kim <minchan@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, minchan@google.com, liumartin@google.com,
benwei@google.com
Subject: Re: [PATCH] mm/zsmalloc: inline obj_malloc() and obj_free()
Date: Tue, 1 Dec 2026 14:18:37 +0900 [thread overview]
Message-ID: <aw5YY-eCSn94l3QW@google.com> (raw)
In-Reply-To: <20261106011233.3270937-1-jenhaochen@google.com>
On (26/11/06 01:12), Jenhao Chen wrote:
> On (26/11/05 20:09), Sergey Senozhatsky wrote:
> > > If we also mark obj_write() __always_inline alongside obj_malloc()
> > > and obj_free() (with noinline on alloc_zspage()), the compiler CSEs
> > > those redundant operations across the fast path:
> > > - arm64 (Clang 22): -31.3 (-O2, -4.0%) / -34.7 (-O2 + AUTOFDO, -4.5%)
> > > retired instructions per zs_store() + zs_free() pair (vs. -8.4 for
> > > obj_malloc() alone), shrinking zs_store() under AUTOFDO from
> > > 3,144 B to 2,448 B (-22%).
> > > - x86_64 (Clang 22): -26.6 (-O2) / -31.8 (-O2 + AUTOFDO) retired
> > > instructions per pair (~4.0-4.5% latency reduction).
> > > - x86_64 (GCC 15 -O2): -37.1 retired instructions (-5.1%) and -5.3%
> > > latency (-5.5% cycles) per pair, while keeping zs_store() slightly
> > > smaller (1,997 B -> 1,943 B).
> >
> > Great, I'd love to see that in v2 commit message.
> >
> > > Would you prefer that I send v2 rebased on top of [1] (including
> > > __always_inline on obj_write()), or send v2 against current mm-new
> > > first?
> >
> > If it doesn't trouble you too much, can we finalize [1] first so then
> > you can send your patch atop of it? I can ping you when [1] is done.
>
> Sounds good to me -- no trouble at all. Let's finalize [1] first, and
> I'll send v2 on top of it (with __always_inline on obj_write() and the
> benchmark numbers in the commit message) once [1] is ready. Thanks for
> offering to ping!
So I think we stabilized all the zsmalloc patches, should be in
linux-next by now.
next prev parent reply other threads:[~2026-12-01 5:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 12:17 [PATCH] mm/zsmalloc: inline obj_malloc() and obj_free() Jenhao Chen
2026-11-05 5:23 ` Sergey Senozhatsky
2026-11-05 10:39 ` Jenhao Chen
2026-11-05 11:09 ` Sergey Senozhatsky
2026-11-06 1:12 ` Jenhao Chen
2026-12-01 5:18 ` Sergey Senozhatsky [this message]
2026-12-02 4:47 ` Jenhao Chen
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=aw5YY-eCSn94l3QW@google.com \
--to=senozhatsky@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=benwei@google.com \
--cc=jenhaochen@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liumartin@google.com \
--cc=llvm@lists.linux.dev \
--cc=minchan@google.com \
--cc=minchan@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.