On Wed, 2009-09-16 at 15:40 +0300, Dan Kenigsberg wrote:
On Wed, Sep 16, 2009 at 11:02:37AM +0100, Mark McLoughlin wrote:
Hi Dan,
On Tue, 2009-09-15 at 17:22 +0300, Dan Kenigsberg wrote:
changes since v1:
- broken into two services, one starting ksm up (ksmd), and the other tuning it (ksmtuned).
- ksmtune logic separated from service code for cleanliness and simpler availability to other distros
- ksm/max_kernel_pages default is absurdly low (allows for 8M of shared mem). ksmd now sets it to half of available RAM.
- a handful of typos corrected
Can these files be poured into qemu-system rpm? Or should I file for a new package?
Comments and suggestion are still welcome.
My initial reaction was that I'd prefer these to be in a separate ksm RPM, but since ksmtuned is tied to qemu at the moment, I guess it makes sense to include it in qemu for now. We can split it out later, if needs be.
I've added the ksm init script to qemu-common in rawhide. I put it in qemu-common since it doesn't appear to be specific to qemu-kvm or qemu-system.
I was going to add ksmtuned, but when I tested it, it didn't daemonize and 'service ksmtuned start' just hung. So, that needs to be fixed first.
I've pushed a git repo with the scripts and a bunch of minor changes I made:
http://gitorious.org/ksm-control-scripts/ksm-control-scripts
oh, thanks!
Please consider the attached patch for daemonizing ksmtuned.
...
diff --git a/ksmtuned b/ksmtuned index 5bdc4a3..f97fa6d 100644 --- a/ksmtuned +++ b/ksmtuned @@ -113,4 +113,8 @@ loop () { done }
-loop +PIDFILE=${PIDFILE-/var/run/ksmtune.pid} +if touch "$PIDFILE"; then
- loop &
- echo $! > "$PIDFILE"
+fi
1.6.2.5
Nice and simple and it seems to work well, I like it :-)
Pushing this to rawhide now
Thanks, Mark.