Linux block layer
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Hannes Reinecke <hare@kernel.org>,
	Damien Le Moal <dlemoal@kernel.org>, Tejun Heo <tj@kernel.org>,
	Josef Bacik <josef@toxicpanda.com>
Subject: Re: [PATCH v6 10/14] block/blk-iocost: Inline iocg_lock() and iocg_unlock()
Date: Fri, 5 Jun 2026 08:50:42 +0200	[thread overview]
Message-ID: <20260605065042.GD26230@lst.de> (raw)
In-Reply-To: <e0e81fbd746bfb54c31cb84f8671a0c23dcdedb2.1780419600.git.bvanassche@acm.org>

On Tue, Jun 02, 2026 at 10:07:39AM -0700, Bart Van Assche wrote:
> +	if (ioc_locked) {
> +		guard(spinlock_irqsave)(&iocg->ioc->lock);
> +		guard(spinlock)(&iocg->waitq.lock);
> +		action = iocg_handle_over_budget(rqos, iocg, bio, &now, &wait,
> +						 use_debt, ioc_locked, abs_cost,
> +						 cost);
> +	} else {
> +		guard(spinlock_irqsave)(&iocg->waitq.lock);
> +		action = iocg_handle_over_budget(rqos, iocg, bio, &now, &wait,
> +						 use_debt, ioc_locked, abs_cost,
> +						 cost);

Please avoid the undebuggable guard mess.  This is a lot more readable with
good old locking calls.


  parent reply	other threads:[~2026-06-05  6:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-02 17:07 [PATCH v6 00/14] Enable lock context analysis for the block layer core Bart Van Assche
2026-06-02 17:07 ` [PATCH v6 01/14] block: Annotate the queue limits functions Bart Van Assche
2026-06-02 17:07 ` [PATCH v6 02/14] block/bdev: Annotate the blk_holder_ops callback functions Bart Van Assche
2026-06-02 17:07 ` [PATCH v6 03/14] block/cgroup: Split blkg_conf_prep() Bart Van Assche
2026-06-02 17:07 ` [PATCH v6 04/14] block/cgroup: Split blkg_conf_exit() Bart Van Assche
2026-06-02 17:07 ` [PATCH v6 05/14] block/cgroup: Improve lock context annotations Bart Van Assche
2026-06-02 17:07 ` [PATCH v6 06/14] block/blk-iocost: Combine two error paths in ioc_qos_write() Bart Van Assche
2026-06-03  1:46   ` Hannes Reinecke
2026-06-05  6:48   ` Christoph Hellwig
2026-06-02 17:07 ` [PATCH v6 07/14] block/cgroup: Inline blkg_conf_{open,close}_bdev_frozen() Bart Van Assche
2026-06-03  1:47   ` Hannes Reinecke
2026-06-05  6:49   ` Christoph Hellwig
2026-06-02 17:07 ` [PATCH v6 08/14] block/crypto: Annotate the crypto functions Bart Van Assche
2026-06-02 17:07 ` [PATCH v6 09/14] block/blk-iocost: Split ioc_rqos_throttle() Bart Van Assche
2026-06-03  1:53   ` Hannes Reinecke
2026-06-05  6:49   ` Christoph Hellwig
2026-06-02 17:07 ` [PATCH v6 10/14] block/blk-iocost: Inline iocg_lock() and iocg_unlock() Bart Van Assche
2026-06-03  1:59   ` Hannes Reinecke
2026-06-05  6:50   ` Christoph Hellwig [this message]
2026-06-02 17:07 ` [PATCH v6 11/14] block/blk-mq-debugfs: Improve lock context annotations Bart Van Assche
2026-06-03  1:58   ` Hannes Reinecke
2026-06-05  6:51   ` Christoph Hellwig
2026-06-02 17:07 ` [PATCH v6 12/14] block/Kyber: Make the lock context annotations compatible with Clang Bart Van Assche
2026-06-02 17:07 ` [PATCH v6 13/14] block/mq-deadline: " Bart Van Assche
2026-06-02 17:07 ` [PATCH v6 14/14] block: Enable lock context analysis Bart Van Assche
2026-06-05 12:45 ` [PATCH v6 00/14] Enable lock context analysis for the block layer core Nilay Shroff

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=20260605065042.GD26230@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=dlemoal@kernel.org \
    --cc=hare@kernel.org \
    --cc=josef@toxicpanda.com \
    --cc=linux-block@vger.kernel.org \
    --cc=tj@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox