[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] tools/libxc: Document checkpoint compression in xg_save_restore.h
On Fri, Jun 24, 2011 at 4:54 AM, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx> wrote:
That was a good catch. I thought I ll keep the corner cases out of xg_save_restore.h but from the way you pointed out, I think I ll document everything. Answers below. Back in the original patch: compressed_data = (BEGIN_PAGE,<deltas>*) | (FULL_PAGE,4096 bytes) delta = <+ve offset in page (2byte), value (4byte)> BEGIN_PAGE = is a dummy delta with offset = -100 and value = 0 FULL_PAGE = is a dummy delta with offset = -101 and value = 0 So is the sequence: XC_SAVE_ID_COMPRESSED_DATA TAG N bytes of DATA, batch #1 Decompresses to e.g. 7 pages So now we have the originally specified 16 pages. The sequence goes like this. +16 +ve chunk unsigned long[16] PFN array NO page-data (because we've seen XC_SAVE_ID_ENABLE_COMPRESSION) +100 +ve chunk unsigned long[100] PFN array +50 (e.g.) +ve chunk unsigned long[50] PFN array XC_SAVE_ID_COMPRESSED_DATA TAG N Length of compressed data (no batches. explained below) N bytes of DATA Decompresses to e.g. 166 pages XC_SAVE_ID_* other xc save tags.. tailbuf Do we guarantee that Yes. If the number of dirty pages < the sender's page buffer size in xc_remus.c (not to be confused with pagebuf structure in xc_domain_restore), then there will be only one instance of XC_SAVE_ID_COMPRESSED_DATA, holding all the compressed pages. The page buffer can hold upto 8196 pages. So, most of the time, there will be only one XC_SAVE_ID_COMPRESSED_DATA, followed by the compressed chunk Are they always The order of compressed pages arriving, is same as the order in which they would have been sent if compression logic was not present. How does the sequence of events differ in the corner case of too many In case there are too many dirty pages, there would be a XC_SAVE_ID_COMPRESSED_DATA in the midst of an otherwise contiguous series of +ve chunks. For e.g. say if there are 9000 dirty pages, all of which are valid. +1024 +ve chunk (batch #1) unsigned long[1024] PFN array +1024 +ve chunk (batch #2) unsigned long[1024] PFN array +1024 +ve chunk (batch #3) unsigned long[1024] PFN array +1024 +ve chunk (batch #4) unsigned long[1024] PFN array +1024 +ve chunk (batch #5) unsigned long[1024] PFN array +1024 +ve chunk (batch #6) unsigned long[1024] PFN array +1024 +ve chunk (batch #7) unsigned long[1024] PFN array +1024 +ve chunk (batch #8) unsigned long[1024] PFN array XC_SAVE_ID_COMPRESSED_DATA TAG N #length of compressed data N bytes of DATA (decompresses to 8196 pages) +4 +ve chunk unsigned long[5] PFN array XC_SAVE_ID_COMPRESSED_DATA TAG M #length of compressed data M bytes of DATA (decompresses to 4 pages) XC_SAVE_ID_* other xc save tags.. tailbuf shriram Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |