On 09/05/2012 09:57 PM, Yu Mingfei wrote:
On 05/09/12 22:14, Chris Evich wrote:
On 09/02/2012 11:20 PM, Yu Mingfei wrote:
On 31/08/12 22:57, Chris Evich wrote:
On 08/30/2012 05:39 AM, Yu Mingfei wrote:
>> ...
23168 KB difference. Is it the same difference always, or does it
change with setmem?

I wonder if we can account for this easily. I'll ask KVM developers if
they know why it's different and/or if they have suggestion to count
it. If not, then probably checking delta is most practical possible
alternative.
Ok, I 'm expecting their answer.:-)
Because I never find that inside size is equal to outside size.:-(

I made some progress here as apparently this is a frequently asked
question. The difference is simply in how the guest chooses to utilize
(or not) available memory. The host has no idea what's used, unused,
lost, or stolen. i.e. If for whatever reason, the guest doesn't
use/report every byte the host has no idea. The host still has to keep
track of the unused portion regardless.

So, what I would say is the memory reported from the host side is
always correct. The amount reported on the guest side will deviate
depending on the guest (kernel version, virtual bios, etc.). Given the
impossibility of accounting for all guest types, I think using a
'delta' value is making the best of a less than ideal situation.

The test can also check that guest-side memory is always reported as
less-than or equal-to host-side memory. I'd recommend checking with
several different guest types (Linux vs Windows too), and see what the
reporting range is. Perhaps also setting guest memory really low and
checking with memtest86 or similar tool.

Maybe we can come up with an approximation of appropriate delta
values, across a range of assigned memory quantities. For example, the
delta is probably different % for a 128M memory guest versus a 4G
memory guest. Maybe the test starts with a delta of 15% for guests
smaller than 128M, then drops 1% delta for every 512M of guest memory,
down to a floor value of (guessing) 1%. Just a suggestion.

---

In case your interested in tracking this down further on the libvirt
side, here's the entry point:

http://libvirt.org/git/?p=libvirt.git;a=blob;f=src/libvirt.c;h=b034ed6fe12ea34cdbcf5cf34aae6434523aff11;hb=HEAD#l7380


(see where it's dependent on the driver?)

Hi, Chris:

Thanks for your help, drop delta from 15% step by step is a good idea.

In fact, I have tried 15% and it works well, please just refer to setmem
patchset of version2 at 09/04.

And I will try to drop delta for test as you said to get a more suitable
delta.:-)


This can be a future enhancement if you like. I'm fairly well completely backed up with incoming changes at the moment anyway. The test-split stuff Lucas is working as well as the new virsh module, libvirt_xml build-up, etc. So less new code is fine-by-me for the time being :)

--
Chris Evich, RHCA, RHCE, RHCDS, RHCSS
Quality Assurance Engineer
e-mail: cevich + `@' + redhat.com o: 1-888-RED-HAT1 x44214

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to