Graham, Simon
2007-Feb-21 15:06 UTC
RE: [Xen-devel] [PATCH][TOOLS] Reducing impact ofdomainsave/restore/dump on Dom0
> > Reduce impact of saving/restoring/dumping large domains on Dom0 > memory > > usage by means of fadvise64() to tell the OS to discard the cache > pages > > used for the save/dump file. > > > > Signed-off-by: Simon Graham <Simon.Graham@stratus.com> > > Could the fadvise() logic be shared more than it is in this patch?Also> you > sometimes sync-then-fadvise. Is this just a performance enhancement > (presumably fadvise wouldn''t simply discard dirty pages in the buffer > cache)? >1. You mean putting the fsync/fadvise in a common utility routine? I can do that. 2. sync-then-advise is only done at the end of writing a file to ensure that all of the cached pages are discarded. Whilst writing the file, I only fadvise which triggers a write back and discards any clean pages up to the specified offset. This is indeed a performance thing -- fsyncing on every write makes it very slow. Updated patch will follow... _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2007-Feb-21 15:10 UTC
Re: [Xen-devel] [PATCH][TOOLS] Reducing impact ofdomainsave/restore/dump on Dom0
On 21/2/07 15:06, "Graham, Simon" <Simon.Graham@stratus.com> wrote:> 2. sync-then-advise is only done at the end of writing a file to ensure > that all > of the cached pages are discarded. Whilst writing the file, I only > fadvise > which triggers a write back and discards any clean pages up to the > specified offset. > This is indeed a performance thing -- fsyncing on every write makes > it very slow.Do you need the fsync at all? It''s possible that the kernel will launder-then-discard the affected pages automatically, just from the fadvise() alone. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel