From: "Andres Lagar-Cavilla" Subject: Re: [PATCH] Low mem virq incremental adjustments Date: Wed, 7 Mar 2012 10:12:19 -0800 Message-ID: References: <5651945c7a74652efce9.1331136908@xdev.gridcentric.ca> <4F57A2C40200007800076F24@nat28.tlf.novell.com> 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: <4F57A2C40200007800076F24@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: dan.magenheimer@oracle.com, ian.campbell@citrix.com, andres@gridcentric.ca, tim@xen.org, xen-devel , ian.jackson@citrix.com, adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org > >>> On 07.03.12 at 17:15, Andres Lagar-Cavilla > wrote: >> --- a/xen/common/page_alloc.c >> +++ b/xen/common/page_alloc.c >> @@ -377,7 +377,10 @@ static void __init setup_low_mem_virq(vo >> >> static void check_low_mem_virq(void) >> { >> - if ( unlikely(total_avail_pages <= low_mem_virq_th) ) >> + unsigned long avail_pages = total_avail_pages + >> + (opt_tmem) ? tmem_freeable_pages(): 0; > > Can tmem_freeable_pages() return anything other than zero when > opt_tmem is zero? (I.e. is the [improperly parenthesized!] conditional > expression necessary at all?) I'm not sure. I'll let Dan take it from here, as he surely knows the right way. He acked it the way it is. Andres > > Jan > >> + >> + if ( unlikely(avail_pages <= low_mem_virq_th) ) >> { >> send_global_virq(VIRQ_ENOMEM); >> >> @@ -391,7 +394,7 @@ static void check_low_mem_virq(void) >> return; >> } >> >> - if ( unlikely(total_avail_pages >= low_mem_virq_high) ) >> + if ( unlikely(avail_pages >= low_mem_virq_high) ) >> { >> /* Reset hysteresis. Bring threshold up one order. >> * If we are back where originally set, set high > > > >