FS/XFS testing framework
 help / color / mirror / Atom feed
* cpu scaling fixes
@ 2026-06-18 13:48 Christoph Hellwig
  2026-06-18 13:48 ` [PATCH 1/2] xfs/078: disable all concurrency scaling Christoph Hellwig
  2026-06-18 13:48 ` [PATCH 2/2] xfs/216: " Christoph Hellwig
  0 siblings, 2 replies; 9+ messages in thread
From: Christoph Hellwig @ 2026-06-18 13:48 UTC (permalink / raw)
  To: Zorro Lang
  Cc: Darrick J. Wong, Lukas Herbolt, Eric Sandeen,
	Shin'ichiro Kawasaki, linux-xfs, fstests

Hi all,

this series fully disables the mkfs automatic CPU count scaling for two
tests, where that would lead to differences in the gold output.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] xfs/078: disable all concurrency scaling
  2026-06-18 13:48 cpu scaling fixes Christoph Hellwig
@ 2026-06-18 13:48 ` Christoph Hellwig
  2026-06-18 13:54   ` Eric Sandeen
  2026-06-18 13:48 ` [PATCH 2/2] xfs/216: " Christoph Hellwig
  1 sibling, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2026-06-18 13:48 UTC (permalink / raw)
  To: Zorro Lang
  Cc: Darrick J. Wong, Lukas Herbolt, Eric Sandeen,
	Shin'ichiro Kawasaki, linux-xfs, fstests

Disable concurrency scaling to avoid mismatching output on systems with
a large CPU count.

Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 tests/xfs/078 | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/xfs/078 b/tests/xfs/078
index 6057aeea12ab..8ef52614b125 100755
--- a/tests/xfs/078
+++ b/tests/xfs/078
@@ -57,9 +57,11 @@ _grow_loop()
 	$XFS_IO_PROG -f -c "truncate $original" $LOOP_IMG
 	loop_dev=`_create_loop_device $LOOP_IMG $bsize`
 
-	dparam=""
+	# Disable concurrency scaling to avoid output differences due to large
+	# CPU counts.
+	mkfs_opts="-d concurrency=0 -l concurrency=0 -r concurrency=0"
 	if [ -n "$agsize" ]; then
-		dparam="-d agsize=$agsize"
+		mkfs_opts="$mkfs_opts -d agsize=$agsize"
 	fi
 
 	echo
@@ -67,7 +69,7 @@ _grow_loop()
 	echo
 
 	echo "*** mkfs loop file (size=$original)"
-	$MKFS_XFS_PROG -b size=$bsize $dparam $loop_dev | \
+	$MKFS_XFS_PROG -b size=$bsize $mkfs_opts $loop_dev | \
 		_filter_mkfs 2>/dev/null
 
 	echo "*** extend loop file"
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] xfs/216: disable all concurrency scaling
  2026-06-18 13:48 cpu scaling fixes Christoph Hellwig
  2026-06-18 13:48 ` [PATCH 1/2] xfs/078: disable all concurrency scaling Christoph Hellwig
@ 2026-06-18 13:48 ` Christoph Hellwig
  2026-06-19  1:57   ` Shin'ichiro Kawasaki
  1 sibling, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2026-06-18 13:48 UTC (permalink / raw)
  To: Zorro Lang
  Cc: Darrick J. Wong, Lukas Herbolt, Eric Sandeen,
	Shin'ichiro Kawasaki, linux-xfs, fstests

This test currently disables log concurrency scaling, but even the
data device concurrency scaling can create mismatching output on
systems with a large CPU count.

Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 tests/xfs/216 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/xfs/216 b/tests/xfs/216
index 1749647c11f7..ce8bb528410b 100755
--- a/tests/xfs/216
+++ b/tests/xfs/216
@@ -23,7 +23,7 @@ _cleanup()
 _require_scratch
 _scratch_mkfs_xfs >/dev/null 2>&1
 if _scratch_mkfs_xfs_supports_concurrency -l >> $seqres.full 2>&1; then
-	loop_mkfs_opts="-l concurrency=0"
+	loop_mkfs_opts="-d concurrency=0 -l concurrency=0 -r concurrency=0"
 else
 	loop_mkfs_opts=""
 fi
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] xfs/078: disable all concurrency scaling
  2026-06-18 13:48 ` [PATCH 1/2] xfs/078: disable all concurrency scaling Christoph Hellwig
@ 2026-06-18 13:54   ` Eric Sandeen
  2026-06-18 14:23     ` Eric Sandeen
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Sandeen @ 2026-06-18 13:54 UTC (permalink / raw)
  To: Christoph Hellwig, Zorro Lang
  Cc: Darrick J. Wong, Lukas Herbolt, Shin'ichiro Kawasaki,
	linux-xfs, fstests

On 6/18/26 8:48 AM, Christoph Hellwig wrote:
> Disable concurrency scaling to avoid mismatching output on systems with
> a large CPU count.
> 
> Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

I think this papers over what I still feel is a problem in mkfs.xfs
behavior, but that's a different issue and making tests pass is good, so:

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  tests/xfs/078 | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/xfs/078 b/tests/xfs/078
> index 6057aeea12ab..8ef52614b125 100755
> --- a/tests/xfs/078
> +++ b/tests/xfs/078
> @@ -57,9 +57,11 @@ _grow_loop()
>  	$XFS_IO_PROG -f -c "truncate $original" $LOOP_IMG
>  	loop_dev=`_create_loop_device $LOOP_IMG $bsize`
>  
> -	dparam=""
> +	# Disable concurrency scaling to avoid output differences due to large
> +	# CPU counts.
> +	mkfs_opts="-d concurrency=0 -l concurrency=0 -r concurrency=0"
>  	if [ -n "$agsize" ]; then
> -		dparam="-d agsize=$agsize"
> +		mkfs_opts="$mkfs_opts -d agsize=$agsize"
>  	fi
>  
>  	echo
> @@ -67,7 +69,7 @@ _grow_loop()
>  	echo
>  
>  	echo "*** mkfs loop file (size=$original)"
> -	$MKFS_XFS_PROG -b size=$bsize $dparam $loop_dev | \
> +	$MKFS_XFS_PROG -b size=$bsize $mkfs_opts $loop_dev | \
>  		_filter_mkfs 2>/dev/null
>  
>  	echo "*** extend loop file"


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] xfs/078: disable all concurrency scaling
  2026-06-18 13:54   ` Eric Sandeen
@ 2026-06-18 14:23     ` Eric Sandeen
  2026-06-19  1:55       ` Shin'ichiro Kawasaki
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Sandeen @ 2026-06-18 14:23 UTC (permalink / raw)
  To: Christoph Hellwig, Zorro Lang
  Cc: Darrick J. Wong, Lukas Herbolt, Shin'ichiro Kawasaki,
	linux-xfs, fstests

On 6/18/26 8:54 AM, Eric Sandeen wrote:
> On 6/18/26 8:48 AM, Christoph Hellwig wrote:
>> Disable concurrency scaling to avoid mismatching output on systems with
>> a large CPU count.
>>
>> Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
>> Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> I think this papers over what I still feel is a problem in mkfs.xfs
> behavior, but that's a different issue and making tests pass is good, so:
> 
> Reviewed-by: Eric Sandeen <sandeen@redhat.com>

Er, hang on - let me retract that. Lukas sent a series to address
this problem too, right, and one of the things he added in his series
is a helper to determine whether the concurrency options even exist,
so that this can continue to run on older xfsprogs, which seems like
a good idea, no?

https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/commit/?h=for-next&id=7f162f5bcf50fc32c7e3b432e7ff189571a3151f

which added _scratch_mkfs_xfs_supports_concurrency()

>> ---
>>  tests/xfs/078 | 8 +++++---
>>  1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/tests/xfs/078 b/tests/xfs/078
>> index 6057aeea12ab..8ef52614b125 100755
>> --- a/tests/xfs/078
>> +++ b/tests/xfs/078
>> @@ -57,9 +57,11 @@ _grow_loop()
>>  	$XFS_IO_PROG -f -c "truncate $original" $LOOP_IMG
>>  	loop_dev=`_create_loop_device $LOOP_IMG $bsize`
>>  
>> -	dparam=""
>> +	# Disable concurrency scaling to avoid output differences due to large
>> +	# CPU counts.
>> +	mkfs_opts="-d concurrency=0 -l concurrency=0 -r concurrency=0"
>>  	if [ -n "$agsize" ]; then
>> -		dparam="-d agsize=$agsize"
>> +		mkfs_opts="$mkfs_opts -d agsize=$agsize"
>>  	fi
>>  
>>  	echo
>> @@ -67,7 +69,7 @@ _grow_loop()
>>  	echo
>>  
>>  	echo "*** mkfs loop file (size=$original)"
>> -	$MKFS_XFS_PROG -b size=$bsize $dparam $loop_dev | \
>> +	$MKFS_XFS_PROG -b size=$bsize $mkfs_opts $loop_dev | \
>>  		_filter_mkfs 2>/dev/null
>>  
>>  	echo "*** extend loop file"
> 
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] xfs/078: disable all concurrency scaling
  2026-06-18 14:23     ` Eric Sandeen
@ 2026-06-19  1:55       ` Shin'ichiro Kawasaki
  2026-06-19  4:57         ` Christoph Hellwig
  0 siblings, 1 reply; 9+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-06-19  1:55 UTC (permalink / raw)
  To: Eric Sandeen
  Cc: Christoph Hellwig, Zorro Lang, Darrick J. Wong, Lukas Herbolt,
	linux-xfs, fstests

On Jun 18, 2026 / 09:23, Eric Sandeen wrote:
> On 6/18/26 8:54 AM, Eric Sandeen wrote:
> > On 6/18/26 8:48 AM, Christoph Hellwig wrote:
> >> Disable concurrency scaling to avoid mismatching output on systems with
> >> a large CPU count.
> >>
> >> Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
> >> Signed-off-by: Christoph Hellwig <hch@lst.de>
> > 
> > I think this papers over what I still feel is a problem in mkfs.xfs
> > behavior, but that's a different issue and making tests pass is good, so:
> > 
> > Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> 
> Er, hang on - let me retract that. Lukas sent a series to address
> this problem too, right, and one of the things he added in his series
> is a helper to determine whether the concurrency options even exist,
> so that this can continue to run on older xfsprogs, which seems like
> a good idea, no?
> 
> https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/commit/?h=for-next&id=7f162f5bcf50fc32c7e3b432e7ff189571a3151f
> 
> which added _scratch_mkfs_xfs_supports_concurrency()

I agree, I think we can add the change below on top of this patch.
Regardless of the change, I confirmed that this patch avoids the failure
that I reported. Thanks!

Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>

diff --git a/tests/xfs/078 b/tests/xfs/078
index 8ef5261..dc0668e 100755
--- a/tests/xfs/078
+++ b/tests/xfs/078
@@ -59,7 +59,11 @@ _grow_loop()
 
 	# Disable concurrency scaling to avoid output differences due to large
 	# CPU counts.
-	mkfs_opts="-d concurrency=0 -l concurrency=0 -r concurrency=0"
+	if _scratch_mkfs_xfs_supports_concurrency -l >> $seqres.full 2>&1; then
+		mkfs_opts="-d concurrency=0 -l concurrency=0 -r concurrency=0"
+	else
+		mkfs_opts=""
+	fi
 	if [ -n "$agsize" ]; then
 		mkfs_opts="$mkfs_opts -d agsize=$agsize"
 	fi


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] xfs/216: disable all concurrency scaling
  2026-06-18 13:48 ` [PATCH 2/2] xfs/216: " Christoph Hellwig
@ 2026-06-19  1:57   ` Shin'ichiro Kawasaki
  0 siblings, 0 replies; 9+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-06-19  1:57 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Zorro Lang, Darrick J. Wong, Lukas Herbolt, Eric Sandeen,
	linux-xfs, fstests

On Jun 18, 2026 / 15:48, Christoph Hellwig wrote:
> This test currently disables log concurrency scaling, but even the
> data device concurrency scaling can create mismatching output on
> systems with a large CPU count.
> 
> Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Thanks, I confirmed this patch avoid the failure that I reported.

Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] xfs/078: disable all concurrency scaling
  2026-06-19  1:55       ` Shin'ichiro Kawasaki
@ 2026-06-19  4:57         ` Christoph Hellwig
  0 siblings, 0 replies; 9+ messages in thread
From: Christoph Hellwig @ 2026-06-19  4:57 UTC (permalink / raw)
  To: Shin'ichiro Kawasaki
  Cc: Eric Sandeen, Christoph Hellwig, Zorro Lang, Darrick J. Wong,
	Lukas Herbolt, linux-xfs, fstests

On Fri, Jun 19, 2026 at 10:55:21AM +0900, Shin'ichiro Kawasaki wrote:
> On Jun 18, 2026 / 09:23, Eric Sandeen wrote:
> > On 6/18/26 8:54 AM, Eric Sandeen wrote:
> > > On 6/18/26 8:48 AM, Christoph Hellwig wrote:
> > >> Disable concurrency scaling to avoid mismatching output on systems with
> > >> a large CPU count.
> > >>
> > >> Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
> > >> Signed-off-by: Christoph Hellwig <hch@lst.de>
> > > 
> > > I think this papers over what I still feel is a problem in mkfs.xfs
> > > behavior, but that's a different issue and making tests pass is good, so:
> > > 
> > > Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> > 
> > Er, hang on - let me retract that. Lukas sent a series to address
> > this problem too, right, and one of the things he added in his series
> > is a helper to determine whether the concurrency options even exist,
> > so that this can continue to run on older xfsprogs, which seems like
> > a good idea, no?
> > 
> > https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/commit/?h=for-next&id=7f162f5bcf50fc32c7e3b432e7ff189571a3151f
> > 
> > which added _scratch_mkfs_xfs_supports_concurrency()
> 
> I agree, I think we can add the change below on top of this patch.
> Regardless of the change, I confirmed that this patch avoids the failure
> that I reported. Thanks!

Thanks, I'll add that.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/2] xfs/216: disable all concurrency scaling
  2026-06-19  5:09 cpu scaling fixes v2 Christoph Hellwig
@ 2026-06-19  5:09 ` Christoph Hellwig
  0 siblings, 0 replies; 9+ messages in thread
From: Christoph Hellwig @ 2026-06-19  5:09 UTC (permalink / raw)
  To: Zorro Lang
  Cc: Darrick J. Wong, Lukas Herbolt, Eric Sandeen,
	Shin'ichiro Kawasaki, linux-xfs, fstests

This test currently disables log concurrency scaling, but even the
data device concurrency scaling can create mismatching output on
systems with a large CPU count.

Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 tests/xfs/216 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/xfs/216 b/tests/xfs/216
index 1749647c11f7..ce8bb528410b 100755
--- a/tests/xfs/216
+++ b/tests/xfs/216
@@ -23,7 +23,7 @@ _cleanup()
 _require_scratch
 _scratch_mkfs_xfs >/dev/null 2>&1
 if _scratch_mkfs_xfs_supports_concurrency -l >> $seqres.full 2>&1; then
-	loop_mkfs_opts="-l concurrency=0"
+	loop_mkfs_opts="-d concurrency=0 -l concurrency=0 -r concurrency=0"
 else
 	loop_mkfs_opts=""
 fi
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-06-19  5:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-18 13:48 cpu scaling fixes Christoph Hellwig
2026-06-18 13:48 ` [PATCH 1/2] xfs/078: disable all concurrency scaling Christoph Hellwig
2026-06-18 13:54   ` Eric Sandeen
2026-06-18 14:23     ` Eric Sandeen
2026-06-19  1:55       ` Shin'ichiro Kawasaki
2026-06-19  4:57         ` Christoph Hellwig
2026-06-18 13:48 ` [PATCH 2/2] xfs/216: " Christoph Hellwig
2026-06-19  1:57   ` Shin'ichiro Kawasaki
  -- strict thread matches above, loose matches on Subject: below --
2026-06-19  5:09 cpu scaling fixes v2 Christoph Hellwig
2026-06-19  5:09 ` [PATCH 2/2] xfs/216: disable all concurrency scaling Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox