summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2011-06-03 07:25:36 +0000
committermav <mav@FreeBSD.org>2011-06-03 07:25:36 +0000
commit73b08d6ce20693135690240bf465639a15556c86 (patch)
treec24493b97a95a1921264302247e5be0edc828d1e /sys/cam
parenta825a0b2413a0f6ead220d473bf893b5232a2476 (diff)
downloadFreeBSD-src-73b08d6ce20693135690240bf465639a15556c86.zip
FreeBSD-src-73b08d6ce20693135690240bf465639a15556c86.tar.gz
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.
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/ata/ata_da.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c
index f918956..8e93302 100644
--- a/sys/cam/ata/ata_da.c
+++ b/sys/cam/ata/ata_da.c
@@ -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];
OpenPOWER on IntegriCloud