Subject: Re: Smoother writing for LFS
To: Thor Lancelot Simon <firstname.lastname@example.org>
From: Konrad Schroder <email@example.com>
Date: 10/24/2006 13:51:51
On Mon, 23 Oct 2006, Thor Lancelot Simon wrote:
>> For LFS, this is almost done already. We keep a per-filesystem page
>> count, though it may be somewhat inaccurate since it isn't kept by the VM
>> system itself.
> How does the count get incremented?
In lfs_register_block(), which is called from lfs_balloc(). Calls to
VOP_WRITE(), then, are always counted, but that may only be a subset of
the dirty pages as UVM sees them. I remember thinking at one point that
only mmap() would escape notice, but I'm not sure if that's true.
>> In the past when I've tried doing something like what you're describing,
>> performance always degraded, so I didn't pursue it further.
> Did you limit the amount written? My thought is to trickle out writes a
> few segments at a time, to avoid the furious bursts of activity
No, we hadn't yet made error returns from lfs_putpages() work right, and
that's how this limitation would have to be implemented. Up until that
point any event that caused anything to be written to disk has caused
everything to be written to disk (more or less; reclaiming empty vnodes
comes to mind as an exception). Exploring how limiting bandwidth in
various cases affects performance is on my list, but I can't say when I'll
have time for that :^/