<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Sandeep,<br>
<br>
While I didn't write any of the page fusion code I'll try to
answer with what I know. Perhaps when someone with more intimate
knowledge of the code has time to answer they can provide their
input. For now, verify with the actual sources as necessary.<br>
<br>
See inline replies.<br>
<br>
On 12/14/2012 12:38 AM, Sandeep Koppala wrote:<br>
</div>
<blockquote
cite="mid:C2E3E86BCBE846418C378EF78F41EF67289DFEA3@mail01.cs.stonybrook.edu"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">Hi Ram,<br>
<br>
Thanks for the reply. <br>
<br>
We went ahead and modified the code in
VBoxServicePageSharing.cpp. We basically added a function
VBoxServicePageSharingInspectG
<div id=":2rg"><wbr>uest( ) that compiles for linux platform. In
this functions, we are trying to register modules from the
linux guest using information obtained from /proc/modules; we
are calling the function VbglR3RegisterSharedModule( ) for the
same. < The very function that is used by the code for
windows > We are also invoking VbglR3CheckSharedModules( )
after registering, as is being done in case of windows.
<br>
<br>
We have not been able to get any successful results so far (as
reported by the VBoxManage metrics). A couple of concerns are:<br>
1. Parameters for VbglR3RegisterSharedModule( ):<br>
a. Name of the module<br>
b. Version of the module<br>
c. Base address of the module (Virtual Address)<br>
d. Base size of the module<br>
e. No. of regions (elements in VMMDEVSHAREDREGIONDESC
array)<br>
f. An array describing various memory regions in the module
(VMMDEVSHAREDREGIONDESC array)<br>
- Is our understanding correct ? Or is there anything wrong ?<br>
</div>
</div>
</blockquote>
Yes that is correct.<br>
<br>
One question: How exactly are you using the metrics command to check
if the page sharing is working? I presume the same command you use
works with Windows guests with page sharing and shows the memory
being returned to the host/shared with VMs, in which case ignore
this question.<br>
<br>
<blockquote
cite="mid:C2E3E86BCBE846418C378EF78F41EF67289DFEA3@mail01.cs.stonybrook.edu"
type="cite">
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">
<div id=":2rg">
2. We are trying to pass each module from /proc/modules in the
Linux guest as ONE single region. The name, base address and
size are available from /proc/modules. We are passing a dummy
value for the version, and filling the array with one entry -
address and size. <br>
<br>
Your comments on the same. Any insights will be helpful, as we
are pretty much stuck. Sorry for this verbose email.
<br>
</div>
</div>
</blockquote>
<br>
The output of /proc/modules varies with distros (compile options of
the linux kernel) so some of the key, required information might not
be available from them. You probably knew this but mentioning it
here as a premise for possibly requiring something more low-level.<br>
<br>
However, this is a good start in retrieving the information from
userland. You can communicate via the vboxguest kernel driver and
also dig out relevant information from the kernel if the kernel has
better interfaces for it (haven't really investigated).<br>
<br>
Regarding passing the entire loaded-modules as sharable memory might
work for a workload of the very same guest. It looks like you can
proceed with this approach and see how it works. If necessary we can
fit in better interfaces for determining kernel module information
when the basic infrastructure works.<br>
<br>
Hope this helps,<br>
Regards,<br>
Ram.<br>
<br>
<blockquote
cite="mid:C2E3E86BCBE846418C378EF78F41EF67289DFEA3@mail01.cs.stonybrook.edu"
type="cite">
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">
<div id=":2rg">
Thanks</div>
<div style="font-family: Times New Roman; color: #000000;
font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF933931"><font
face="Tahoma" size="2" color="#000000"><b>From:</b>
Ramshankar [<a class="moz-txt-link-abbreviated" href="mailto:ramshankar.venkataraman@oracle.com">ramshankar.venkataraman@oracle.com</a>]<br>
<b>Sent:</b> Monday, December 10, 2012 5:45 AM<br>
<b>To:</b> Sandeep Koppala<br>
<b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a><br>
<b>Subject:</b> Re: [vbox-dev] LogFlow() statements...<br>
</font><br>
</div>
<div>
<div class="moz-cite-prefix">On 12/07/2012 04:32 AM, Sandeep
Koppala wrote:<br>
</div>
<blockquote type="cite">
<style id="owaParaStyle" type="text/css">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
BODY {direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;}P {margin-top:0;margin-bottom:0;}</style>
<div style="direction:ltr; font-family:Tahoma;
color:#000000; font-size:10pt">Hi all,<br>
<br>
I am trying to implement Page Fusion for x64 Linux
guests. I understand that this will require changes to
the Guest Additions. Specifically, in the
VBoxServicePageSharing.cpp code. I have made some
changes here and I am trying to call
VbglR3RegisterSharedModule function with information
about Linux guest modules.<br>
<br>
1. I am unable to put a trace in the R3 code, the code
for the VMM / hypervisor. I am unable to see the
LogFlow() messages. Can you help me enable it ?<br>
<br>
2. Is the code that implements page-fusing / sharing in
the VMM specific to windows ?<br>
<br>
Thanks in advance !</div>
<br>
<fieldset class="mimeAttachmentHeader" target="_blank"></fieldset>
<br>
<pre>_______________________________________________
vbox-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:vbox-dev@virtualbox.org" target="_blank">vbox-dev@virtualbox.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://www.virtualbox.org/mailman/listinfo/vbox-dev" target="_blank">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a>
</pre>
</blockquote>
<br>
1. Did you take a look at logging information here: <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://www.virtualbox.org/wiki/VBoxLogging"
target="_blank">
https://www.virtualbox.org/wiki/VBoxLogging</a> (see
Ring-0 logging)?<br>
<br>
2. From a quick glance, the guest additions part of the code
is specific to Windows, on the host side it is platform
agnostic (not enabled for 64-bit darwin hosts though). The
guest addition side has some compile-time defines that only
register the service hooks for Windows (VBoxService.cpp).<br>
<br>
<br>
Regards,<br>
Ram.<br>
<br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
vbox-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a>
<a class="moz-txt-link-freetext" href="https://www.virtualbox.org/mailman/listinfo/vbox-dev">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>