Am 29.08.2016 um 19:10 hat Pavel Butsykin geschrieben: > This is a simple solution to the problem of displacement of cache memory. > The LRU can be useful to avoid the displacement of the nodes, which have > been partially read. > > Signed-off-by: Pavel Butsykin <pbutsy...@virtuozzo.com> > --- > block/pcache.c | 74 > +++++++++++++++++++++++++++++++++++++++++++++------------- > 1 file changed, 58 insertions(+), 16 deletions(-) > > diff --git a/block/pcache.c b/block/pcache.c > index 54d4526..7504db8 100644 > --- a/block/pcache.c > +++ b/block/pcache.c > @@ -67,6 +67,11 @@ typedef struct ReqStor { > CoMutex lock; > } tree; > > + struct { > + QTAILQ_HEAD(lru_head, BlockNode) list; > + CoMutex lock;
This is another lock that doesn't do anything. > + } lru; > + > uint32_t curr_size; > } ReqStor; Kevin