Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Dec 2010 23:33:27 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Kirk McKusick <mckusick@mckusick.com>
Cc:        freebsd-fs@freebsd.org, Oliver Fromme <olli@lurza.secnetix.de>
Subject:   Re: TRIM support for UFS?
Message-ID:  <20101208223327.GD1884@garage.freebsd.pl>
In-Reply-To: <201012082223.oB8MNqGV020879@chez.mckusick.com>
References:  <20101208214909.GH33073@deviant.kiev.zoral.com.ua> <201012082223.oB8MNqGV020879@chez.mckusick.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--JwB53PgKC5A7+0Ej
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Dec 08, 2010 at 02:23:52PM -0800, Kirk McKusick wrote:
> The above patch looks good though I would do it unconditionally
> (e.g., also for snapshots). It seems sensible to make it conditional
> on a sysctl variable so that folks could experiment with it more
> easily. And I would leave it off by default as non-SSD disks are
> unlikely to benefit from it. If it does prove useful for SSD disks
> then I would make it conditional on a filesystem flag so that it
> is possible to enable it on a filesystem-by-filesystem basis (e.g.,
> on for filesystems on the SSD and off for the rest).

We already have a flag for disks: DISKFLAG_CANDELETE, which tells if the
disk support TRIM or not. Next we should add BIO_GETATTR attribute for
DISK class to return true if TRIM is supported. This way UFS can ask if
TRIM is supported on mount and don't bother sending BIO_DELETE if it is
not supported.

--=20
Pawel Jakub Dawidek                       http://www.wheelsystems.com
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--JwB53PgKC5A7+0Ej
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAk0AB7YACgkQForvXbEpPzShTQCdEkP+WCZcl+x7DX2SP/RsxdRH
WboAoOAHVCwYe1VMjxRZQcY8ZKrw8vkI
=TvTM
-----END PGP SIGNATURE-----

--JwB53PgKC5A7+0Ej--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101208223327.GD1884>