2001-02-18 19:25:47

by Mark Hemment

[permalink] [raw]
Subject: [PATCH] HIGHMEM+buffers

Hi,

On a 4GB SMP box, configured with HIGHMEM support, making a 670G
(obviously using a volume manager) ext2 file system takes 12minutes (over
10minutes of sys time).

One problem is buffer allocations do not use HIGHMEM, but the
nr_free_buffer_pages() doesn't take this into account causing
balance_dirty_state() to return the wrong state.

The attached patch fixes the worse part of nr_free_buffer_pages() - with
HIGHMEM it now only counts free+inactive pages in the NORMAL and DMA
zone. It doesn't fix the inactive_dirty calculation.
Also, in buffer.c:flush_dirty_buffers(), it is worthwhile to kick the
disk queues if it decides to reschedule.

With the patch, that 670G filesystem can be created in 5m36secs (under
half the time).

Patch is against 2.4.1-ac18.

Mark


Attachments:
buffer.patch (2.85 kB)
buffer.patch