lkml.org 
[lkml]   [2010]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 13/23] Hibernation: Partial page I/O support.
Hi.

On 14/10/10 07:28, Rafael J. Wysocki wrote:
> On Wednesday, October 13, 2010, Pavel Machek wrote:
>> Hi!
>>
>>> Add functions that can be used for coalescing and splitting buffers
>>> that are smaller than PAGE_SIZE. These functions provide no method
>>> of determining where the boundaries of the smaller buffers are to
>>> be found - that is the caller's problem.
>>
>> I don't get it; why do we need that support?
>
> This is related to compression. This way we can put data from two or more
> compressed pages into one page frame.

It also provides a simple way of putting information from multiple
sources into a larger-than-at-the-moment header:

- Which pfns are stored
- What swap extents are used
- What devices are used (dev_t, UUID, last mount time for each)
- Whether compression is enabled and what algo is used (if made
configurable)

and so on.

I do see the logic to Pavel's question though - the last set of patches
I sent didn't switch the compression code over to using this support.
That change would make their usefulness a lot clearer.

Regarding speed, I haven't measured the difference but would expect that
the cost of combining and splitting pages in this way would be less than
that of waiting on extra I/O. In addition, if we merge the pages in this
way, our image size will be much closer to the compression ratio and
will therefore make it more feasible for us to estimate how much storage
is needed, taking into account an expected compression ratio (which is
what TuxOnIce currently does).

Regards,

Nigel


\
 
 \ /
  Last update: 2010-10-13 23:21    [from the cache]
©2003-2011 Jasper Spaans