linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Allison Henderson <allison.henderson@oracle.com>
To: "Darrick J. Wong" <djwong@kernel.org>, guaneryu@gmail.com
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me
Subject: Re: [PATCH 1/8] xfs/172: disable test when file writes don't use delayed allocation
Date: Fri, 9 Jul 2021 16:38:35 -0700	[thread overview]
Message-ID: <1174710a-d9cb-54a0-993f-e1ed410305be@oracle.com> (raw)
In-Reply-To: <162561727244.543423.13321546742830675478.stgit@locust>



On 7/6/21 5:21 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> This test tries to exploit an interaction between delayed allocation and
> writeback on full filesystems to see if it can trip up the filestreams
> allocator.  The behaviors do not present if the filesystem allocates
> space at write time, so disable it under these scenarios.
Ok, makes sense
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>

> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---
>   tests/xfs/172 |   30 +++++++++++++++++++++++++++++-
>   1 file changed, 29 insertions(+), 1 deletion(-)
> 
> 
> diff --git a/tests/xfs/172 b/tests/xfs/172
> index 0d1b441e..c0495305 100755
> --- a/tests/xfs/172
> +++ b/tests/xfs/172
> @@ -16,9 +16,37 @@ _begin_fstest rw filestreams
>   
>   # real QA test starts here
>   _supported_fs xfs
> -
> +_require_command "$FILEFRAG_PROG" filefrag
>   _require_scratch
>   
> +# The first _test_streams call sets up the filestreams allocator to fail and
> +# then checks that it actually failed.  It does this by creating a very small
> +# filesystem, writing a lot of data in parallel to separate streams, and then
> +# flushes the dirty data, also in parallel.  To trip the allocator, the test
> +# relies on writeback combining adjacent dirty ranges into large allocation
> +# requests which eventually bleed across AGs.  This happens either because the
> +# big writes are slow enough that filestreams contexts expire between
> +# allocation requests, or because the AGs are so full at allocation time that
> +# the bmapi allocator decides to scan for a less full AG.  Either way, stream
> +# directories share AGs, which is what the test considers a success.
> +#
> +# However, this only happens if writes use the delayed allocation code paths.
> +# If the kernel allocates small amounts of space at the time of each write()
> +# call, the successive small allocations never trip the bmapi allocator's
> +# rescan thresholds and will keep pushing out the expiration time, with the
> +# result that the filestreams allocator succeeds in maintaining the streams.
> +# The test considers this a failure.
> +#
> +# Make sure that a regular buffered write produces delalloc reservations.
> +# This effectively disables the test for files with extent size hints or DAX
> +# mode set.
> +_scratch_mkfs > $seqres.full
> +_scratch_mount
> +$XFS_IO_PROG -f -c 'pwrite 0 64k' $SCRATCH_MNT/testy &> /dev/null
> +$FILEFRAG_PROG -v $SCRATCH_MNT/testy 2>&1 | grep -q delalloc || \
> +	_notrun "test requires delayed allocation buffered writes"
> +_scratch_unmount
> +
>   _check_filestreams_support || _notrun "filestreams not available"
>   
>   # test reaper works by setting timeout low. Expected to fail
> 

  reply	other threads:[~2021-07-09 23:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07  0:21 [PATCHSET 0/8] fstests: random fixes Darrick J. Wong
2021-07-07  0:21 ` [PATCH 1/8] xfs/172: disable test when file writes don't use delayed allocation Darrick J. Wong
2021-07-09 23:38   ` Allison Henderson [this message]
2021-07-07  0:21 ` [PATCH 2/8] generic/561: hide assertions when duperemove is killed Darrick J. Wong
2021-07-09 23:38   ` Allison Henderson
2021-07-10  1:25     ` Darrick J. Wong
2021-07-07  0:21 ` [PATCH 3/8] shared/298: fix random deletion when filenames contain spaces Darrick J. Wong
2021-07-09 23:39   ` Allison Henderson
2021-07-07  0:21 ` [PATCH 4/8] dmthin: erase the metadata device properly before starting Darrick J. Wong
2021-07-09 23:39   ` Allison Henderson
2021-07-18 14:20   ` Eryu Guan
2021-07-18 14:32   ` Eryu Guan
2021-07-07  0:21 ` [PATCH 5/8] check: run _check_filesystems in an OOM-happy subshell Darrick J. Wong
2021-07-07  0:21 ` [PATCH 6/8] xfs/084: fix test program status collection and processing Darrick J. Wong
2021-07-07  0:21 ` [PATCH 7/8] generic/371: disable speculative preallocation regressions on XFS Darrick J. Wong
2021-07-09 23:50   ` Allison Henderson
2021-07-07  0:21 ` [PATCH 8/8] generic/019: don't dump cores when fio/fsstress hit io errors Darrick J. Wong
2021-07-09 23:39   ` Allison Henderson
2021-07-18 14:35 ` [PATCHSET 0/8] fstests: random fixes Eryu Guan

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=1174710a-d9cb-54a0-993f-e1ed410305be@oracle.com \
    --to=allison.henderson@oracle.com \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=guan@eryu.me \
    --cc=guaneryu@gmail.com \
    --cc=linux-xfs@vger.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;
as well as URLs for NNTP newsgroup(s).