Subject: Re: New device buffer queue strategy
To: None <current-users@netbsd.org>
From: Bang Jun-Young <junyoung@mogua.com>
List: current-users
Date: 09/03/2002 10:37:21
On Mon, Sep 02, 2002 at 04:05:40PM +0200, Juergen Hannken-Illjes wrote:
> A new device buffer queue strategy is available for testing.
> 
> The current implementation of disksort (a min seek sort) doesn't perform
> very well with long queues of outstanding requests. Especially with
> softdeps this is a very common situation. As all requests are ordered the
> read latency may become very high.
> 
> The new strategy keeps disksort for write-requests while read-requests are
> put on a second queue with first-come first-serve strategy.
> Read-requests are served before write-requests.
> 
> While the overall I/O performance is the same, the system becomes more
> responsive under high I/O load.
> 
> To test this strategy:
> 
> - lookup the `bufq_alloc' call in your favorite disk driver:
> 
>   ! sys/dev/scsipi/sd.c: bufq_alloc(&sd->buf_queue, BUFQ_DISKSORT|BUFQ_SORT_RAWBLOCK);
> 
> - replace the BUFQ_DISKSORT argument by BUFQ_READ_PRIO.
> 
>   ! sys/dev/scsipi/sd.c: bufq_alloc(&sd->buf_queue, BUFQ_READ_PRIO|BUFQ_SORT_RAWBLOCK);
> 
> - recompile kernel and test.
> 
> Comments and improvements are welcome.

After patching sys/dev/ata/wd.c as described above, my machine is much
more responsive than before when I do 'cvs update'. Thanks!

Jun-Young

-- 
Bang Jun-Young <junyoung@mogua.com>