freebsd-dev/sys/cddl/contrib/opensolaris/uts/common
Andriy Gapon 6470c31911 l2arc: pass correct size to trim requests
b_size is a logical size of a buffer in memory, b_asize is its physical
size that accounts for possible compression.
Currently the latter is the best approximation for the allocated, on-disk
size.

L2ARC TRIM support was committed a few weeks before L2ARC compression
was imported, so originally the code was correct, because b_size was
the size.

Further thoughts.  Given that the cache device is being overwritten
in a circular fashion it is not clear if a TRIM per each evicted L2ARC
buffer has any benefits.
Maybe it would be sufficient to issue a single trim request for the whole
device when it is loaded, e.g. after a bootup, or when it is unloaded, e.g.
before a shutdown.  At least as long as L2ARC is not persistent across
reboots.

Discussed with:	smh
MFC after:	19 says
2015-06-17 12:28:13 +00:00
..
ctf
dtrace CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
fs l2arc: pass correct size to trim requests 2015-06-17 12:28:13 +00:00
os Mechanically convert cddl sun #ifdef's to illumos 2015-01-17 14:44:59 +00:00
sys illumos compat: use flsl/flsll for highbit/highbit64 2015-06-17 12:05:04 +00:00
zmod
Makefile.files MFV r267565: 2014-07-01 06:43:15 +00:00