freebsd-dev/sys
Xin LI 9e43a32a5c MFV r251519:
* Illumos ZFS issue #3805 arc shouldn't cache freed blocks

Quote from the Illumos issue:

    ZFS should proactively evict freed blocks from the cache.

    Even though these freed blocks will never be used again, and thus
    will eventually be evicted, this causes us to use memory
    inefficiently for 2 reasons:

    1. A block that is freed has no chance of being accessed again, but
       will be kept in memory preferentially to a block that was accessed
       before it (and is thus older) but has not been freed and thus has
       at least some chance of being accessed again.

    2. We partition the ARC into several buckets:
       user data that has been accessed only once (MRU)
       metadata that has been accessed only once (MRU)
       user data that has been accessed more than once (MFU)
       metadata that has been accessed more than once (MFU)

    The user data vs metadata split is somewhat arbitrary, and the
    primary control on how much memory is used to cache data vs metadata
    is to simply try to keep the proportion the same as it has been in the
    past (each bucket "evicts against" itself).  The secondary control is
    to evict data before evicting metadata.

    Because of this bucketing, we may end up with one bucket mostly
    containing freed blocks that are very old, while another bucket has
    more recently accessed, still-allocated blocks.  Data in the useful
    bucket (with still-allocated blocks) may be evicted in preference to
    data in the useless bucket (with old, freed blocks).

    On dcenter, we saw that the MFU metadata bucket was 230MB, while the
    MFU data bucket was 27GB and the MRU metadata bucket was 256GB.
    However, the vast majority of data in the MRU metadata bucket (256GB)
    was freed blocks, and thus useless.  Meanwhile, the MFU metadata bucket
    (230MB) was constantly evicting useful blocks that will be soon needed.

    The problem of cache segmentation is a larger problem that needs more
    investigation.  However, if we stop caching freed blocks, it should
    reduce the impact of this more fundamental issue.

MFC after:	2 weeks
2013-06-08 09:11:20 +00:00
..
amd64 Assert that interrupts are enabled in the trap handlers on x86 before 2013-06-03 17:40:05 +00:00
arm Merge in changes from NetBSD: 2013-06-08 07:16:22 +00:00
boot Convert old make variable modifiers :U and :L to bmake :tu and :tl. 2013-06-02 11:44:23 +00:00
bsm Implement chflagsat(2) system call, similar to fchmodat(2), but operates on 2013-03-21 22:59:01 +00:00
cam Simplify the checking of flags for cam_periph_mapmem(). This gets rid of 2013-06-07 00:22:38 +00:00
cddl MFV r251519: 2013-06-08 09:11:20 +00:00
compat Relax the vm object locking. Use a read lock. 2013-06-05 17:00:10 +00:00
conf Bring over the initial static bluetooth coexistence configuration 2013-06-07 09:02:02 +00:00
contrib Fix a false -> AH_FALSE. 2013-05-29 04:21:42 +00:00
crypto When porting XTS-related code from OpenBSD I forgot to update copyright (only 2013-02-20 22:59:53 +00:00
ddb
dev cxgbe/tom: Fix bad signed/unsigned mixup in the stid allocator. This 2013-06-08 07:23:26 +00:00
fs Add missing VM object unlocks in an error case. 2013-06-07 19:42:00 +00:00
gdb
geom MFP4 @222836 2013-05-30 01:19:02 +00:00
gnu/fs/reiserfs Garbage collect XFS bits which are now already completely disconnected 2013-03-02 15:33:54 +00:00
i386 Assert that interrupts are enabled in the trap handlers on x86 before 2013-06-03 17:40:05 +00:00
ia64 Driver 'aacraid' added. Supports Adaptec by PMC RAID controller families Series 6, 7, 8 and upcoming products. Older Adaptec RAID controller families are supported by the 'aac' driver. 2013-05-24 09:22:43 +00:00
isa
kern Do not compare the existing mask of a cpuset with a new mask when changing 2013-06-06 14:43:19 +00:00
kgssapi Isilon reported that sec=krb5p NFS mounts had a problem when m_len == 0 2013-05-01 22:07:55 +00:00
libkern Attempt to mitigate poor initialization of arc4 by one-shot 2013-04-19 00:30:52 +00:00
mips Don't assign the copyright to the FreeBSD foundation for the years 2013-05-29 16:51:03 +00:00
modules Bring over the initial static bluetooth coexistence configuration 2013-06-07 09:02:02 +00:00
net Properly set curvnet context in lagg_port_setlladdr() task handler. 2013-06-07 10:27:50 +00:00
net80211 Don't hold the node lock over the iterator. 2013-06-07 09:03:56 +00:00
netatalk Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
netgraph Fix several typos 2013-05-12 16:43:26 +00:00
netinet Disable IGMPv3 link timers on a transition to IGMPv2. 2013-06-07 17:12:08 +00:00
netinet6 Really fix netmask address family this time. 2013-05-19 19:42:46 +00:00
netipsec Use IP6STAT_INC/IP6STAT_DEC macros to update ip6 stats. 2013-04-09 07:11:22 +00:00
netipx
netnatm
netpfil Return meaningful error code from pf_state_key_attach() and 2013-05-11 18:06:51 +00:00
netsmb If the kernel is compiled with VMIMAGE support, the first attempt of 2013-05-04 16:55:48 +00:00
nfs Move the NFS FHA (File Handle Affinity) code from sys/nfsserver to 2013-04-17 22:42:43 +00:00
nfsclient - Convert the bufobj lock to rwlock. 2013-05-31 00:43:41 +00:00
nfsserver - Convert the bufobj lock to rwlock. 2013-05-31 00:43:41 +00:00
nlm
ofed Fxi a bunch of typos. 2013-05-10 16:41:26 +00:00
opencrypto When porting XTS-related code from OpenBSD I forgot to update copyright (only 2013-02-20 22:59:53 +00:00
pc98 MFi386: revision 251039 2013-06-01 12:21:59 +00:00
pci - Corrrect mispellings of word useful 2013-04-17 11:45:15 +00:00
powerpc Pad the PCPU MD struct, to satisfy an assert added with the projects/counters 2013-06-04 00:40:26 +00:00
rpc Fix a potential socket leak in the NFS server. If a client closes its 2013-04-08 19:03:01 +00:00
security Relax the vm object locking in mac_proc_vm_revoke_recurse(). A read lock 2013-06-04 17:23:09 +00:00
sparc64 o Relax locking assertions for vm_page_find_least() 2013-05-21 20:38:19 +00:00
sys Add ATOMIC_*_LOCK_FREE constants. 2013-06-03 20:52:20 +00:00
teken
tools Further refine the handling of stop signals in the NFS client. The 2013-02-21 19:02:50 +00:00
ufs - Convert the bufobj lock to rwlock. 2013-05-31 00:43:41 +00:00
vm Complete r251452: 2013-06-06 18:19:26 +00:00
x86 Add basic support for FDT to i386 & amd64. This change includes: 2013-05-21 03:05:49 +00:00
xdr Use m_get() and m_getcl() instead of compat macros. 2013-03-15 10:21:18 +00:00
xen Fix loss of the emulated keyboard on Xen PV HVM domains. 2013-05-22 19:22:44 +00:00
Makefile Remove netncp cscope entry missed in r248097 2013-03-12 14:21:52 +00:00