mfrw / compcache

Automatically exported from code.google.com/p/compcache
0 stars 0 forks source link

Can't activate swap on ramzswap0 with backing swap #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using the latest hg version of compcache (0.6 doesn't compile for my
kernel) with the git tuxonice kernel sources. I can use ramzswap without a
backing swap partition, but trying to activate swap with one fails:

[root@alice rc.d]# insmod /usr/local/compcache/ramzswap.ko num_devices=1
[root@alice rc.d]# rzscontrol /dev/ramzswap0 -b /dev/sda5 -m 315392 --init
[root@alice rc.d]# swapon /dev/ramzswap0
swapon: /dev/ramzswap0: read swap header failed: Input/output error
[root@alice rc.d]# dmesg
[93071.135559] ramzswap: Creating 1 devices ...
[93085.448967] ramzswap: Backing swap set to /dev/sda5
[93085.448975] ramzswap: Memory limit set to 315392 kB
[93085.448980] ramzswap: Using backing swap device: /dev/sda5
[93106.126079] __ratelimit: 122 callbacks suppressed
[93106.126086] Buffer I/O error on device ramzswap0, logical block 0
[93106.126094] Buffer I/O error on device ramzswap0, logical block 1
[93106.126100] Buffer I/O error on device ramzswap0, logical block 2
[93106.126106] Buffer I/O error on device ramzswap0, logical block 3
[93106.126116] Buffer I/O error on device ramzswap0, logical block 4
[93106.126122] Buffer I/O error on device ramzswap0, logical block 5
[93106.126128] Buffer I/O error on device ramzswap0, logical block 6
[93106.126134] Buffer I/O error on device ramzswap0, logical block 7
[93106.126143] Buffer I/O error on device ramzswap0, logical block 8
[93106.126149] Buffer I/O error on device ramzswap0, logical block 9

Original issue reported on code.google.com by andrew.m...@gmail.com on 19 Oct 2009 at 8:45

GoogleCodeExporter commented 9 years ago
If i understand correctly, you might get these errors only during swapon and 
should
be harmless. During normal swap operation you should never get these messages.

Can you please confirm if ramzswap is working properly after these error 
messages stop?

Original comment by nitingupta910@gmail.com on 20 Oct 2009 at 6:37

GoogleCodeExporter commented 9 years ago
No, after those actions swap is still not active - presumably because the kernel
can't do I/O on the block device. If I use it without a backing partition, it 
works fine.

Original comment by andrew.m...@gmail.com on 20 Oct 2009 at 11:38

GoogleCodeExporter commented 9 years ago
I also get this problem with a vanilla Ubuntu 9.10 kernel (2.6.31-4) and latest 
hg 
(changeset 91:3368f940c43d, branch v0.5.x), in a 32bit Virtual Box VM.

Original comment by gma...@gmail.com on 3 Nov 2009 at 2:31

GoogleCodeExporter commented 9 years ago
I just noticed that I *can* get it to work with a swap *file* on one of my
filesystems, although I need to run mkswap on ramzswap0 before swapon will work.
Still no luck with the swap partition. sda5 is a logical partition within an 
extended
partition, should this matter?

Original comment by andrew.m...@gmail.com on 13 Nov 2009 at 5:01

GoogleCodeExporter commented 9 years ago
> I just noticed that I *can* get it to work with a swap *file* on one of my
filesystems, although I need to run mkswap on ramzswap0 before swapon will work.

I just submitted a potential fix to the repository. Can you please try that?
Please do not run mkswap on ramzswap0 -- this is an invalid operation and can 
lead to
random behavior.

> Still no luck with the swap partition. sda5 is a logical partition within an
extended partition, should this matter?

No.

Original comment by nitingupta910@gmail.com on 13 Nov 2009 at 5:52

GoogleCodeExporter commented 9 years ago
No change with that commit. Same error as before starting swap with /dev/sda5 as
backing swap, and I get only this if I use a file as backing swap:
swapon: /dev/ramzswap0: read swap header failed: Invalid argument

There is no error logged in dmesg when using a swapfile.

Original comment by andrew.m...@gmail.com on 14 Nov 2009 at 5:59

GoogleCodeExporter commented 9 years ago
> No change with that commit.

My bad. I just committed changes locally and forgot to 'push' them to 
repository. I
will let you know when this is done.

Original comment by nitingupta910@gmail.com on 14 Nov 2009 at 12:17

GoogleCodeExporter commented 9 years ago
I just pushed the change. Can you please try now?

Original comment by nitingupta910@gmail.com on 14 Nov 2009 at 2:23

GoogleCodeExporter commented 9 years ago
It's working properly on /dev/sda5 now. The on-filesystem swapfile still 
produces the
same results as before.

Original comment by andrew.m...@gmail.com on 14 Nov 2009 at 10:42

GoogleCodeExporter commented 9 years ago
I patched in the page_size changes and within a few hours I got 3 random 
reboots.  This is on android 
1.6 running kernel 2.6.#9

Original comment by dwa...@gmail.com on 19 Nov 2009 at 5:29

GoogleCodeExporter commented 9 years ago
Can you please check with latest version in repository ("default" branch). Its 
all
working fine on my side.

Original comment by nitingupta910@gmail.com on 21 Jan 2010 at 2:03

GoogleCodeExporter commented 9 years ago
I see this on 2.6.33-rc4-00403-gaab9732 .. 64bit Box.

.....

[94187.144624] ramzswap: module is from the staging directory, the quality is
unknown, you have been warned.
[94187.145240] ramzswap: Creating 4 devices ...
[94198.664035] ramzswap: Backing swap set to /dev/sdb3
[94198.664040] ramzswap: Using backing swap device: /dev/sdb3
[94198.664050] ramzswap: Memory limit not set.
[94198.664053] ramzswap: Using default: smaller of (15% of RAM) and (backing 
disk
size).
[94215.895730] ramzswap: Backing swap set to /dev/sdb3
[94215.895734] ramzswap: Using backing swap device: /dev/sdb3
[94215.895740] ramzswap: Memory limit not set.
[94215.895743] ramzswap: Using default: smaller of (15% of RAM) and (backing 
disk
size).
[94227.040752] ramzswap: Backing swap set to /dev/sdb3
[94227.040757] ramzswap: Using backing swap device: /dev/sdb3
[94227.040763] ramzswap: Memory limit not set.
[94227.040765] ramzswap: Using default: smaller of (15% of RAM) and (backing 
disk
size).
[94231.360990] ramzswap: Backing swap set to /dev/sdb3
[94231.360994] ramzswap: Using backing swap device: /dev/sdb3
[94231.361000] ramzswap: Memory limit not set.
[94231.361002] ramzswap: Using default: smaller of (15% of RAM) and (backing 
disk
size).
[94262.409096] quiet_error: 122 callbacks suppressed
[94262.409100] Buffer I/O error on device ramzswap0, logical block 0
[94262.409103] Buffer I/O error on device ramzswap0, logical block 1
[94262.409106] Buffer I/O error on device ramzswap0, logical block 2
[94262.409108] Buffer I/O error on device ramzswap0, logical block 3
[94262.409112] Buffer I/O error on device ramzswap0, logical block 4
[94262.409114] Buffer I/O error on device ramzswap0, logical block 5
[94262.409116] Buffer I/O error on device ramzswap0, logical block 6
[94262.409119] Buffer I/O error on device ramzswap0, logical block 7
[94262.409122] Buffer I/O error on device ramzswap0, logical block 8
[94262.409125] Buffer I/O error on device ramzswap0, logical block 9
[94270.137109] quiet_error: 122 callbacks suppressed

.....

It seems fixed in your repository since when I use the code from there and not 
the
in-kernel code it works.

Original comment by niX.or....@gmail.com on 22 Jan 2010 at 12:35

GoogleCodeExporter commented 9 years ago
> It seems fixed in your repository since when I use the code from there and 
not the
in-kernel code it works.

Thanks for verification. I will push the same fix to mainstream kernel too.

Original comment by nitingupta910@gmail.com on 22 Jan 2010 at 12:55