Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7dc56e31 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Martijn Coenen
Browse files

BACKPORT: dm bufio: introduce a global cache replacement



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>
(cherry picked from commit 6e913b28cd279212c4580dbd8b2cf9dcd4740cfb)

Bug: 136247322
Change-Id: Iad25b7058d3da32ae07959a348fa75178ff9c860
Signed-off-by: default avatarMartijn Coenen <maco@android.com>
parent b9fd9eb4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment