qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache


From: Kevin Wolf
Subject: Re: [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache
Date: Fri, 24 Apr 2015 15:04:06 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 24.04.2015 um 14:50 hat Alberto Garcia geschrieben:
> On Fri 24 Apr 2015 02:37:21 PM CEST, Stefan Hajnoczi wrote:
> 
> >> I think it would be nice to have a way to free unused cache entries
> >> after a while.
> >
> > Do you think mmap plus a periodic timer would work?
> >
> > I'm hesitant about changes like this because they make QEMU more
> > complex, slow down the guest, and make the memory footprint volatile.
> > But if a simple solution addresses the problem, then I'd be happy.
> 
> I understand. One possible approach would be to use the timer only if
> the cache size requested by the user is large, so
> 
>  1) we only try to save memory when the amount of memory to save is
>     significant.
>  2) we don't make the default scenario slower.
> 
> I'll try to see if I can come up with a good solution (and with more
> numbers).

I suspect that at this point, Anthony would have reminded us about
separation of policy and mechanism. The very least we need is some
option to control the policy (probably defaulting to no automatic cache
size changes).

The other option would be to let the management tool change the cache
size options at runtime (and as it happens, my current bdrv_reopen()
overhaul allows just that - except that a QMP interface isn't planned
yet), but I'm not sure if it has enough information to make good
decisions. If we know what the criteria are, they could possibly be
exposed, though.

Kevin



reply via email to

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