From mboxrd@z Thu Jan 1 00:00:00 1970 From: sepanta s Subject: Re: An issue in sharing the pages again in xen-memshare Date: Fri, 24 Aug 2018 09:37:19 +0430 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9206639824095403289==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" To: Razvan Cojocaru Cc: Tamas Lengyel , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org --===============9206639824095403289== Content-Type: multipart/alternative; boundary="000000000000e9e26105742b1f4a" --000000000000e9e26105742b1f4a Content-Type: text/plain; charset="UTF-8" Hi again, I debugged the kernel codes and found out the root cause. The sharing is not done for some pages causing error -E2BIG which is due to reference count being more than one. This prevents hypervor to nominate the page. As much as I know about this issue, the page that I want to nominate and I receive this error from make_page_sharable function in mem_sharing.c is pointed by more than one pages. So, is there any idea to resolve this issue? I though that I can put the page number in a buffer and share it again after t milliseconds but still the nomination return -E2BIG error. Am I missing something? I would be grateful if you could help. On Sat, Jul 28, 2018 at 11:13 AM sepanta s wrote: > Thanks. > I would be thankful if he can help me ... > > On Mon, Jul 23, 2018 at 11:52 AM Razvan Cojocaru < > rcojocaru@bitdefender.com> wrote: > >> On 07/23/2018 05:37 AM, sepanta s wrote: >> > I have written a program that can share memory pages of two VMs every x >> > milliseconds. To do so, I modified xen and added an unshare event to be >> > able to capture it. However, for some pages, when I receive the unshare >> > event that contains the information about the pages which was about to >> > be written on and put it on a buffer for sharing them again after x >> > milliseconds, I cannot nominate them again and an error occurs. So, the >> > sharing mechanism I have built can partially share pages. I guess the >> > problem might be because of internal structure of sharing mechanism in >> > the Xen but can't figure out the problem. >> > Do you have any idea what can cause this problem? Or what should I >> > check to get closer to any solution? >> >> I've never used this feature, but Tamas might have some insight into >> this (added to Cc). >> > --000000000000e9e26105742b1f4a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi again,

I debugged th= e kernel codes and found out the root cause.
The sharing is = not done for some pages causing error -E2BIG which is due to reference coun= t being more than one. This prevents hypervor to nominate the page. As much= as I know about this issue, the page that I want to nominate and I receive= this error from make_page_sharable function in mem_sharing.c is pointed by= more than one pages. So, is there any idea to resolve this issue? I though= that I can put the page number in a buffer and share it again after t mill= iseconds but still the nomination return -E2BIG error.=C2=A0 Am I missing s= omething?

I would be grateful if you could he= lp.


On Sat, Jul 28, 2018 at 11:13 AM sepanta s <sapanta992@gmail.com> wrote:
Thanks.
I would = be thankful if he can help me ...

On Mon, Jul 23, 2018 at 11:52 AM Razvan Cojocaru <= rcojocaru@bi= tdefender.com> wrote:
On 07/= 23/2018 05:37 AM, sepanta s wrote:
> I have written a program that can share memory pages of two VMs every = x
> milliseconds. To do so, I modified xen and added an unshare event to b= e
> able to capture it. However,=C2=A0 for some pages, when I receive the = unshare
> event that contains the information about the pages which was about to=
> be written on and put it on a buffer for sharing them again after x > milliseconds, I cannot nominate them again and an error occurs. So, th= e
> sharing mechanism I have built can partially share pages. I guess the<= br> > problem might be because of internal structure of sharing mechanism in=
> the Xen but can't figure out the problem.
> Do you=C2=A0 have any idea what can cause this problem? Or what should= I
> check to get closer to any solution?

I've never used this feature, but Tamas might have some insight into this (added to Cc).
--000000000000e9e26105742b1f4a-- --===============9206639824095403289== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcKaHR0cHM6Ly9saXN0 cy54ZW5wcm9qZWN0Lm9yZy9tYWlsbWFuL2xpc3RpbmZvL3hlbi1kZXZlbA== --===============9206639824095403289==--