public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: Re: [PATCH] block: Remove unnecessary unlikely()
Date: Fri, 19 Jan 2024 09:41:40 -0700	[thread overview]
Message-ID: <fe1f4fe8-48d8-4b09-bd50-36e8fd8e75cb@kernel.dk> (raw)
In-Reply-To: <20240119163434.1357155-1-willy@infradead.org>

On 1/19/24 9:34 AM, Matthew Wilcox (Oracle) wrote:
> Jens added unlikely() thinking that this was an error path.  It's
> actually just the end of the iteration, so does not warrant an
> unlikely().

This is because the previous fix (or my attempt at least) didn't do the
i >= vcnt, it checked for an empty bio instead. Which then definitely
did make it an error/unlikely path, but obviously this one is not.

The bio iterator stuff has gotten terribly unwieldy and complicated, and
not very efficient either. But I guess that's a story for another
investigation...

-- 
Jens Axboe


  reply	other threads:[~2024-01-19 16:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19 16:34 [PATCH] block: Remove unnecessary unlikely() Matthew Wilcox (Oracle)
2024-01-19 16:41 ` Jens Axboe [this message]
2024-01-19 20:20   ` 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=fe1f4fe8-48d8-4b09-bd50-36e8fd8e75cb@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=willy@infradead.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