Re: [PATCH] mm/tracking dirty pages: update get_dirty_limits for mmap tracking

Martin Bligh
2006-06-21T18:14:16Z

> -int vm_dirty_ratio = 40;
> +int vm_dirty_ratio = 80;

I don't think you can do that. Because ...

> unsigned long available_memory = total_pages;
...
> + dirty = (vm_dirty_ratio * available_memory) / 100;

... there are other things in memory besides pagecache. Limiting
dirty pages to 80% of pagecache might be fine, but not 80%
of total memory.

dirty = (vm_dirty_ratio * (nr_active + nr_inactive)) / 100

might be more sensible. Frankly the whole thing is a crock
anyway, because we should be counting easily freeable clean
pages, not dirty pages, but still.

M.