freebsd-dev/module
Brian Behlendorf 68121a03da Allow arc_evict_ghost() to only evict meta data
The default behavior of arc_evict_ghost() is to start by evicting
data buffers.  Then only if the requested number of bytes to evict
cannot be satisfied by data buffers move on to meta data buffers.

This is ideal for honoring arc_c since it's preferable to keep the
meta data cached.  However, if we're trying to free memory from the
arc to honor the meta limit it's a problem because we will need to
discard all the data to get to the meta data.

To avoid this issue the arc_evict_ghost() is now passed a fourth
argumented describing which buffer type to start with.  The
arc_evict() function already behaves exactly like this for a
same reason so this is consistent with the existing code.

All existing callers have been updated to pass ARC_BUFC_DATA so
this patch introduces no functional change.  New callers may
pass ARC_BUFC_METADATA to skip immediately to evicting meta
data leaving the normal data untouched.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2013-08-09 10:06:08 -07:00
..
avl Add script for builtin module building. 2012-07-26 13:45:09 -07:00
nvpair Register correct handlers in nvlist_alloc() 2013-06-20 09:58:15 -07:00
unicode Add script for builtin module building. 2012-07-26 13:45:09 -07:00
zcommon Add snapdev=[hidden|visible] dataset property 2013-03-05 12:37:54 -08:00
zfs Allow arc_evict_ghost() to only evict meta data 2013-08-09 10:06:08 -07:00
zpios Refresh links to web site 2013-03-06 15:46:41 -08:00
.gitignore gitignore: anchor entries at their respective directory 2013-04-02 10:50:17 -07:00
Makefile.in Add KMODDIR to install target 2013-03-06 15:46:40 -08:00