• Mikulas Patocka's avatar
    dm bufio: introduce a global cache replacement · 6e913b28
    Mikulas Patocka authored
    This commit introduces a global cache replacement (instead of per-client
    cleanup).
    
    If one bufio client uses the cache heavily and another client is not using
    it, we want to let the first client use most of the cache. The old
    algorithm would partition the cache equally betwen the clients and that is
    sub-optimal.
    
    For cache replacement, we use the clock algorithm because it doesn't
    require taking any lock when the buffer is accessed.
    Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    6e913b28
dm-bufio.c 48.7 KB