Re: Errors in the VM - detailed

From: Jens Axboe (axboe@suse.de)
Date: Thu Jan 31 2002 - 15:29:09 EST


On Thu, Jan 31 2002, Roger Larsson wrote:
> Wait a minute - it might be readahead that gets killed.
> If I remember correctly READA requests are dropped when failing to allocate
> space for it - yes I did...

s/allocate/retrieve

No allocation takes place.

> /usr/src/develop/linux/drivers/block/ll_rw_block.c:746 (earlier kernel)
>
> /*
> * Grab a free request from the freelist - if that is empty, check
> * if we are doing read ahead and abort instead of blocking for
> * a free slot.
> */
> get_rq:
> if (freereq) {
> req = freereq;
> freereq = NULL;
> } else if ((req = get_request(q, rw)) == NULL) {
> spin_unlock_irq(&io_request_lock);
> if (rw_ahead)
> goto end_io;
>
> freereq = __get_request_wait(q, rw);
> goto again;
> }
>
> Suppose we fail with get_request, the request is a rw_ahead,
> it quits... => no read ahead.
>
> Try to add a prink there...
> if (rw_ahead) {
> printk("Skipping readahead...\n");
> goto end_io;
> }

That will trigger _all the time_ even on a moderately busy machine.
Checking if tossing away read-ahead is the issue is probably better
tested with just increasing the request slots. Roy, please try and change
the queue_nr_requests assignment in ll_rw_blk:blk_dev_init() to
something like 2048.

-- 
Jens Axboe

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:01:38 EST