svn commit: r330932 - in head/sys: cam/nvme dev/nvme

Ravi Pokala rpokala at mac.com
Wed Mar 14 17:08:29 UTC 2018


Hi Warner,

The TRIM command takes a buffer of range structures, and this change consolidates multiple range structures into the buffer for a single TRIM command, correct? Whereas the old functionality was to populate the buffer with a single range structure?

So if we wanted to trim ranges [P..T], [A..E], [K..O], the old functionality would be:

    TRIM:[P..T] ; TRIM:[A..E] ; TRIM:[K..O]

The new functionality would be:

    TRIM:[P..T], [A..E], [K..O]

Right?

> +				/* XXX -- Could collapse adjacent ranges, but we don't for now */
> +				/* XXX -- Could limit based on total payload size */

And that future enhancement would make it:

    TRIM:[A..E], [K..T]

Is that correct?

Thanks,

Ravi (rpokala@)

-----Original Message-----
From: <owner-src-committers at freebsd.org> on behalf of Warner Losh <imp at FreeBSD.org>
Date: 2018-03-14, Wednesday at 09:44
To: <src-committers at freebsd.org>, <svn-src-all at freebsd.org>, <svn-src-head at freebsd.org>
Subject: svn commit: r330932 - in head/sys: cam/nvme dev/nvme

> Author: imp
> Date: Wed Mar 14 16:44:50 2018
> New Revision: 330932
> URL: https://svnweb.freebsd.org/changeset/base/330932
> 
> Log:
>   Implement trim collapsing in nda
>   
>   When multiple trims are in the queue, collapse them as much as
>   possible. At present, this usually results in only a few trims being
>   collapsed together, but more work on that will make it possible to do
>   hundreds (up to some configurable max).
>   
>   Sponsored by: Netflix





More information about the svn-src-head mailing list