Re: [PATCH 0/3] VM throttling: avoid blocking occasional writers

From: Andrew Morton
Date: Thu Mar 15 2007 - 15:09:26 EST


> On Wed, 14 Mar 2007 21:42:46 +0900 Tomoki Sekiyama <tomoki.sekiyama.qu@xxxxxxxxxxx> wrote:
>
> ...
>
>
> -Solution:
>
> I consider that all of the dirty pages for the disk have been written
> back and that the disk is clean if a process cannot write 'write_chunk'
> pages in balance_dirty_pages().
>
> To avoid using up the free memory with dirty pages by passing blocking,
> this patchset adds a new threshold named vm.dirty_limit_ratio to sysctl.
>
> It modifies balance_dirty_pages() not to block when the amount of
> Dirty+Writeback is less than vm.dirty_limit_ratio percent of the memory.
> In the other cases, writers are throttled as current Linux does.
>
>
> In this patchset, vm.dirty_limit_ratio, instead of vm.dirty_ratio, is
> used as the clamping level of Dirty+Writeback. And, vm.dirty_ratio is
> used as the level at which a writers will itself start writeback of the
> dirty pages.

Might be a reasonable solution - let's see what Peter comes up with too.

Comments on the patch:

- Please don't VM_DIRTY_LIMIT_RATIO: just use CTL_UNNUMBERED and leave
sysctl.h alone.

- The 40% default is already too high. Let's set this new upper limit to
40% and decrease he non-blocking ratio.

- Please update the procfs documentation in ./Docmentation/

- I wonder if dirty_limit_ratio is the best name we could choose.
vm_dirty_blocking_ratio, perhaps? Dunno.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/