From: Daniel Bareiro <daniel-listas@gmx.net>
To: KVM General <kvm@vger.kernel.org>
Subject: Re: KSM with Debian GNU/Linux
Date: Thu, 12 Aug 2010 22:05:34 -0300 [thread overview]
Message-ID: <20100813010534.GA24332@defiant.freesoftware> (raw)
In-Reply-To: <4C601E97.3080102@msgid.tls.msk.ru>
[-- Attachment #1: Type: text/plain, Size: 2673 bytes --]
Hi, Michael.
On Monday, 09 August 2010 19:28:23 +0400,
Michael Tokarev wrote:
>> I'm also using qemu-kvm 0.12.1.2 compiled by myself with the source
>> code of SourceForge.
> Note that this one has numerous bugs, some of which involves data
> corruption. JFYI.
Thanks for the observation.
>> These are the checks that I was doing in the VMHost:
>>
>> # ll /sys/kernel/mm/ksm/
>> total 0
>> -r--r--r-- 1 root root 4096 ago 9 06:28 full_scans
>> -rw-r--r-- 1 root root 4096 ago 9 06:28 max_kernel_pages
>> -r--r--r-- 1 root root 4096 ago 9 06:28 pages_shared
>> -r--r--r-- 1 root root 4096 ago 9 06:28 pages_sharing
>> -rw-r--r-- 1 root root 4096 ago 9 06:28 pages_to_scan
>> -r--r--r-- 1 root root 4096 ago 9 06:28 pages_unshared
>> -r--r--r-- 1 root root 4096 ago 9 06:28 pages_volatile
>> -rw-r--r-- 1 root root 4096 ago 9 06:27 run
>> -rw-r--r-- 1 root root 4096 ago 9 06:28 sleep_millisecs
>>
>>
>> # cat /sys/kernel/mm/ksm/max_kernel_pages
>> 253500
>>
>> But KSM seems not work:
>>
>> # cat /sys/kernel/mm/ksm/pages_sharing
>> 0
> Did you actually enable it in the kernel? Did you read the ksm docs
> shipped with the kernel?
Yes, I forgot to mention that I had enabled it:
# cat /sys/kernel/mm/ksm/run
1
>> Should I have some additional consideration when compiling qemu-kvm?
> Please note what Nikola Ciprich said. If you don't have kernel headers
> that defines MADV_MERGEABLE, you'll have to define it when compiling
> kvm.
> Note again that debian qemu-kvm package (you're asking about debian
> after all) includes support for KSM. It also includes a small patch to
> #define that symbol.
Keeping the kernel I had compiled and installing the qemu-kvm package in
Backports, now KSM is working:
# cat /sys/kernel/mm/ksm/pages_sharing
181406
This indicates that this was a problem in compiling qemu-kvm since the
kernel is still exactly the same. Now, according to what I was seeing,
headers of my kernel defines MADV_MERGEABLE:
# cat /usr/src/linux-2.6.32.3/debian/linux-headers-2.6.32.3-dgb/usr/src/linux-headers-2.6.32.3-dgb/include/asm-generic/mman-common.h | grep MERGEABLE
#define MADV_MERGEABLE 12 /* KSM may merge identical pages */
#define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */
Would it be that perhaps in my compilation of qemu-kvm, ksm was not
working because I would have to indicate the path
/usr/src/linux-2.6.32.3/debian/...?
Thanks for your reply.
Regards,
Daniel
--
Fingerprint: BFB3 08D6 B4D1 31B2 72B9 29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Lenny - Linux user #188.598
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2010-08-13 1:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-09 10:16 KSM with Debian GNU/Linux Daniel Bareiro
2010-08-09 10:27 ` Michael Tokarev
2010-08-09 11:00 ` Nikola Ciprich
2010-08-09 11:30 ` Michael Tokarev
2010-08-09 14:39 ` Daniel Bareiro
2010-08-09 14:27 ` Daniel Bareiro
2010-08-09 15:28 ` Michael Tokarev
2010-08-13 1:05 ` Daniel Bareiro [this message]
2010-08-16 0:49 ` Daniel Bareiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100813010534.GA24332@defiant.freesoftware \
--to=daniel-listas@gmx.net \
--cc=dbareiro@gmx.net \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox