From: David Sterba <dsterba@suse.cz>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Filipe Manana <fdmanana@kernel.org>,
Zorro Lang <zlang@kernel.org>,
fstests@vger.kernel.org,
linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [ANNOUNCE] fstests: for-next branch updated to v2025.02.23
Date: Fri, 28 Feb 2025 12:54:15 +0100 [thread overview]
Message-ID: <20250228115415.GD5777@twin.jikos.cz> (raw)
In-Reply-To: <20250227175221.GA1124788@frogsfrogsfrogs>
On Thu, Feb 27, 2025 at 09:52:21AM -0800, Darrick J. Wong wrote:
> > ...
> > (Run 'diff -u /home/fdmanana/git/hub/xfstests/tests/btrfs/140.out
> > /home/fdmanana/git/hub/xfstests/results//btrfs/140.out.bad' to see
> > the entire diff)
> > btrfs/141 1s ... [failed, exit status 1]- output mismatch (see
> > /home/fdmanana/git/hub/xfstests/results//btrfs/141.out.bad)
> > --- tests/btrfs/141.out 2024-06-04 12:18:50.084308982 +0100
> > +++ /home/fdmanana/git/hub/xfstests/results//btrfs/141.out.bad
>
> ...which I never saw because I don't have SCRATCH_DEV_POOL set up. :(
>
> I traced it to this code:
>
> while [[ -z $( (( BASHPID % nr_mirrors == mirror )) &&
> exec $XFS_IO_PROG \
> -c "pread -b $size $offset $size" $file) ]]; do
> :
> done
>
> If memory serves, btrfs' raid rotoring is based on the global pid
> number, right? If so, then this is broken with the new run_privatens
> isolation (i.e. the commit you referenced) because the pids that the
> test program sees are private to that namespace.
>
> IOWS, the subprocesses created in the loop test might appear to have
> pids 3 -> 4 -> 5, but those could very well be 100, 200, 300 in the
> global namespace, in which case all reads go to the same mirror
> (assuming nr_mirrors==2 as it does in btrfs/140).
>
> A really shitty hack around that is this:
>
> for ((i = 0; i < (nr_mirrors * 4); i++)); do
> $XFS_IO_PROG -c "pread -b $size $offset $size" $file
> done >> $seqres.full
>
> but now we're just hoping that reading 8x actually manages to hit both
> mirrors at some point in this test. But that doesn't work reliably in
> btrfs/141 even if I turn it up from 4 to 11.
>
> Is there *any* other way to trigger read from a specific mirror?
Yes, but it's still in the experimental build. There's another
algorithm to pick the mirror based on the load so we're departing from
the pid based selection in the long run.
We can skip the tests that depend on the pids which seem to be even more
unpredictable with the namespaces. This will reduce the test coverage in
non-developer builds but the test is not something critical I guess.
next prev parent reply other threads:[~2025-02-28 11:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <67bb1448.500a0220.af3ac.9928SMTPIN_ADDED_BROKEN@mx.google.com>
2025-02-27 13:32 ` [ANNOUNCE] fstests: for-next branch updated to v2025.02.23 Filipe Manana
2025-02-27 17:52 ` Darrick J. Wong
2025-02-28 11:54 ` David Sterba [this message]
2025-03-01 17:22 ` Zorro Lang
2025-03-04 18:37 ` Darrick J. Wong
2025-02-23 12:27 Zorro Lang
2025-02-23 19:30 ` Darrick J. Wong
2025-02-24 5:48 ` Zorro Lang
2025-02-24 22:04 ` Dave Chinner
2025-02-25 9:00 ` Zorro Lang
2025-02-28 12:33 ` David Sterba
2025-02-28 17:33 ` Darrick J. Wong
2025-03-01 1:01 ` Theodore Ts'o
2025-03-01 14:08 ` Zorro Lang
2025-03-02 13:13 ` Filipe Manana
2025-03-02 14:50 ` Theodore Ts'o
2025-03-02 16:18 ` Zorro Lang
2025-03-02 18:42 ` Filipe Manana
2025-03-02 15:37 ` Zorro Lang
2025-03-02 19:02 ` Filipe Manana
2025-03-02 19:56 ` Zorro Lang
2025-03-01 16:50 ` Zorro Lang
2025-03-04 18:58 ` Darrick J. Wong
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=20250228115415.GD5777@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=djwong@kernel.org \
--cc=fdmanana@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=zlang@kernel.org \
/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