Date: Fri, 3 Jun 2011 07:25:37 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r222643 - head/sys/cam/ata Message-ID: <201106030725.p537PbJb053276@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Fri Jun 3 07:25:36 2011 New Revision: 222643 URL: http://svn.freebsd.org/changeset/base/222643 Log: Increase maximum supported number of ranges per TRIM command from 256 to 512 to use full potential of Intel X25-M SSDs. On synthetic test with 32K ranges it gives about 20% speedup, which probably costs more then 2K of RAM. Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Fri Jun 3 06:58:24 2011 (r222642) +++ head/sys/cam/ata/ata_da.c Fri Jun 3 07:25:36 2011 (r222643) @@ -114,9 +114,9 @@ struct disk_params { u_int64_t sectors; /* Total number sectors */ }; -#define TRIM_MAX_BLOCKS 4 +#define TRIM_MAX_BLOCKS 8 #define TRIM_MAX_RANGES (TRIM_MAX_BLOCKS * 64) -#define TRIM_MAX_BIOS (TRIM_MAX_RANGES * 8) +#define TRIM_MAX_BIOS (TRIM_MAX_RANGES * 4) struct trim_request { uint8_t data[TRIM_MAX_RANGES * 8]; struct bio *bps[TRIM_MAX_BIOS];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106030725.p537PbJb053276>