<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/power/snapshot.c, branch v2.6.19</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/power/snapshot.c?h=v2.6.19</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/power/snapshot.c?h=v2.6.19'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2006-10-02T14:57:21Z</updated>
<entry>
<title>[PATCH] namespaces: utsname: use init_utsname when appropriate</title>
<updated>2006-10-02T14:57:21Z</updated>
<author>
<name>Serge E. Hallyn</name>
<email>serue@us.ibm.com</email>
</author>
<published>2006-10-02T09:18:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=96b644bdec977b97a45133e5b4466ba47a7a5e65'/>
<id>urn:sha1:96b644bdec977b97a45133e5b4466ba47a7a5e65</id>
<content type='text'>
In some places, particularly drivers and __init code, the init utsns is the
appropriate one to use.  This patch replaces those with a the init_utsname
helper.

Changes: Removed several uses of init_utsname().  Hope I picked all the
	right ones in net/ipv4/ipconfig.c.  These are now changed to
	utsname() (the per-process namespace utsname) in the previous
	patch (2/7)

[akpm@osdl.org: CIFS fix]
Signed-off-by: Serge E. Hallyn &lt;serue@us.ibm.com&gt;
Cc: Kirill Korotaev &lt;dev@openvz.org&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Herbert Poetzl &lt;herbert@13thfloor.at&gt;
Cc: Andrey Savochkin &lt;saw@sw.ru&gt;
Cc: Serge Hallyn &lt;serue@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] swsusp: Use memory bitmaps during resume</title>
<updated>2006-09-26T15:49:02Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2006-09-26T06:32:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=940864ddabdb180e02041c4dcd46ba6f9eee732f'/>
<id>urn:sha1:940864ddabdb180e02041c4dcd46ba6f9eee732f</id>
<content type='text'>
Make swsusp use memory bitmaps to store its internal information during the
resume phase of the suspend-resume cycle.

If the pfns of saveable pages are saved during the suspend phase instead of
the kernel virtual addresses of these pages, we can use them during the resume
phase directly to set the corresponding bits in a memory bitmap.  Then, this
bitmap is used to mark the page frames corresponding to the pages that were
saveable before the suspend (aka "unsafe" page frames).

Next, we allocate as many page frames as needed to store the entire suspend
image and make sure that there will be some extra free "safe" page frames for
the list of PBEs constructed later.  Subsequently, the image is loaded and, if
possible, the data loaded from it are written into their "original" page
frames (ie.  the ones they had occupied before the suspend).

The image data that cannot be written into their "original" page frames are
loaded into "safe" page frames and their "original" kernel virtual addresses,
as well as the addresses of the "safe" pages containing their copies, are
stored in a list of PBEs.  Finally, the list of PBEs is used to copy the
remaining image data into their "original" page frames (this is done
atomically, by the architecture-dependent parts of swsusp).

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] swsusp: Introduce memory bitmaps</title>
<updated>2006-09-26T15:49:02Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2006-09-26T06:32:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b788db79896ef2a5817b9395ad63573b254a6d93'/>
<id>urn:sha1:b788db79896ef2a5817b9395ad63573b254a6d93</id>
<content type='text'>
Introduce the memory bitmap data structure and make swsusp use in the suspend
phase.

The current swsusp's internal data structure is not very efficient from the
memory usage point of view, so it seems reasonable to replace it with a data
structure that will require less memory, such as a pair of bitmaps.

The idea is to use bitmaps that may be allocated as sets of individual pages,
so that we can avoid making allocations of order greater than 0.  For this
reason the memory bitmap structure consists of several linked lists of objects
that contain pointers to memory pages with the actual bitmap data.  Still, for
a typical system all of these lists fit in a single page, so it's reasonable
to introduce an additional mechanism allowing us to allocate all of them
efficiently without sacrificing the generality of the design.  This is done
with the help of the chain_allocator structure and associated functions.

We need to use two memory bitmaps during the suspend phase of the
suspend-resume cycle.  One of them is necessary for marking the saveable
pages, and the second is used to mark the pages in which to store the copies
of them (aka image pages).

First, the bitmaps are created and we allocate as many image pages as needed
(the corresponding bits in the second bitmap are set as soon as the pages are
allocated).  Second, the bits corresponding to the saveable pages are set in
the first bitmap and the saveable pages are copied to the image pages.
Finally, the first bitmap is used to save the kernel virtual addresses of the
saveable pages and the second one is used to save the contents of the image
pages.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] swsusp: Introduce some helpful constants</title>
<updated>2006-09-26T15:49:02Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2006-09-26T06:32:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0bcd888d64684f896ffa70c1d16a42b00753c184'/>
<id>urn:sha1:0bcd888d64684f896ffa70c1d16a42b00753c184</id>
<content type='text'>
Introduce some constants that hopefully will help improve the readability of
code in kernel/power/snapshot.c.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Change the name of pagedir_nosave</title>
<updated>2006-09-26T15:49:01Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2006-09-26T06:32:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=75534b50cc658e951bcb213c2763c81e9f7b0b48'/>
<id>urn:sha1:75534b50cc658e951bcb213c2763c81e9f7b0b48</id>
<content type='text'>
The name of the pagedir_nosave variable does not make sense any more, so it
seems reasonable to change it to something more meaningful.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] swsusp: Fix alloc_pagedir</title>
<updated>2006-09-26T15:48:59Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2006-09-26T06:32:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cd560bb2f9e2cd451bb3942af43da19632ba4a8e'/>
<id>urn:sha1:cd560bb2f9e2cd451bb3942af43da19632ba4a8e</id>
<content type='text'>
Get rid of the FIXME in kernel/power/snapshot.c#alloc_pagedir() and
simplify the functions called by it.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] swsusp: Reorder memory-allocating functions</title>
<updated>2006-09-26T15:48:59Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2006-09-26T06:32:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f6143aa60ed71e58578bc92cc64d98158a694d99'/>
<id>urn:sha1:f6143aa60ed71e58578bc92cc64d98158a694d99</id>
<content type='text'>
Move some functions in kernel/power/snapshot.c to a better place (in the
same file) and introduce free_image_page() (will be necessary in the
future).

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] swsusp: Fix mark_free_pages</title>
<updated>2006-09-26T15:48:59Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2006-09-26T06:32:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f623f0db8e6aa86a37be86167e4ff478821a9f4f'/>
<id>urn:sha1:f623f0db8e6aa86a37be86167e4ff478821a9f4f</id>
<content type='text'>
Clean up mm/page_alloc.c#mark_free_pages() and make it avoid clearing
PageNosaveFree for PageNosave pages.  This allows us to get rid of an ugly
hack in kernel/power/snapshot.c#copy_data_pages().

Additionally, the page-copying loop in copy_data_pages() is moved to an
inline function.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] swsusp: struct snapshot_handle cleanup</title>
<updated>2006-09-26T15:48:58Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2006-09-26T06:32:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fb13a28b0f5ada60861868c4fa48a12bd0cb8dea'/>
<id>urn:sha1:fb13a28b0f5ada60861868c4fa48a12bd0cb8dea</id>
<content type='text'>
Add comments describing struct snapshot_handle and its members, change the
confusing name of its member 'page' to 'cur'.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] swsusp: clean up browsing of pfns</title>
<updated>2006-09-26T15:48:58Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2006-09-26T06:32:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ae83c5eef59ffe6eb61110b8c8fd1ea3e0881712'/>
<id>urn:sha1:ae83c5eef59ffe6eb61110b8c8fd1ea3e0881712</id>
<content type='text'>
Clean up some loops over pfns for each zone in snapshot.c: reduce the
number of additions to perform, rework detection of saveable pages and make
the code a bit less difficult to understand, hopefully.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
