On Wed, Jun 30, 2010 at 01:55:30PM -0500, Marco Peereboom wrote:
> New drives have much more sophisticated IO queueing algorithms and
> posses much more information about the physical limitations of drive
> platters (or lack thereof) than an OS can ever hope to have.  So switch
> SCSI (and SATA) drives to use the shiny new bufq that does not sort IOs.
> Essentially this keeps IOs closer to the drive.
> 
> The impact I have seen is negligible noise in sequential IO however
> random IO seems to get a 20 - 25 % performance benefit.
> 
> I'd like to commit this soon so speak now or forever hold your piece.
> 

ok krw@

.... Ken

> Index: sd.c
> ===================================================================
> RCS file: /cvs/src/sys/scsi/sd.c,v
> retrieving revision 1.198
> diff -u -p -r1.198 sd.c
> --- sd.c      28 Jun 2010 08:35:46 -0000      1.198
> +++ sd.c      30 Jun 2010 18:38:20 -0000
> @@ -182,7 +182,11 @@ sdattach(struct device *parent, struct d
>        */
>       sc->sc_dk.dk_driver = &sddkdriver;
>       sc->sc_dk.dk_name = sc->sc_dev.dv_xname;
> -     sc->sc_bufq = bufq_init(BUFQ_DEFAULT);
> +
> +     if (SCSISPC(sc_link->inqdata.version) >= 2)
> +             sc->sc_bufq = bufq_init(BUFQ_FIFO);
> +     else
> +             sc->sc_bufq = bufq_init(BUFQ_DEFAULT);
>  
>       if ((sc_link->flags & SDEV_ATAPI) && (sc_link->flags & SDEV_REMOVABLE))
>               sc_link->quirks |= SDEV_NOSYNCCACHE;

Reply via email to