[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] An issue in sharing the pages again in xen-memshare
Hi Sepanta, memsharing in Xen is fairly rough around the edges. Not being able to share all pages between VMs is normal though. Last time I checked you could still share a fairly large chunk of memory between a VM and its clone created via save/restore. Just keep in mind that the origin VM can't be unpaused after its memory is shared to a clone and that the clone also needs a CoW disk. If you really believe the page you are trying to share should be sharable you will need to debug it further on your own and submit a patch with a fix that I would be happy to review. Tamas On Fri, Oct 5, 2018 at 11:26 PM sepanta s <sapanta992@xxxxxxxxx> wrote: > > > Dear Tamas, > > I have got consecutive problem in memory sharing in Xen. I would be so much > grateful if you could give me a hand. > > Firstly, I have written a user-level application that deduplicates unshared > pages after T miliseconds. The problem with this application is that it can't > share all the pages even though the pages are numerous. As I went through > debugging the Xen code, I figured out that reference count of those pages > were negative. So, by searching more I got that an overflow occurs for those > pages in that part of my Xen version 4.7. > I decided to migrate to a newer stable release, which I chose 4.11. In that > version, I created a raw image, installed my windows and run the virtual > machine. Then, I created a clone of the vm. I paused both the source and its > clone and tried to run memsharetool to share pages between the source and the > clone. Here, the Xen host hangs and I cannot do anything. I reported the > problem as a bug or something similar to Xen mailing list. I asked Razvan, > he told me to debug and send the report but my PC doesn't have a serial port. > As the other PCs I have access to do not have serial ports, I tried to > install Xen in a VM in Vbox to use the emulated serial ports to debug from > another Vbox VM. But, that comes other problems as I cannot create VM in Xen > 4.11 in ubuntu 17.04 as dom0. > > You know I am just moving from one problem to another. I just need your help. > I am looking forward to hearing from you soon. > > > With Regards, > Sepanta > > ---------- Forwarded message --------- > From: sepanta s <sapanta992@xxxxxxxxx> > Date: Mon, Sep 17, 2018 at 8:13 AM > Subject: Re: [Xen-devel] An issue in sharing the pages again in xen-memshare > To: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx> > > > Thanks a lot! > > On Sun, Sep 16, 2018 at 6:10 PM Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx> > wrote: >> >> Hello, >> >> I don't know what the problem might be (as mentioned before, I've done >> no work at all with memsharing). However, to see why your host hangs you >> should use a serial port connection to another computer and see if >> there's a backtrace. >> >> https://wiki.xenproject.org/wiki/Xen_Serial_Console >> https://wiki.xenproject.org/wiki/Debugging_Xen >> >> I think your best bet is Tamas - if he's got time to help. >> >> >> Good luck, >> Razvan >> >> On 9/16/18 12:05 PM, sepanta s wrote: >> > Hi Razvan, >> > >> > I checked through the problem I mentioned before. The problem was due to >> > a vulnerability in reference counters in Xen 4.9. I compiled the last >> > release of Xen 4.9 as I checked the patches had been applied. >> > But a new problem arises from something else. You know, before I want to >> > share the memory of two VMs, I create one and then create a clone of it >> > with save/restore. Then I use "range" option in memsharetool in Xen to >> > share the pages, but the host hangs. I guess there is a bug in Xen in >> > sharing two VMs which one has been created via save/restoring. I checked >> > this for Xen 4.11 with Ubuntu 17.04 as host and Windows 7 as guest. >> > Can you help me or should I post this on the Xen developers mailing list?' >> > >> > I look forward to hearing from you. >> > >> > P.S: I am Phd student and this is my Master's project which was not >> > implemented. I am working on it on and off but want to finish it. That's >> > why there is long period of time between each question . Just thought >> > being on and off is not really good! So, I shared the reason with you. >> > >> > With Regards, >> > Sepanta >> > >> > >> > >> > >> > On Fri, Aug 24, 2018 at 2:29 PM sepanta s <sapanta992@xxxxxxxxx >> > <mailto:sapanta992@xxxxxxxxx>> wrote: >> > >> > Thanks. >> > >> > On Fri, Aug 24, 2018 at 2:40 PM Razvan Cojocaru >> > <rcojocaru@xxxxxxxxxxxxxxx <mailto:rcojocaru@xxxxxxxxxxxxxxx>> wrote: >> > >> > No problem, I was just trying to clear things up. >> > >> > Good luck with the debugging! >> > >> > On 8/24/18 8:31 AM, sepanta s wrote: >> > > Thanks for your reply, I understand. >> > > Unfortunately, He didn't reply the previous one and I am stuck >> > in. >> > > I will not reply the email to you again. >> > > >> > > Sorry. >> > > >> > > On Fri, Aug 24, 2018 at 2:19 PM Razvan Cojocaru >> > > <rcojocaru@xxxxxxxxxxxxxxx <mailto:rcojocaru@xxxxxxxxxxxxxxx> >> > <mailto:rcojocaru@xxxxxxxxxxxxxxx >> > <mailto:rcojocaru@xxxxxxxxxxxxxxx>>> wrote: >> > > >> > > On 8/24/18 8:07 AM, sepanta s wrote: >> > > > 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? >> > > >> > > As stated before, unfortunately I've never used this >> > feature and don't >> > > know what to suggest. Again, maybe Tamas will chime in. >> > > >> > >> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |