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];
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to