From: Ian Campbell Subject: Re: [PATCH] [linux-2.6.39.x for xen] tmem: self-ballooning and frontswap-selfshrinking Date: Tue, 14 Jun 2011 10:15:58 +0100 Message-ID: <1308042958.17937.30.camel@zakaz.uk.xensource.com> References: <292df482-2d4c-4a4f-b5f4-4c808692156e@default> <20110609172157.GA23592@router-fw-old.local.net-space.pl> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110609172157.GA23592@router-fw-old.local.net-space.pl> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Daniel Kiper Cc: Dan Magenheimer , "xen-devel@lists.xensource.com" , Konrad Wilk , "jeremy@goop.org" , "JBeulich@novell.com" , Dushmanta Mohapatra List-Id: xen-devel@lists.xenproject.org On Thu, 2011-06-09 at 18:21 +0100, Daniel Kiper wrote: > On Mon, Jun 06, 2011 at 03:12:28PM -0700, Dan Magenheimer wrote: > > [...] > > > +static void selfballoon_process(struct work_struct *work) > > +{ > > + extern unsigned long vm_get_committed_as(void); > > + unsigned long cur_pages, goal_pages, tgt_pages; > > + int reset_timer = 0; > > + > > + if (balloon_stats.selfballooning_enabled) { > > + tgt_pages = cur_pages = totalram_pages; > > tgt_pages = cur_pages = balloon_stats.current_pages; Linux coding style prefers to avoid these multiple assignments. It favours e.g. tgt_pages = balloon_stats.current_pages; cur_pages = balloon_stats.current_pages; etc.