1 Apr 2003 01:03
Re: Delaying writes to disk when there's no need
Nick Piggin <piggin <at> cyberone.com.au>
2003-03-31 23:03:25 GMT
2003-03-31 23:03:25 GMT
Andrew Morton wrote:
>Nick Piggin <piggin <at> cyberone.com.au> wrote:
>
>
>>it seems to me that
>>doing writeout whenever the disk would otherwise be idle
>>(and we have dirty memory to write out) would be a good
>>solution.
>>
>>
>
>This is what the recently-removed BDI_read_active flag in backing_dev_info
>was supposed to be for. I let it go because I don't think it's terribly
>important and it's time to stop fiddling with the vfs writeout code and it
>wasn't right anyway.
>
>Note that 2.5 starts pdflush writeout at 10% of memory dirty. Or even lower
>if there is a lot of mapped memory around. Whereas 2.4 will start background
>writeout at 30% or 40% dirty. That's a fairly significant tuning change.
>
>The algorithm for utilisation of an idle disk should be, in
>balance_dirty_pages():
>
> if (ps.nr_dirty + ps.nr_writeback < background_thresh) {
> if (time_after(jiffies, bdi->last_read + HZ/100)) {
> if (bdi->write_requests_in_flight < 2) {
> struct writeback_control wbc = {
> .bdi = bdi,
(Continue reading)
RSS Feed