All of lore.kernel.org
 help / color / mirror / Atom feed
From: Caleb Sander Mateos <csander@purestorage.com>
To: Ming Lei <tom.leiming@gmail.com>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	Caleb Sander Mateos <csander@purestorage.com>
Subject: [PATCH 7.2 0/2] ublk: optimize ublk_rq_has_data()
Date: Wed, 13 May 2026 15:18:44 -0600	[thread overview]
Message-ID: <20260513211846.1956810-1-csander@purestorage.com> (raw)

ublk_rq_has_data() currently uses bio_has_data(), which involves 2
indirections and several branches. Introduce a blk_rq_has_data()
analogue for struct request and use it instead to save an indirection
and NULL check.

Caleb Sander Mateos (2):
  blk-mq: introduce blk_rq_has_data()
  ublk: optimize ublk_rq_has_data()

 drivers/block/ublk_drv.c | 21 ++++++++-------------
 include/linux/blk-mq.h   |  9 +++++++++
 2 files changed, 17 insertions(+), 13 deletions(-)

-- 
2.54.0


             reply	other threads:[~2026-05-13 21:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 21:18 Caleb Sander Mateos [this message]
2026-05-13 21:18 ` [PATCH 7.2 1/2] blk-mq: introduce blk_rq_has_data() Caleb Sander Mateos
2026-05-14  9:35   ` Ming Lei
2026-05-13 21:18 ` [PATCH 7.2 2/2] ublk: optimize ublk_rq_has_data() Caleb Sander Mateos
2026-05-14  9:36   ` Ming Lei

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=20260513211846.1956810-1-csander@purestorage.com \
    --to=csander@purestorage.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tom.leiming@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 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.