Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Dominique Martinet <asmadeus@codewreck.org>
To: David Howells <dhowells@redhat.com>
Cc: 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: Wed, 13 Aug 2025 15:00:12 +0900	[thread overview]
Message-ID: <aJwp7FO0Twyhej0o@codewreck.org> (raw)
In-Reply-To: <677795.1755034711@warthog.procyon.org.uk>

David Howells wrote on Tue, Aug 12, 2025 at 10:38:31PM +0100:
> >   26923	  1104	     0	 28027	  6d7b	a.o
> >   27019	  1104	     0	 28123	  6ddb	b.o
> 
> That's a surprisingly large change.

Right, because the function is inlined multiple times in iov_iter.o it
turned out rather big... Here's what it looks like from busybox's
bloat-o-meter, which gives a better picture:

function                                             old     new   delta
iov_iter_zero                                       1706    1738     +32
copy_page_to_iter_nofault                           2491    2512     +21
_copy_mc_to_iter                                    1604    1624     +20
copy_folio_from_iter_atomic                         2620    2633     +13
_copy_from_iter_nocache                             1706    1719     +13
_copy_from_iter_flushcache                          1409    1422     +13
_copy_to_iter                                       1885    1891      +6
_copy_from_iter                                     1874    1880      +6
iov_iter_extract_pages                              2182    2166     -16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 8/1 up/down: 124/-16)           Total: 108 bytes

So the compiler obviously doesn't optimize the if (at least with
whatever default flags I'm using on gcc 15.2.1), but the impact is only
that big because it's copied so many times.

Anyway, as said before I'm happy to prioritize readability here, so
sending a v3 with just this changed.
-- 
Dominique Martinet | Asmadeus

  reply	other threads:[~2025-08-13  6:00 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
2025-08-13  6:00       ` Dominique Martinet [this message]
  -- 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=aJwp7FO0Twyhej0o@codewreck.org \
    --to=asmadeus@codewreck.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnout@bzzt.net \
    --cc=brauner@kernel.org \
    --cc=ct@flyingcircus.io \
    --cc=dhowells@redhat.com \
    --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