linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Theodore Ts'o' <tytso@mit.edu>, Yangtao Li <frank.li@vivo.com>
Cc: "adilger.kernel@dilger.ca" <adilger.kernel@dilger.ca>,
	"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>
Subject: RE: [PATCH] ext4: convert to DIV_ROUND_UP() in mpage_process_page_bufs()
Date: Mon, 13 Mar 2023 09:25:20 +0000	[thread overview]
Message-ID: <6135e1e118724e5ea3a1f7640b705cb5@AcuMS.aculab.com> (raw)
In-Reply-To: <20230310232107.GE860405@mit.edu>

...
> On 32-bit platforms --- i386 in particular --- the 64-bit division
> results in an out-of-line call to a helper function that is not
> supplied in the kernel compilation environment, so not only is it
> slower, it Just Doesn't Work.

Even on some 64-bit systems a 64bit divide can be significantly
slower than a 32-bit divide - even with the same arguments.
IIRC Intel x86-64 a 64-bit divide (128-bit dividend) is about
twice the clocks of a 32-bit one. On AMD cpu they are much the same.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


      reply	other threads:[~2023-03-13  9:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10  6:07 [PATCH] ext4: convert to DIV_ROUND_UP() in mpage_process_page_bufs() Yangtao Li
2023-03-10  6:17 ` Eric Biggers
2023-03-10  6:27   ` Yangtao Li
2023-03-10  6:35     ` Gao Xiang
2023-03-10  6:37       ` Gao Xiang
2023-03-10  6:41     ` Eric Biggers
2023-03-10  6:37   ` Al Viro
2023-03-10  6:43     ` Al Viro
2023-03-10  6:43     ` Eric Biggers
2023-03-10  6:46       ` Al Viro
2023-03-10  6:54         ` Eric Biggers
2023-03-10  7:05           ` Al Viro
2023-03-10  7:12             ` Al Viro
2023-03-10 21:47               ` Eric Biggers
2023-03-10 19:07 ` kernel test robot
2023-03-10 19:38 ` kernel test robot
2023-03-10 23:21 ` Theodore Ts'o
2023-03-13  9:25   ` David Laight [this message]

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=6135e1e118724e5ea3a1f7640b705cb5@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=frank.li@vivo.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --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;
as well as URLs for NNTP newsgroup(s).