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

Liu Yuan namei.unix at gmail.com
Mon Oct 22 07:49:43 CEST 2012


On 10/22/2012 01:33 PM, MORITA Kazutaka wrote:
> 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.
> 

If disk is failed, I don't think buffered read/write will succeed
because we will fail to open the fd. So your rationale about unsafe
seems useless: no one will actually use it.

I think 'page' and 'unsafe' can be merged into one mode, which indicates
use page cache for storage backend IO.

>> > 
>> > 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?:
> 

I think 'pagecache' is kind of straight forward and descriptive. Both
'page' and 'unsafe' will need additional explanation to what it really
controls.

why pagecache to disk is strange? I think most users of Linux will be
familiar with page cache much more than other cache, for e.g, QEMU cache
mode. If you are concerned that users might be confused with 'disk
cache' and 'page cache', I'd suggest a new naming, 'gateway' for client
side cache as you suggest, and 'backend' for cluster side cache.

I think direct exposure of which side of settings to take effect is
better than umbrella all the settings inside.

Thanks,
Yuan




More information about the sheepdog mailing list