public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: "Theodore Tso" <tytso@mit.edu>
Cc: Yu Kuai
	<yukuai@alb-78bjiv52429oh8qptp.cn-shenzhen.alb.aliyuncs.com>,
	adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] ext4: align preallocation size to stripe width
Date: Thu, 9 Apr 2026 19:59:45 +0100	[thread overview]
Message-ID: <20260409195945.76393a20@pumpkin> (raw)
In-Reply-To: <20260409142911.GB59468@macsyma-wired.lan>

On Thu, 9 Apr 2026 10:29:11 -0400
"Theodore Tso" <tytso@mit.edu> wrote:

> On Mon, Dec 08, 2025 at 04:32:46PM +0800, Yu Kuai wrote:
> > When stripe width (io_opt) is configured, align the predicted
> > preallocation size to stripe boundaries. This ensures optimal I/O
> > performance on RAID and other striped storage devices by avoiding
> > partial stripe operations.
> > 
> > The current implementation uses hardcoded size predictions (16KB, 32KB,
> > 64KB, etc.) that are not stripe-aware. This causes physical block
> > offsets on disk to be misaligned to stripe boundaries, leading to
> > read-modify-write penalties on RAID arrays and reduced performance.
> > 
> > This patch makes size prediction stripe-aware by using multiples of
> > stripe size (1x, 2x, 4x, 8x, 16x, 32x) when s_stripe is set.
> > Additionally, the start offset is aligned to stripe boundaries using
> > rounddown(), which works correctly for both power-of-2 and non-power-of-2
> > stripe sizes. For devices without stripe configuration, the original
> > behavior is preserved.
> > ...  
> 
> Hi Yu,
> 
> Did you see the build failures reported by the kernel build bot on the
> i386[1] and arm[2] platforms?  The problem appears to be using
> roundup() and rounddown() on an unsigned long types.

Looks like that whole condition chain should be replaced with something
based on ilog2() (or some other bit-scan function).

	David

> 
> [1] https://lore.kernel.org/r/202512102331.yweFnVTU-lkp@intel.com
> [2] https://lore.kernel.org/r/202512120613.mM5COVWV-lkp@intel.com
> 
> We can't apply your patch until this issue is addressed.
> 
> Thanks,
> 
> 					- Ted
> 


      reply	other threads:[~2026-04-09 18:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-08  8:32 [PATCH 0/2] ext4: align preallocation size to stripe width Yu Kuai
2025-12-08  8:32 ` [PATCH 1/2] ext4: refactor size prediction into helper functions Yu Kuai
2025-12-08  8:32 ` [PATCH 2/2] ext4: align preallocation size to stripe width Yu Kuai
2025-12-10 15:49   ` kernel test robot
2025-12-11 23:08   ` kernel test robot
2026-04-09 14:29   ` Theodore Tso
2026-04-09 18:59     ` 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=20260409195945.76393a20@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=yukuai@alb-78bjiv52429oh8qptp.cn-shenzhen.alb.aliyuncs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox