Messages in this thread Patch in this message | | | Date | Mon, 5 Apr 1999 02:20:54 +0200 (CEST) | From | Andrea Arcangeli <> | Subject | Re: [patch] some buffer.c glitches |
| |
On Mon, 5 Apr 1999, Andrea Arcangeli wrote:
>Another thing that make me suspectious is that b_flushtime is not >explicitly set to 0 in the io_completation callback. If for some reason >it's not set to 0 (if brelse is called before starting I/O for example) we >may end syncing buffers to disk too early (but maybe I am missing >something about this flushtime issue).
From my current troubles I have the confirm that flushtime = 0 is needed in the io_completation callback.
My problem now is that with a real 50 delay before update will flush buffers back to disk, under heavy I/O, on my system dirty buffers have all the time grows too much and so mark_buffer_dirty is forced to call bdflush by hand, and this cause all processes to block waiting for bdflush I/O completation!!
So with this flushtime-bug fixed by my previous patch, in order to get performance back, I need to rebalance the system with sane sysctl values that previously wasn't needed due the flushtime-bug.
Index: buffer.c =================================================================== RCS file: /var/cvs/linux/fs/buffer.c,v retrieving revision 1.1.2.40 retrieving revision 1.1.2.42 diff -u -r1.1.2.40 -r1.1.2.42 --- buffer.c 1999/04/04 22:10:41 1.1.2.40 +++ linux/fs/buffer.c 1999/04/05 00:37:58 1.1.2.42 @@ -109,11 +109,11 @@ int dummy3; /* unused */ } b_un; unsigned int data[N_PARAM]; -} bdf_prm = {{40, 500, 64, 256, 15, 30*HZ, 5*HZ, 1884, 2}}; +} bdf_prm = {{80, 500, 64, 256, 15, 3*HZ, 5*HZ, 1884, 2}}; /* These are the min and max parameter values that we will allow to be assigned */ int bdflush_min[N_PARAM] = { 0, 10, 5, 25, 0, 1*HZ, 1*HZ, 1, 1}; -int bdflush_max[N_PARAM] = {100,5000, 2000, 2000,100, 600*HZ, 600*HZ, 2047, 5}; +int bdflush_max[N_PARAM] = {100,5000, 2000, 2000,100, 60*HZ, 600*HZ, 2047, 5}; void wakeup_bdflush(int); @@ -572,7 +572,7 @@ if (tmp->b_blocknr != block || tmp->b_size != size || tmp->b_dev != dev) continue; touch_buffer(tmp); - if (buffer_uptodate(tmp)) + if (!buffer_dirty(tmp)) put_last_lru(tmp); next = tmp; break; This way I get improved and my system doesn't stall as with the two previous patch applyed while doing heavy I/O.
The if (buffer_uptodate(tmp)) was wrong, I meant !buffer_dirty(tmp), the point is that I don't want to put dirty buffers in the top of the list in order to make sure to sync them, but it's not relevant for the performance system-completly-stalled-all-the-time issue. This third patch is against the two "stable" previous ones.
Andrea Arcangeli
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |