[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080819105638.aae4086f.akpm@linux-foundation.org>
Date: Tue, 19 Aug 2008 10:56:38 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: rwheeler@...hat.com
Cc: Andreas Dilger <adilger@....com>, Josef Bacik <jbacik@...hat.com>,
linux-kernel@...r.kernel.org, tglx@...utronix.de,
linux-fsdevel@...r.kernel.org, chris.mason@...cle.com,
linux-ext4@...r.kernel.org
Subject: Re: [PATCH 2/2] improve ext3 fsync batching
On Tue, 19 Aug 2008 07:01:11 -0400 Ric Wheeler <rwheeler@...hat.com> wrote:
> It would be great to be able to use this batching technique for faster
> devices, but we currently sleep 3-4 times longer waiting to batch for an
> array than it takes to complete the transaction.
Obviously, tuning that delay down to the minimum necessary is a good
thing. But doing it based on commit-time seems indirect at best. What
happens on a slower disk when commit times are in the tens of
milliseconds? When someone runs a concurrent `dd if=/dev/zero of=foo'
when commit times go up to seconds?
Perhaps a better scheme would be to tune it based on how many other
processes are joining that transaction. If it's "zero" then decrease
the timeout. But one would need to work out how to increase it, which
perhaps could be done by detecting the case where process A runs an
fsync when a commit is currently in progress, and that commit was
caused by process B's fsync.
But before doing all that I would recommend/ask that the following be
investigated:
- How effective is the present code?
- What happens when it is simply removed?
- Add instrumentation (a counter and a printk) to work out how
many other tasks are joining this task's transaction.
- If the answer is "zero" or "small", work out why.
- See if we can increase its effectiveness.
Because it could be that the code broke. There might be issues with
higher-level locks which are preventing the batching. For example, if
all the files which the test app is syncing are in the same directory,
perhaps all the tasks are piling up on that directory's i_mutex?
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists