diff --git a/ksmtuned b/ksmtuned index f72859f..7da8b68 100644 --- a/ksmtuned +++ b/ksmtuned @@ -12,6 +12,9 @@ # make ksm work harder and harder untill memory load falls below that # threshold. # +# send SIGUSR1 to this process right after a new qemu process is started, or +# following its death, to retune ksm accordingly +# # needs testing and ironing. contact danken@redhat.com if something breaks. if [ -f /etc/ksmtuned.conf ]; then @@ -105,10 +108,16 @@ adjust () { return 0 } +function nothing () { + : +} + loop () { + trap nothing SIGUSR1 while true do - sleep $KSM_MONITOR_INTERVAL + sleep $KSM_MONITOR_INTERVAL & + wait $! adjust done } diff --git a/ksmtuned.init b/ksmtuned.init index 205531a..46332f8 100644 --- a/ksmtuned.init +++ b/ksmtuned.init @@ -75,8 +75,11 @@ case "$1" in condrestart) condrestart ;; + retune) + kill -SIGUSR1 `cat ${pidfile}` + RETVAL=$? *) - echo $"Usage: $prog {start|stop|restart|condrestart|status|help}" + echo $"Usage: $prog {start|stop|restart|condrestart|status|retune|help}" RETVAL=3 esac diff --git a/qemu.spec b/qemu.spec index 8c952d7..8e54b6d 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,7 +1,7 @@ Summary: QEMU is a FAST! processor emulator Name: qemu Version: 0.11.0 -Release: 4%{?dist} +Release: 5%{?dist} # Epoch because we pushed a qemu-1.0 package Epoch: 2 License: GPLv2+ and LGPLv2+ and BSD @@ -534,6 +534,9 @@ fi %{_mandir}/man1/qemu-img.1* %changelog +* Tue Oct 6 2009 Mark McLoughlin - 2:0.11.0-5 +- Add 'retune' verb to ksmtuned init script + * Mon Oct 5 2009 Mark McLoughlin - 2:0.11.0-4 - Use rtl8029 PXE rom for ne2k_pci, not ne (#526777) - Also, replace the gpxe-roms-qemu pkg requires with file-based requires