From: "Andres Lagar-Cavilla" Subject: Re: [PATCH] mem_event: use wait queue when ring is full Date: Thu, 12 Jan 2012 11:22:50 -0800 Message-ID: <35df1eba46857095cbc2a68fc2c9c075.squirrel@webmail.lagarcavilla.org> References: <63e491f50b2d490e00741aaffbc6df80.squirrel@webmail.lagarcavilla.org> <20120112135945.GA8324@aepfle.de> Reply-To: andres@lagarcavilla.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: adin@gridcentric.ca Cc: andres@gridcentric.ca, xen-devel@lists.xensource.com, tim@xen.org, olaf@aepfle.de List-Id: xen-devel@lists.xenproject.org > > I didn't spend a lot of time diagnosing exactly what was going wrong > with the patch. I did have some local patches applied (in the process > of being submitted to the list) and some debug changes to ensure that > the correct code paths were hit, so it's quite possible that it may > have been my mistake. If so, I apologize. I didn't want to spend a lot > of time debugging and I'd had a similar experience with waitqueues in > the fall. > > As Andres pointed out, we spent time merging our local approach into > your patch and testing that one. As a result of the combination, I > also did a few interface changes to ensure that callers use the > mem_event code correctly (i.e. calls to wake() are handled internally, > rather than relying on callers), and dropped some of the complexity of > accounting separately for foreign mappers. With the waitqueue > failsafe in place, I don't think that's necessary. Anyways, I tried > to preserve the spirit of your code, and would love to hear thoughts. > > We'll be doing more testing today to ensure that we've properly > exercised all the different code paths (including wait queues). It works. 1. Fire off 1GB HVM with PV drivers. Enable balloon 2. Fire off xenpaging 3. xenstore write memory/target-tot_pages 524288 (wait until everything is paged) 4. xenstore write memory/target 524288 No crashes, neither domain nor host nor xenpaging. Phew ;) Olaf, let us know if you have further concerns, afaict the patch is ready for showtime. Andres > > Cheers, > -Adin >>>> What we did is take this patch, amalgamate it with some bits from our >>>> ring >>>> management approach. We're ready to submit that, along with a >>>> description >>>> of how we test it. It works for us, and it involves wait queue's for >>>> corner cases. >>> >>> Now if the patch you just sent out uses wait queues as well, and using >>> wait queues causes sudden host reboots for reasons not yet known, how >>> is >>> your patch any better other that the reboots dont appear to happen >>> anymore? > >