Jens Axboe 78f707bfc7 block: revert part of 18ce3751ccd488c78d3827e9f6bf54e6322676fb
The above commit added WRITE_SYNC and switched various places to using
that for committing writes that will be waited upon immediately after
submission. However, this causes a performance regression with AS and CFQ
for ext3 at least, since sync_dirty_buffer() will submit some writes with
WRITE_SYNC while ext3 has sumitted others dependent writes without the sync
flag set. This causes excessive anticipation/idling in the IO scheduler
because sync and async writes get interleaved, causing a big performance
regression for the below test case (which is meant to simulate sqlite
like behaviour).

---- test case ----

int main(int argc, char **argv)
{

	int fdes, i;
	FILE *fp;
	struct timeval start;
	struct timeval end;
	struct timeval res;

	gettimeofday(&start, NULL);
	for (i=0; i<ROWS; i++) {
		fp = fopen("test_file", "a");
		fprintf(fp, "Some Text Data\n");
		fdes = fileno(fp);
		fsync(fdes);
		fclose(fp);
	}
	gettimeofday(&end, NULL);

	timersub(&end, &start, &res);
	fprintf(stdout, "time to write %d lines is %ld(msec)\n", ROWS,
			(res.tv_sec*1000000 + res.tv_usec)/1000);

	return 0;
}

-------------------

Thanks to Sean.White@APCC.com for tracking down this performance
regression and providing a test case.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-02-18 10:32:01 +01:00
..
2009-01-22 13:16:01 +03:00
2009-01-22 13:15:56 +03:00
2009-01-22 13:15:56 +03:00
2009-01-22 13:16:01 +03:00
2009-01-22 13:15:57 +03:00
2009-01-22 13:15:57 +03:00
2009-01-22 13:16:01 +03:00
2009-01-22 13:15:58 +03:00
2009-01-22 13:15:57 +03:00
2009-01-22 13:15:55 +03:00
2009-01-22 13:15:58 +03:00
2009-01-22 13:15:57 +03:00
2009-01-22 13:15:57 +03:00
2009-01-22 13:15:59 +03:00
2008-11-14 10:39:25 +11:00
2009-01-22 13:15:55 +03:00
2009-01-09 21:05:21 +00:00
2009-01-22 13:15:54 +03:00
2009-01-22 13:15:58 +03:00
2009-01-22 13:16:00 +03:00
2008-10-17 02:38:36 +11:00
2009-01-22 13:15:55 +03:00
2009-01-22 13:15:58 +03:00
2009-01-22 13:15:59 +03:00
2009-01-22 13:15:53 +03:00
2009-01-22 13:15:59 +03:00
2009-01-22 13:16:01 +03:00
2009-01-22 13:15:58 +03:00
2009-01-22 13:15:59 +03:00
2009-01-29 16:34:30 +02:00
2009-01-22 13:15:55 +03:00
2009-01-22 13:16:00 +03:00
2008-12-31 18:07:43 -05:00
2009-01-03 11:45:54 -08:00
2009-02-06 17:34:07 -08:00
2009-01-30 12:34:36 +01:00
2009-02-05 16:35:52 -08:00
2009-02-07 08:46:18 +11:00
2009-01-16 18:02:10 +01:00
2009-02-07 08:46:18 +11:00
2009-01-06 15:59:09 -08:00
2009-02-07 08:46:18 +11:00
2009-01-22 13:16:01 +03:00
2009-02-17 14:02:08 -08:00