DragonFlyBSD/src 50a1f59sys/bus/pci pcivar.h, sys/vfs/ufs ffs_alloc.c

kernel - Remove duplicate TRIM, only trim with the 'trim' mount opt

* ffs_blkfree_cg() was improperly issuing a synchronous
  VOP_FREEBLKS() on the underlying device.  This issues a
  BUF_CMD_FREEBLKS stategy op to the underlying device,
  which is executed unconditionally.  This basically runs
  an unconditional TRIM whether the 'trim' mount flag is
  specified or not.

  Remove the VOP_FREEBLKS() call.

* For softupdates operation, ffs_blkfree() handles the
  'trim' mount flag by issuing a BUF_CMD_FREEBLKS and
  sequencing the call to ffs_blkfree_cg() when it completes.

  When 'trim' was enabled, *two* TRIM operations were being
  executed on the underlying device, and prior to our fix,
  if 'trim' was not enabled, *one* TRIM operation would
  still be executed instead of zero.

* In many situations... possibly even most situations,
  trim operations seriously reduce performance due to
  being serialized by AHCI or by the target device.  It
  is not as useful as people often think it should be
  on normal filesystems.

* The removal of the unconditional TRIM significantly improves
  UFS performance, meaning primarily installkernel's
  since DragonFly doesn't use UFS for its main filesystem by
  default any more.

* The 'trim' mount option for UFS will still work as advertised
  when coupled with softupdates.
DeltaFile
+7-1sys/vfs/ufs/ffs_alloc.c
+0-5sys/bus/pci/pcivar.h
+7-62 files

UnifiedSplitRaw