mfrw / compcache

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

Compcache 0.6 don't make with android kernel (2.6.27) #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  Make some change on Makefile to use arm arch and android kernel
2. try to build

What version of the product are you using? On what operating system?
0.6 on android (arm)

Please provide any additional information below.

Log of the compilation :

compcache 0.6 don't make correctly, i have some errors : 

make -C "/media/Divers/Android/SOURCES/Galaxy/ORG/BSP/kernel_2.6.27/" \

M=/media/Divers/Android/SOURCES/compcache/sub-projects/allocators/xvmalloc-kmod
modules
make[1]: entrant dans le répertoire «
/media/Divers/Android/SOURCES/Galaxy/ORG/BSP/kernel_2.6.27 »
  CC [M] 
/media/Divers/Android/SOURCES/compcache/sub-projects/allocators/xvmalloc-kmod/xv
malloc.o
  Building modules, stage 2.
  MODPOST 1 modules
  LD [M] 
/media/Divers/Android/SOURCES/compcache/sub-projects/allocators/xvmalloc-kmod/xv
malloc.ko
make[1]: quittant le répertoire «
/media/Divers/Android/SOURCES/Galaxy/ORG/BSP/kernel_2.6.27 »
make -C "/media/Divers/Android/SOURCES/Galaxy/ORG/BSP/kernel_2.6.27/"
M=/media/Divers/Android/SOURCES/compcache modules
make[1]: entrant dans le répertoire «
/media/Divers/Android/SOURCES/Galaxy/ORG/BSP/kernel_2.6.27 »
  CC [M] 
/media/Divers/Android/SOURCES/compcache/sub-projects/allocators/xvmalloc-kmod/xv
malloc.o
  CC [M]  /media/Divers/Android/SOURCES/compcache/ramzswap.o
/media/Divers/Android/SOURCES/compcache/ramzswap.c:50: error: expected
declaration specifiers or '...' before 'fmode_t'
/media/Divers/Android/SOURCES/compcache/ramzswap.c:57: warning:
initialization from incompatible pointer type
/media/Divers/Android/SOURCES/compcache/ramzswap.c: In function
'ramzswap_read':
/media/Divers/Android/SOURCES/compcache/ramzswap.c:693: error: implicit
declaration of function 'set_swap_free_notify'
/media/Divers/Android/SOURCES/compcache/ramzswap.c: In function
'ramzswap_make_request':
/media/Divers/Android/SOURCES/compcache/ramzswap.c:926: error: implicit
declaration of function 'bio_discard'
/media/Divers/Android/SOURCES/compcache/ramzswap.c: In function
'ramzswap_ioctl_init_device':
/media/Divers/Android/SOURCES/compcache/ramzswap.c:1024: error: implicit
declaration of function 'blk_queue_nonrot'
/media/Divers/Android/SOURCES/compcache/ramzswap.c:1025: error:
'QUEUE_FLAG_NONROT' undeclared (first use in this function)
/media/Divers/Android/SOURCES/compcache/ramzswap.c:1025: error: (Each
undeclared identifier is reported only once
/media/Divers/Android/SOURCES/compcache/ramzswap.c:1025: error: for each
function it appears in.)
/media/Divers/Android/SOURCES/compcache/ramzswap.c:1027: error: implicit
declaration of function 'blk_queue_set_discard'
/media/Divers/Android/SOURCES/compcache/ramzswap.c: At top level:
/media/Divers/Android/SOURCES/compcache/ramzswap.c:1077: error: expected
declaration specifiers or '...' before 'fmode_t'
make[2]: *** [/media/Divers/Android/SOURCES/compcache/ramzswap.o] Erreur 1

Original issue reported on code.google.com by Dra...@gmail.com on 22 Aug 2009 at 1:04

GoogleCodeExporter commented 9 years ago
Minimum kernel version required is 2.6.28. Can you try on this newer kernel?

Original comment by nitingupta910@gmail.com on 22 Aug 2009 at 1:42

GoogleCodeExporter commented 9 years ago

Original comment by nitingupta910@gmail.com on 23 Aug 2009 at 3:10

GoogleCodeExporter commented 9 years ago
I did not pay attention to this pre-requisite, and don't have the possibilty to 
test
with a newer kernel for now (it's a modified kernel given by samsung..)

Thanks for your quick response !

Original comment by Dra...@gmail.com on 23 Aug 2009 at 8:18

GoogleCodeExporter commented 9 years ago
Ok, then closing the bug...

Original comment by nitingupta910@gmail.com on 23 Aug 2009 at 4:12

GoogleCodeExporter commented 9 years ago
It also problem on Debian Lenny with 2.6.26-2-686.

Original comment by witold.b...@gmail.com on 25 Aug 2009 at 5:05

GoogleCodeExporter commented 9 years ago
> It also problem on Debian Lenny with 2.6.26-2-686.

Unfortunately, compcache-0.6 is very difficult to backport to 2.6.26.

Original comment by nitingupta910@gmail.com on 26 Aug 2009 at 5:25

GoogleCodeExporter commented 9 years ago
That's unfortunate, really.
CompCache is what what's making android and hero ports actually usable on HTC 
kaiser 
and vogue phones.
Unfortunately the current usable kernel on these devices is still only 2.6.25 
:-/

Original comment by pedro.m....@gmail.com on 31 Aug 2009 at 1:27

GoogleCodeExporter commented 9 years ago
> That's unfortunate, really.
> CompCache is what what's making android and hero ports actually usable on HTC 
kaiser 
> and vogue phones.
> Unfortunately the current usable kernel on these devices is still only 2.6.25 
:-/

If this is the case, then maybe compcache-0.5.4 (with ARM fixes and swap notify
support) is desired. Let me reopen this Issue to track this 0.5.4 release. 
Focus is
on 0.6.x so maybe this will take some time.

Original comment by nitingupta910@gmail.com on 31 Aug 2009 at 3:12

GoogleCodeExporter commented 9 years ago
That would be fantastic.
Thank you very much.

Original comment by pedro.m....@gmail.com on 2 Sep 2009 at 11:02

GoogleCodeExporter commented 9 years ago
FYI, compcache is being used in these devices in a rather extreme manner, but 
still 
behaving beautifully.
It's amazing what it can do.

# free
              total         used         free       shared      buffers
  Mem:        98980        96932         2048            0          368
 Swap:        98976        77836        21140
Total:       197956       174768        23188
#
# cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/block/ramzswap0                    partition       98976   77836   -1
#
# cat /proc/ramzswap
DiskSize:          98980 kB
NumReads:          68397
NumWrites:         53017
FailedReads:           0
FailedWrites:          0
InvalidIO:             0
PagesDiscard:          0
ZeroPages:           699
GoodCompress:         75 %
NoCompress:            5 %
PagesStored:       21193
PagesUsed:          8173
OrigDataSize:      84772 kB
ComprDataSize:     31880 kB
MemUsedTotal:      32692 kB
#

The example above comes from a phone running very fast and smoothly as it is.
For reference, some vm settings were changed:
 - page-cluster = 0
 - swappiness = 75
 - vfs_cache_pressure = 10
 - overcommit at mode 2 (always check, never overcommit) with ratio 80

Running the same system without compcache with just it's 98MB of memory is very 
bad, 
with android's lowmemorykiller wreaking havok.
Running with a swapfile/partition is also painfull because of the sdcard io 
speed.

Using a compcache backing store partition also works well, but issues with the 
low 
speed of sdcard access and blocking io mean it usually behaves worse than just 
using 
memory.

Original comment by pedro.m....@gmail.com on 4 Sep 2009 at 11:39

GoogleCodeExporter commented 9 years ago
Can someone please test this pre-compcache-0.5.4 version attached?
I have updated the CompilingAndUsing page with additional build details.

Changelog 0.5.4 vs 0.5.3
 - Add swap notifier patch (see README for details)
 - Remove swap 'discard' support. Notifiers make them redundant.
 - Fix crashes on ARM

If all works fine, I will make it available in downloads area.

Thanks,
Nitin

Original comment by nitingupta910@gmail.com on 10 Oct 2009 at 5:45

Attachments:

GoogleCodeExporter commented 9 years ago
it's work without the patch, which isn't the good file (it is an html file). 
Can you
change it for the good patch file ?

Original comment by Dra...@gmail.com on 11 Oct 2009 at 6:03

GoogleCodeExporter commented 9 years ago
Drakaz: hahaha...I somehow manged to make that patch as html. yikes!

I will upload sane patch tomorrow. Thanks for testing it out.

Original comment by nitingupta910@gmail.com on 11 Oct 2009 at 6:16

GoogleCodeExporter commented 9 years ago
Thanks, waiting for the patch. Returned to 5.3 arm patched because of 
compcache-0.5.4
performance are less than 5.3 arm.. i hope the patch resolve this ! :)

Original comment by Dra...@gmail.com on 11 Oct 2009 at 6:21

GoogleCodeExporter commented 9 years ago
I have corrected the patch now. Please check test2 version attached.

_With_ patch, compcache-0.5.4 should perform better than 0.5.3. Without patch, 
it
will perform worse than compcache-0.5.3 since swap discard support has been 
removed
in favor of swap notifiers (provided by patch).

Original comment by nitingupta910@gmail.com on 13 Oct 2009 at 3:23

Attachments:

GoogleCodeExporter commented 9 years ago
compcache-0.5.4-test2 work perfectly with the new patch. I confirm that the
performance seems to be better than compcache 5.3 ! Thanks a lot  nitingupta910 
! 

Original comment by Dra...@gmail.com on 13 Oct 2009 at 8:33

GoogleCodeExporter commented 9 years ago
Its now available from downloads area. Thanks for testing it out.

Original comment by nitingupta910@gmail.com on 17 Oct 2009 at 6:58