public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Woody Zhang <woodyzhang666@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Woody Zhang <woodyzhang666@gmail.com>
Subject: Re: [PATCH 0/5] Minor memory size optimization in debugobjects
Date: Thu, 22 Aug 2024 02:11:56 +0200	[thread overview]
Message-ID: <874j7difg3.ffs@tglx> (raw)
In-Reply-To: <20240821230539.168107-1-woodyzhang666@gmail.com>

On Thu, Aug 22 2024 at 07:05, Woody Zhang wrote:
> As of now, debugobjects framework uses hlist_head and separate spinlock
> as a hash table bucket. We have hlist_bl_head APIs which embeds a
> bit_spinlock in head pointer and thus no separate spinlock is required.
>
> This patchset first wraps irq variant API for bit_spinlock as well as
> hlist_bl_lock and several other APIs and macros. Lastly, It replaces
> hlist APIs with hlist_bl counterparts.

You are telling _what_ your changes are doing, but not _why_ and neither
_what_ they are trying to achieve.

Aside of that you are failing to explain how replacing a spinlock by a
hlist bitlock is equivalent to a lockdep covered locking primitive.

It is NOT.

And you have to come up with a convincing argument why this makes sense
aside of saving an unspecified amount of memory, which you haven't even
bothered to document. Neither in the changelogs nor in the cover letter.

You also completely fail to provide an analysis why converting the debug
object locking from a fair and sensible locking implementation to a
known to be unscalable locking implementation makes sense for a debug
facility which is used in a lot of hotpaths.

Any attempt to substitute a spinlock with a hlist_bl locking scheme
needs to come with a proper analysis to demonstrate that:

   1) this is a completely equivalent locking scheme

   2) the resulting loss of lockdep coverage is justified

   3) there is an actual performance benefit

   4) the actual memory savings

Just handwaving about an unspecified amount of memory savings (probably
in the range of 2 bytes or such) without any of #1 -#3 above is not
cutting it at all.

Try again.

Thanks,

        tglx

  parent reply	other threads:[~2024-08-22  0:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21 23:05 [PATCH 0/5] Minor memory size optimization in debugobjects Woody Zhang
2024-08-21 23:05 ` [PATCH 1/5] bit_spinlock: add irq variant for bit spinlock API Woody Zhang
2024-08-21 23:05 ` [PATCH 2/5] list_bl: add irq variant for hlist_bl lock API Woody Zhang
2024-08-21 23:05 ` [PATCH 3/5] list_bl: remove lock check in hlist_bl_set_first Woody Zhang
2024-08-21 23:05 ` [PATCH 4/5] list_bl: add hlist_bl_move_list and two macros Woody Zhang
2024-08-21 23:05 ` [PATCH 5/5] debugobjects: use list_bl to save memory for hash slot spinlocks Woody Zhang
2024-08-22  0:11 ` Thomas Gleixner [this message]
2024-08-22 10:26   ` [PATCH 0/5] Minor memory size optimization in debugobjects Woody Zhang

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=874j7difg3.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=woodyzhang666@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