qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH RFC v2 07/22] block/pcache: introduce LRU as met


From: Kevin Wolf
Subject: Re: [Qemu-block] [PATCH RFC v2 07/22] block/pcache: introduce LRU as method of memory
Date: Fri, 2 Sep 2016 10:49:24 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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 <address@hidden>
> ---
>  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]