public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Jens Axboe <axboe@kernel.dk>, linux-block@vger.kernel.org
Subject: Re: [PATCH 1/2] block/mq-deadline: serialize request dispatching
Date: Thu, 18 Jan 2024 10:51:44 -0800	[thread overview]
Message-ID: <5f1e2bd2-b376-4272-93ce-a77c9b0c81ca@acm.org> (raw)
In-Reply-To: <3910157f-dbb7-4048-ac52-a2b354048be6@kernel.dk>

On 1/18/24 10:45, Jens Axboe wrote:
> Do you read the replies to the emails, from the other thread?

Yes.
  > And secondly, this avoids a RMW if it's already set.
 From the spinlock implementation (something I looked up before I wrote
my previous reply):

static __always_inline int queued_spin_trylock(struct qspinlock *lock)
{
	int val = atomic_read(&lock->val);

	if (unlikely(val))
		return 0;

	return likely(atomic_try_cmpxchg_acquire(&lock->val, &val,
                                                  _Q_LOCKED_VAL));
}

I think this implementation does not perform a RMW if the spinlock is
already locked.

Thanks,

Bart.

  reply	other threads:[~2024-01-18 18:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18 18:04 [PATCHSET RFC 0/2] mq-deadline scalability improvements Jens Axboe
2024-01-18 18:04 ` [PATCH 1/2] block/mq-deadline: serialize request dispatching Jens Axboe
2024-01-18 18:24   ` Bart Van Assche
2024-01-18 18:45     ` Jens Axboe
2024-01-18 18:51       ` Bart Van Assche [this message]
2024-01-18 18:55         ` Jens Axboe
2024-01-19  2:40   ` Ming Lei
2024-01-19 15:49     ` Jens Axboe
2024-01-18 18:04 ` [PATCH 2/2] block/mq-deadline: fallback to per-cpu insertion buckets under contention Jens Axboe
2024-01-18 18:25   ` Keith Busch
2024-01-18 18:28     ` Jens Axboe
2024-01-18 18:31   ` Bart Van Assche
2024-01-18 18:33     ` Jens Axboe
2024-01-18 18:53       ` Bart Van Assche
2024-01-18 18:56         ` Jens Axboe
2024-01-18 20:46           ` Bart Van Assche
2024-01-18 20:52             ` Jens Axboe
2024-01-19 23:11               ` Bart Van Assche
2024-01-18 19:29 ` [PATCHSET RFC 0/2] mq-deadline scalability improvements Jens Axboe
2024-01-18 20:22   ` Jens Axboe

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=5f1e2bd2-b376-4272-93ce-a77c9b0c81ca@acm.org \
    --to=bvanassche@acm.org \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.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