On Wed, 2003-05-28 at 11:39, Jens Axboe wrote: > Correction then, it doesn't appear to be starvation in the usual sense. > But you are right, pulling some stats out of the situation would be > nice. I still can't reproduce here. Well, it's not pretty but it gets some numbers out there. This patch only calculates the time spent waiting in __get_request_wait, it isn't interested in any other metrics. stats are per-queue and are reset when you mount the FS, you get a print out either when you unmount the FS or when you run elvtune /dev/xxx (no other args, just enough to trigger the read ioctl). The output looks like this (after a dbench 50 run 2.4.21-rc6) device 03:04: num_req 12248, total jiffies waited 26729 417 forced to wait 1 min wait, 432 max wait 64 average wait 314 < 100, 62 < 200, 20 < 300, 20 < 400, 1 < 500 0 waits longer than 500 jiffies It tells us there were 12248 total requests (merges don't count), and that we spent 26,729 jiffies waiting in __get_request_wait. We had to wait 417 times, the minimum was 1 and the max was 432 jiffies. The line with the < signs is a simple way to get the deviations. 314 requests waited < 100 jiffies, 62 requests waited less than 200 jiffies, etc. People who see stalls on UP machines and have seen improvements by playing with code in drivers/block/ll_rw_blk.c are encouraged to try getting numbers with this patch applied. It will make it easier to figure things out. I haven't tried Andrea's fix-pausing on top of this yet, any rejects should be minor. -chris