From: "Jan Beulich" Subject: Re: [PATCH] tmem: fix to 20945 "When tmem is enabled, reserve a fraction of memory" Date: Wed, 17 Feb 2010 12:50:01 +0000 Message-ID: <4B7BF409020000780002FD81@vpn.id2.novell.com> References: <4f9cade6-4b13-41fd-bc34-7443fb06ece3@default> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline 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 Cc: Dan Magenheimer , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org >>> Keir Fraser 17.02.10 13:10 >>> >On 16/02/2010 18:30, "Dan Magenheimer" = wrote: > >> - if ( opt_tmem && ((order =3D=3D 0) || (order >=3D 9)) && >> - (total_avail_pages <=3D midsize_alloc_zone_pages) ) >> - goto fail; >> + if ( opt_tmem && (total_avail_pages <=3D midsize_alloc_zone_pages) = ) >> + { >> + if ( order =3D=3D 0) >> + goto try_tmem; >> + if ( order >=3D 9) >> + goto fail; > >Why not try_tmem in the case that order>=3D9, too, rather than fail = outright? It could be done that way, but wouldn't have any effect, as tmem doesn't even try to relinquish any memory when order > 0. Jan