[sheepdog] [PATCH 0/2] add cache options 'page' and 'unsafe'

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Mon Oct 22 07:33:16 CEST 2012


At Mon, 22 Oct 2012 13:08:08 +0800,
Liu Yuan wrote:
> 
> On 10/22/2012 11:13 AM, MORITA Kazutaka wrote:
> > This series introduces cache options 'page', which uses a page cache
> > on storage nodes for vdi cache, and 'unsafe', which doesn't sync at
> > all.
> > 
> > 'page' is useful when VMs are running on different cluster from sheeps
> > and we can use a lot of memory on sheep nodes for a Sheepdog VDI
> > cache.
> > 
> > 'unsafe' is useful when a datacenter can provide a reliable power and
> > we are unlikely to lose in-memory data.  We can also use this option
> > for testing purpose.
> 
> How can we assure that page cache won't be flushed to disk? I think we
> can only do with autonomous pages via mmap(). Page cache will be flushed
> back periodically by kernel.
> 
> > 
> > 
> 
> I don't quite understand this unsafe mode. It looks the same to me as page.

I don't intend to avoid a flush completely with 'unsafe' mode.  The
difference between 'page' and 'unsafe' is that sheep doesn't call
syncfs even if a VM sends a flush request.

> 
> I think your patch set is going to finer-control the fd flags for page
> cache. So I think we can control it via disk cache, like disk:pagecache.
> 
> I am more concerned that the cache mode setting might look too
> complicated to end users.

'disk' means a disk cache of a local disk, so disk:pagecache looks
strange to me.  I think we should more descriptive names for caches.
There are two kinds of sheepdog caches; one uses a memory on storage
nodes and the other one uses a memory on gateway.  How about the
following?:

 cache=gateway:[options] <- current 'object' cache
 cache=storage:[options] <- current 'disk', 'page', or 'unsafe' caches

Thanks,

Kazutaka



More information about the sheepdog mailing list