From: Ian Campbell Subject: Re: [PATCH] slightly consolidate code in free_domheap_pages() Date: Tue, 24 Jun 2014 11:04:42 +0100 Message-ID: <1403604282.25047.3.camel@kazak.uk.xensource.com> References: <53A447C9020000780001BF5F@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WzNaq-0002pE-6f for xen-devel@lists.xenproject.org; Tue, 24 Jun 2014 10:04:48 +0000 In-Reply-To: <53A447C9020000780001BF5F@mail.emea.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: xen-devel , Keir Fraser , Ian Jackson , Tim Deegan List-Id: xen-devel@lists.xenproject.org On Fri, 2014-06-20 at 13:40 +0100, Jan Beulich wrote: > + if ( likely(d) && likely(d != dom_cow) ) OOI is this more or less efficient than a single likely around the entire thing? > + else > + { > + ASSERT(!d || !order); Is this effectively replacing the ASSERT(order == 0) In the previous d == dom_cow case? If so, can d at this point ever be anything other than dom_cow or NULL? I don't think so. Given that I think ASSERT(!(d == dom_cow && order != 0)) would more clearly capture the intent of the test (with the spelling out of the conditions being more important than the de morganing of the expression). Ian.