diff options
author | Brian Behlendorf <[email protected]> | 2015-03-17 15:08:22 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-03-20 10:35:20 -0700 |
commit | bc88866657979c5658441e201e19df365c67ddfe (patch) | |
tree | 2725fb8c50d648642b2d3a9f10b0114aeb8aff0b /module/zfs/spa_stats.c | |
parent | 2cbb06b561f500732de2214eb590149d0c4f3cf5 (diff) |
Fix arc_adjust_meta() behavior
The goal of this function is to evict enough meta data buffers from the
ARC in order to enforce the arc_meta_limit. Achieving this is slightly
more complicated than it appears because it is common for data buffers
to have holds on meta data buffers. In addition, dnode meta data buffers
will be held by the dnodes in the block preventing them from being freed.
This means we can't simply traverse the ARC and expect to always find
enough unheld meta data buffer to release.
Therefore, this function has been updated to make alternating passes
over the ARC releasing data buffers and then newly unheld meta data
buffers. This ensures forward progress is maintained and arc_meta_used
will decrease. Normally this is sufficient, but if required the ARC
will call the registered prune callbacks causing dentry and inodes to
be dropped from the VFS cache. This will make dnode meta data buffers
available for reclaim. The number of total restarts in limited by
zfs_arc_meta_adjust_restarts to prevent spinning in the rare case
where all meta data is pinned.
Signed-off-by: Brian Behlendorf <[email protected]>
Signed-off-by: Pavel Snajdr <[email protected]>
Issue #3160
Diffstat (limited to 'module/zfs/spa_stats.c')
0 files changed, 0 insertions, 0 deletions