Mailinglist Archive: opensuse-commit (1093 mails)

< Previous Next >
commit compcache for openSUSE:Factory
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Fri, 19 Mar 2010 10:36:06 +0100
  • Message-id: <20100319093606.AEC612020F@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package compcache for openSUSE:Factory
checked in at Fri Mar 19 10:36:06 CET 2010.



--------
--- compcache/compcache.changes 2009-12-29 21:46:40.000000000 +0100
+++ /mounts/work_src_done/STABLE/compcache/compcache.changes 2010-03-09
00:12:31.000000000 +0100
@@ -1,0 +2,5 @@
+Mon Mar 8 23:09:41 UTC 2010 - death_knight@xxxxxxxxxxx
+
+- additional ramzswap devices for SMP CPU machines.
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ compcache.spec ++++++
--- /var/tmp/diff_new_pack.j1zgZB/_old 2010-03-19 10:33:42.000000000 +0100
+++ /var/tmp/diff_new_pack.j1zgZB/_new 2010-03-19 10:33:42.000000000 +0100
@@ -24,7 +24,7 @@
License: GPLv2
Group: System/Kernel
Version: 0.6
-Release: 2
+Release: 3
Summary: Compressed RAM based swap device
Source0: compcache-%{version}.tar.bz2
Source1: sysconfig.compcache

++++++ boot.compcache ++++++
--- /var/tmp/diff_new_pack.j1zgZB/_old 2010-03-19 10:33:42.000000000 +0100
+++ /var/tmp/diff_new_pack.j1zgZB/_new 2010-03-19 10:33:42.000000000 +0100
@@ -2,7 +2,7 @@
#
# System startup script loading compcache kernel module
# Copyright (C) 2008 Takashi Iwai <tiwai@xxxxxxx>
-#
+# Added SMP support by Erdem U. Altinyurt <spamjunkeater@xxxxxxxxx>
# /etc/init.d/compcache
#
### BEGIN INIT INFO
@@ -24,70 +24,77 @@
UDEVADM_BIN=/sbin/udevadm
MODPROBE_BIN=/sbin/modprobe
RZSCTL_BIN=/usr/sbin/rzscontrol
-SWAPDEV=/dev/ramzswap0
+SWAPDEVNM=/dev/ramzswap
+COMPCACHE_NUM_DEVICES=$(cat /proc/cpuinfo | grep processor | wc -l)
+COMPCACHE_SIZE_KB=$(expr $(grep MemTotal /proc/meminfo | sed 's/^.* //;s/
.*$//g') / 4) #%25 of ram

is_comp_swap_on () {
- grep -q ramzswap /proc/swaps
+ grep -q $1 /proc/swaps
return $?
}

rc_reset

case "$1" in
- start|restart)
+ start)
test -z "$COMPCACHE_NUM_DEVICES" && COMPCACHE_NUM_DEVICES="1"
param="NUM_DEVICES=$COMPCACHE_NUM_DEVICES"
- echo -n "Loading ramzswap driver"
- $MODPROBE_BIN -q ramzswap &>/dev/null
- rc_status -v
-
+ echo -n "Loading ramzswap driver with $COMPCACHE_NUM_DEVICES devices
and $(expr $COMPCACHE_SIZE_KB / 1024 )MB memory"
+ $MODPROBE_BIN -q ramzswap num_devices=$COMPCACHE_NUM_DEVICES &>/dev/null
+ rc_status -v
# /dev/ramzswap0 is not available immediately after insmod returns
# So, let udev complete its work before we do swapon
- if [ ! -f $SWAPDEV ]; then
- if [ -f "$UDEVADM_BIN" ]; then
- $UDEVADM_BIN settle
- else
- sleep 2
- fi
- fi
-
- test -z "$COMPCACHE_SIZE_KB" && COMPCACHE_SIZE_KB="0"
- if [ "$COMPCACHE_SIZE_KB" -gt 0 ]; then
- $RZSCTL_BIN $SWAPDEV -d $COMPCACHE_SIZE_KB -i
- else
- $RZSCTL_BIN $SWAPDEV -i
- fi
-
- if ! is_comp_swap_on; then
- echo -n "Setting up ramzswap swap device"
- $SWAPON_BIN $SWAPDEV
- rc_status -v
- fi
- ;;
- stop)
- if is_comp_swap_on; then
- echo -n "Turning off ramzswap swap device"
- $SWAPOFF_BIN $SWAPDEV
- rc_status -v
- fi
+ for i in $(seq 0 $(expr $COMPCACHE_NUM_DEVICES - 1) ); do
+ SWAPDEV=$SWAPDEVNM$i
+ if [ ! -f $SWAPDEV ]; then
+ if [ -f "$UDEVADM_BIN" ]; then
+ $UDEVADM_BIN settle
+ else
+ sleep 2
+ fi
+ fi
+ test -z "$COMPCACHE_SIZE_KB" && COMPCACHE_SIZE_KB="0"
+ if [ "$COMPCACHE_SIZE_KB" -gt 0 ]; then
+ $RZSCTL_BIN $SWAPDEV -d $(expr $COMPCACHE_SIZE_KB /
$COMPCACHE_NUM_DEVICES) -i
+ else
+ $RZSCTL_BIN $SWAPDEV -i
+ fi
+
+ if ! is_comp_swap_on $SWAPDEV; then
+ echo -n "Setting up ramzswap swap device $i"
+ $SWAPON_BIN $SWAPDEV -p 10
+ rc_status -v
+ fi
+ done
+ ;;
+ stop)
+ for i in $(seq 0 $(expr $COMPCACHE_NUM_DEVICES - 1) ); do
+ SWAPDEV=$SWAPDEVNM$i
+ if is_comp_swap_on $SWAPDEV; then
+ echo -n "Turning off ramzswap swap device $i"
+ $SWAPOFF_BIN $SWAPDEV
+ rc_status -v
+ fi
+ done
echo -n "Unloading ramzswap module"
$MODPROBE_BIN -qr ramzswap &>/dev/null
rc_status -v
+
;;
- restart)
+ restart)
$0 stop
$0 start
;;
- status)
+ status)
echo -n "Checking for compcache "
- if is_comp_swap_on; then
- rc_failed 0
+ if is_comp_swap_on $SWAPDEVNM; then
+ rc_failed 0
else
- rc_failed 3
+ rc_failed 3
fi
rc_status -v
;;
- *)
+ *)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
;;


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages