[Top] [All Lists]

Re: [RFC] xfs: remedy small writes during wrapped-log recovery

To: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
Subject: Re: [RFC] xfs: remedy small writes during wrapped-log recovery
From: "Michael L. Semon" <mlsemon35@xxxxxxxxx>
Date: Sun, 11 Jan 2015 20:04:42 -0500
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=+bc/WP8TVpnjDEGPUt6UJsyo1ccsmf1M241Cyw/10TI=; b=z8pognOJT9xLNguRLlPO9uSdWDd8ApCUJqzepW8aas7NebfpIRTRJjCDoFEaitilI+ C8X4JKzNHXobsg38ZIrVFgbozGdZT0EsFSZZq1n5jzwWHP+d/VPgTg0dRKY9m+350fjZ yG8JXd/QK9PlGlvUErILNBFu5EjjkPFpSRElFq465nh3qZntLcC7BWGFypHiryzWDW3i 2TZ4iX1uYvjg36HA8fRdi7K6jNs99zpWgUbCmYBwiQng3VoVd2UIyTHult3hcjV9IbOh uswj07x3QEscH6nfOqdRaDnltaZuvwKht0981GzCynG1yi3KMhZzY39Iyx4GyEncEC26 ixyg==
In-reply-to: <54B033ED.9010805@xxxxxxxxx>
References: <54B033ED.9010805@xxxxxxxxx>
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
On 01/09/15 15:02, Michael L. Semon wrote:
> A bisect still needs to be done to determine when the slow mount 
> behavior started.  It could very well be that somebody fixed the 
> buffer_io_error messages that I saw long ago, and the solution made 
> some mounts here rather miserable.

OK, I looked at this part.  bisect was unhelpful, so I checked out 
kernel from -stable.  Lo and behold, the issue was there, 
too.  This means that Brian and Dave are right, that my hardware 
is slow and contended.  I'll add that the hardware gets worse with 
time and testing.  Something could still be made better here.

The test case I use is to copy xfsprogs source to $SCRATCH_MNT 
and do mount/touch/umount cycles, allowing the log to become 
wrapped and then unwrapped.  Run it through at least two cycles 
so you see that the new-FS case and repaired-FS case have 
different timings on v5 XFS.

Write caches are off for tests here.  The way hard drive write cache 
is shut off here is to have "/sbin/hdparm -W 0 /dev/sda" at the top 
of the first boot script.  It provides extra integrity during udev-
related catastrophes on boot, but slow mounts are made more obvious 
this way.

This test script should hopefully work (current cruft trimmed down 
while writing this E-mail):


mkfs.xfs -f -m crc=1,finobt=1 $SCRATCH_DEV
echo -n "Files copied... "
cp -av $xfsprogs_src $SCRATCH_MNT/ | wc -l

while true; do
        for a in `seq 1 75`; do
                echo "Loop $b, Pass $a:"
                time mount $SCRATCH_DEV $SCRATCH_MNT
                find $SCRATCH_MNT/xfsprogs -type f -exec touch {} \;
                umount $SCRATCH_MNT
                # Uncomment this to correlate wrapped logs with 
                # errors from xfs_logprint:
                # xfs_logprint $SCRATCH_DEV | grep "^xfs_logprint"
        xfs_repair -v $SCRATCH_DEV

Really, though, the best way to spot this is to add a line of 
printk() to xlog_bwrite() and see how many times it is called on 
each mount.  In my opinion, it should be called not many times 
more for a wrapped-log mount than for a normal-log mount.



<Prev in Thread] Current Thread [Next in Thread>