Discussion:
[TuxOnIce-devel] Git push done but read this.
Nigel Cunningham
2015-01-28 10:43:28 UTC
Permalink
Hi all.

As I type, the first git push in some months is being sent to github.

I'm doing so with some caveats - on my laptop, it is not yet working
perfectly. It is most reliable when I disable saving the image in 2
pagesets (echo 1 > /sys/power/tuxonice/no_pageset2), but even then it
sometimes hangs on atomic restore but works if I then press the power
button for 4 seconds, power the machine back up and try the resume again.

If you try using 2 pagesets, please expect memory corruption and
potentially on-disk corruption. You have been warned!

The version I'm testing is current HEAD - what will become 3.19. I've
not yet backported the code to 3.18 or earlier.

Significant changes since the last push:
- In 3.17, upstream reworked the storage of memory bitmaps, requiring a
fair bit of work from me to get things going again.
- Back around 3.8, the means of generating the page tables for the
atomic restore was changed. TuxOnIce versions from then until now
reverted that change as I hadn't been able to get TuxOnIce to work with
the changes. I've now sorted out that issue and am using the new version.
- There's a new trace_debug_on sysfs entry. I've been using this when
running TuxOnIce in a qemu VM, with console output going to a X terminal
on the host. If you capture the whole console output into a text file,
then feed the text file to the new scripts/tuxonice_output_to_csv.sh,
you'll get a CSV crosstab of what happens to each page. The script takes
the name of the input file (assuming no spaces) and produces a CSV with
".csv" appended to the original name. It tries to open the file in
Libreoffice.

Regards,

Nigel
Oleksandr Natalenko
2015-02-21 13:12:25 UTC
Permalink
Hello.

One of my users has reported that TuxOnIce patch (regardless of whether it is
enabled in kernel config or not) breaks 32-bit kernel compiling with the
following errors (I guess that is related to memory bitmap rework):

===
CC kernel/power/process.o
CC kernel/power/suspend.o
CC kernel/power/hibernate.o
CC kernel/power/snapshot.o
kernel/power/snapshot.c:1140:14: error: conflicting types for
‘saveable_highmem_page’
struct page *saveable_highmem_page(struct zone *zone, unsigned long pfn)
^
In file included from kernel/power/snapshot.c:42:0:
kernel/power/power.h:280:14: note: previous declaration of
‘saveable_highmem_page’ was here
extern void *saveable_highmem_page(struct zone *z, unsigned long p);
^
kernel/power/snapshot.c: In function ‘alloc_highmem_pages’:
kernel/power/snapshot.c:1834:3: error: too few arguments to function
‘memory_bm_set_bit’
memory_bm_set_bit(bm, page_to_pfn(page));
^
kernel/power/snapshot.c:743:6: note: declared here
void memory_bm_set_bit(struct memory_bitmap *bm, int index, unsigned long
pfn)
^
kernel/power/snapshot.c: At top level:
kernel/power/snapshot.c:1942:14: error: static declaration of
‘check_image_kernel’ follows non-static declaration
static char *check_image_kernel(struct swsusp_info *info)
^
In file included from kernel/power/snapshot.c:42:0:
kernel/power/power.h:40:14: note: previous declaration of ‘check_image_kernel’
was here
extern char *check_image_kernel(struct swsusp_info *info);
^
kernel/power/snapshot.c: In function ‘count_highmem_image_pages’:
kernel/power/snapshot.c:2196:8: error: too few arguments to function
‘memory_bm_next_pfn’
pfn = memory_bm_next_pfn(bm);
^
kernel/power/snapshot.c:851:15: note: declared here
unsigned long memory_bm_next_pfn(struct memory_bitmap *bm, int index)
^
kernel/power/snapshot.c:2201:9: error: too few arguments to function
‘memory_bm_next_pfn’
pfn = memory_bm_next_pfn(bm);
^
kernel/power/snapshot.c:851:15: note: declared here
unsigned long memory_bm_next_pfn(struct memory_bitmap *bm, int index)
^
kernel/power/snapshot.c: In function ‘prepare_highmem_image’:
kernel/power/snapshot.c:2246:4: error: too few arguments to function
‘memory_bm_set_bit’
memory_bm_set_bit(bm, page_to_pfn(page));
^
kernel/power/snapshot.c:743:6: note: declared here
void memory_bm_set_bit(struct memory_bitmap *bm, int index, unsigned long
pfn)
^
In file included from ./arch/x86/include/asm/page.h:70:0,
from ./arch/x86/include/asm/thread_info.h:11,
from include/linux/thread_info.h:54,
from ./arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:18,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from kernel/power/snapshot.c:14:
kernel/power/snapshot.c: In function ‘get_highmem_page_buffer’:
kernel/power/snapshot.c:2304:21: error: too few arguments to function
‘memory_bm_next_pfn’
tmp = pfn_to_page(memory_bm_next_pfn(safe_highmem_bm));
^
include/asm-generic/memory_model.h:30:41: note: in definition of macro
‘__pfn_to_page’
#define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
^
kernel/power/snapshot.c:2304:9: note: in expansion of macro ‘pfn_to_page’
tmp = pfn_to_page(memory_bm_next_pfn(safe_highmem_bm));
^
kernel/power/snapshot.c:851:15: note: declared here
unsigned long memory_bm_next_pfn(struct memory_bitmap *bm, int index)
^
===

and

===
CC kernel/power/hibernate.o
CC kernel/power/snapshot.o
kernel/power/snapshot.c:1942:14: error: static declaration of
‘check_image_kernel’ follows non-static declaration
static char *check_image_kernel(struct swsusp_info *info)
^
In file included from kernel/power/snapshot.c:42:0:
kernel/power/power.h:40:14: note: previous declaration of ‘check_image_kernel’
was here
extern char *check_image_kernel(struct swsusp_info *info);
^
===

How one could fix that?
--
Oleksandr post-factum Natalenko, MSc
pf-kernel community
https://natalenko.name/
Oleksandr Natalenko
2015-02-22 10:46:50 UTC
Permalink
Nigel,

please consider reviewing attached patches. Two of them address mentioned
issue. One more fixes compiling with TOI disabled.
Post by Oleksandr Natalenko
Hello.
One of my users has reported that TuxOnIce patch (regardless of whether it
is enabled in kernel config or not) breaks 32-bit kernel compiling with the
...
How one could fix that?
--
Oleksandr post-factum Natalenko, MSc
pf-kernel community
https://natalenko.name/
Nigel Cunningham
2015-02-22 10:57:32 UTC
Permalink
Hi!
Post by Oleksandr Natalenko
Nigel,
please consider reviewing attached patches. Two of them address mentioned
issue. One more fixes compiling with TOI disabled.
Thanks for the patches.

I've been doing some work on your report this evening and have therefore
already applied some of what you've prepared. That said, I hadn't tried
completely disabling TuxOnIce and so hadn't done the whole lot. I'll
apply what remains.

Thanks very much!

Nigel

Loading...