Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Kuan-Wei Chiu <visitorckw@gmail.com>
Cc: corbet@lwn.net, colyli@kernel.org, kent.overstreet@linux.dev,
	robertpang@google.com, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-bcache@vger.kernel.org,
	jserv@ccns.ncku.edu.tw, stable@vger.kernel.org
Subject: Re: [PATCH 0/8] Fix bcache regression with equality-aware heap APIs
Date: Wed, 11 Jun 2025 18:48:17 -0700	[thread overview]
Message-ID: <20250611184817.bf9fee25d6947a9bcf60b6f9@linux-foundation.org> (raw)
In-Reply-To: <20250610215516.1513296-1-visitorckw@gmail.com>

On Wed, 11 Jun 2025 05:55:08 +0800 Kuan-Wei Chiu <visitorckw@gmail.com> wrote:

> This patch series introduces equality-aware variants of the min heap
> API that use a top-down heapify strategy to improve performance when
> many elements are equal under the comparison function. It also updates
> the documentation accordingly and modifies bcache to use the new APIs
> to fix a performance regression caused by the switch to the generic min
> heap library.
> 
> In particular, invalidate_buckets_lru() in bcache suffered from
> increased comparison overhead due to the bottom-up strategy introduced
> in commit 866898efbb25 ("bcache: remove heap-related macros and switch
> to generic min_heap"). The regression is addressed by switching to the
> equality-aware variants and using the inline versions to avoid function
> call overhead in this hot path.
> 
> Cc: stable@vger.kernel.org

To justify a -stable backport this performance regression would need to
have a pretty significant impact upon real-world userspace.  Especially
as the patchset is large.

Unfortunately the changelog provides no indication of the magnitude of
the userspace impact.   Please tell us this, in detail.

Also, if we are to address this regression in -stable kernels then
reverting 866898efbb25 is an obvious way - it is far far safer.  So
please also tell us why the proposed patchset is a better way for us to
go.

(Also, each patch should have a fixes:866898efbb25 to help direct the
backporting efforts)


I'll add the patches to mm.git to get you some testing but from what
I'm presently seeing the -stable backporting would be unwise.

  parent reply	other threads:[~2025-06-12  1:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-10 21:55 [PATCH 0/8] Fix bcache regression with equality-aware heap APIs Kuan-Wei Chiu
2025-06-10 21:55 ` [PATCH 1/8] lib min_heap: Add equal-elements-aware sift_down variant Kuan-Wei Chiu
2025-06-12 13:00   ` Robert Pang
2025-06-13  6:17     ` Kuan-Wei Chiu
2025-06-10 21:55 ` [PATCH 2/8] lib min_heap: Add typedef for sift_down function pointer Kuan-Wei Chiu
2025-06-10 21:55 ` [PATCH 3/8] lib min_heap: add eqaware variant of min_heapify_all() Kuan-Wei Chiu
2025-06-10 21:55 ` [PATCH 4/8] lib min_heap: add eqaware variant of min_heap_pop() Kuan-Wei Chiu
2025-06-10 21:55 ` [PATCH 5/8] lib min_heap: add eqaware variant of min_heap_pop_push() Kuan-Wei Chiu
2025-06-10 21:55 ` [PATCH 6/8] lib min_heap: add eqaware variant of min_heap_del() Kuan-Wei Chiu
2025-06-10 21:55 ` [PATCH 7/8] Documentation/core-api: min_heap: Document _eqaware variants of min-heap APIs Kuan-Wei Chiu
2025-06-10 21:55 ` [PATCH 8/8] bcache: Fix the tail IO latency regression by using equality-aware min heap API Kuan-Wei Chiu
2025-06-12  1:48 ` Andrew Morton [this message]
2025-06-12  1:54   ` [PATCH 0/8] Fix bcache regression with equality-aware heap APIs Andrew Morton
2025-06-13  6:15   ` Kuan-Wei Chiu
2025-06-13 14:26     ` Robert Pang
2025-06-13 18:04       ` Andrew Morton
2025-06-13 23:19         ` Kuan-Wei Chiu
2025-06-14  1:31           ` Andrew Morton

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=20250611184817.bf9fee25d6947a9bcf60b6f9@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=colyli@kernel.org \
    --cc=corbet@lwn.net \
    --cc=jserv@ccns.ncku.edu.tw \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robertpang@google.com \
    --cc=stable@vger.kernel.org \
    --cc=visitorckw@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