Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Dominique Martinet <asmadeus@codewreck.org>
Cc: dhowells@redhat.com, Andrew Morton <akpm@linux-foundation.org>,
	mm-commits@vger.kernel.org, viro@zeniv.linux.org.uk,
	stable@vger.kernel.org, ryan@lahfa.xyz, maximilian@mbosch.me,
	ct@flyingcircus.io, brauner@kernel.org, arnout@bzzt.net
Subject: Re: + iov_iter-iterate_folioq-fix-handling-of-offset-=-folio-size.patch added to mm-hotfixes-unstable branch
Date: Tue, 12 Aug 2025 22:38:31 +0100	[thread overview]
Message-ID: <677795.1755034711@warthog.procyon.org.uk> (raw)
In-Reply-To: <aJuwDfwoSUP_M_0D@codewreck.org>

Dominique Martinet <asmadeus@codewreck.org> wrote:

> skip is modified in the first if so I don't see how the compiler could
> optimize it.

I mean that if you have:

		if (skip < fsize) {
			...
		}
  		if (skip >= fsize) {
			...
		}

then the compiler should be able to take the second check as true in the case
where the first fails.

>   26923	  1104	     0	 28027	  6d7b	a.o
>   27019	  1104	     0	 28123	  6ddb	b.o

That's a surprisingly large change.

> but honestly I'm happy to focus on readability here -- if you think two
> if are easier to read I'll be happy to send a v3

I must admit I dislike goto jumping *in* to a braced section.  It's not even
allowed in C++ and Java, IIRC.

David


  reply	other threads:[~2025-08-12 21:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-12  1:02 + iov_iter-iterate_folioq-fix-handling-of-offset-=-folio-size.patch added to mm-hotfixes-unstable branch Andrew Morton
2025-08-12  9:38 ` David Howells
2025-08-12 21:20   ` Dominique Martinet
2025-08-12 21:38     ` David Howells [this message]
2025-08-13  6:00       ` Dominique Martinet
  -- strict thread matches above, loose matches on Subject: below --
2025-08-13 23:15 Andrew Morton

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=677795.1755034711@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnout@bzzt.net \
    --cc=asmadeus@codewreck.org \
    --cc=brauner@kernel.org \
    --cc=ct@flyingcircus.io \
    --cc=maximilian@mbosch.me \
    --cc=mm-commits@vger.kernel.org \
    --cc=ryan@lahfa.xyz \
    --cc=stable@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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