From: "Dan Magenheimer" Subject: RE: [PATCH] linux/balloon: don't allow ballooningdowna domain below a reasonable limit Date: Sat, 3 May 2008 07:53:41 -0600 Message-ID: <20080503075341625.00000041924@djm-pc> References: Reply-To: "dan.magenheimer@oracle.com" Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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: Keir Fraser , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org > From: Keir Fraser [mailto:keir.fraser@eu.citrix.com] > Okay, I will comment when I see it. I'm not sure what design you are work= ing > on: perhaps extract memory stats from the guest via xenbus and implement > ballooning policy in dom0? That is what I would prefer to see. The Novell= > ballooning-limit checks were only added as a safety backstop in the guest= > itself. Apart from tweaking it to make it less conservative where we are > confident that is safe, any more complicated policy, and of course and > cross-domain global optimisation, doesn't belong in the = > individual guests. (cc's removed due to topic drift) I was planning on providing both Model C and Model D (see below), but let me know if you will only accept Model C (or even Model B) and I will adjust accordingly. = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D MODEL A (current): Domain 0 sez: "Hey guest A, I have no clue how much memory you have (though you may or may not have obeyed a previous request) or how much you need, but change your memory usage to 150MB" Guest A (silently): "(Silly domain 0 wants me to reduce my memory usage to 150MB but my minimum is 160MB. Well, I guess I'll do my best.)" =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D MODEL B (guest provides info when prodded): Domain 0 sez: "Hey guest A, tell me how much memory you have and how much you need" Guest A sez: "I have 198MB but I really only need 129MB" Domain 0 sez: "Guest A, reduce your memory usage to 129MB" Guest A (silently): "(My min is 150MB but I'll do my best)" Domain 0 sez: "Hey guest A, tell me how much memory you have and how much you need" Guest A sez: "I have 150MB but I really only need 129MB" [etc] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D MODEL C (guest provides info regularly): Guest A sez: "I have 198 MB, I really only need 180MB, and my minimum is 150MB. I'll provide another update in a second." [one second later] Guest A sez: "I have 198 MB, I really only need 129MB, and my minimum is 150MB. I'll provide another update in a second." Domain 0 sez: "Guest A, reduce your memory to 150MB" Guest A (silently): "(ballooning down now to 150MB)" [one second later] Guest A sez: "I have 150MB, I really need 250MB and my minimum is 150MB. I'll provide another update in a second." Domain 0 sez: "Guest A, increase your memory to 250MB" =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D MODEL D (autoballooning): Domain 0 sez: "Hey Guest A, do the right thing with your memory" Guest A sez: "I have 198MB, I really only need 129MB, and my minimum is 150MB" Guest A (silently): "(ballooning down now to 150MB)" [one second later] Guest A sez: "I have 150MB, I really need 250MB, and my minimum is 150MB" Guest A (silently): "(ballooning up now to 250MB... oops looks like I can't get that much but I'll take what I can get)" [one second later] Guest A sez: "I have 200MB, I really need 300MB, and my minimum is 150MB" Guest A (silently): "(ballooning up now to 250MB... oops looks like I can't get any more... time to start swapping)" =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Thanks... for the memory I really could use more / My throughput's on the floor The balloon is flat / My swap disk's fat / I've O-O-M's in store Overcommitted we are (with apologies to the late great Bob Hope)