Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8F1AAC433F5 for ; Wed, 23 Feb 2022 19:06:07 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.277748.474561 (Exim 4.92) (envelope-from ) id 1nMwxY-0003Nf-Ng; Wed, 23 Feb 2022 19:05:56 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 277748.474561; Wed, 23 Feb 2022 19:05:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nMwxY-0003NY-Kl; Wed, 23 Feb 2022 19:05:56 +0000 Received: by outflank-mailman (input) for mailman id 277748; Wed, 23 Feb 2022 19:05:55 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nMwxX-0003NQ-9C for xen-devel@lists.xenproject.org; Wed, 23 Feb 2022 19:05:55 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nMwxV-0008Px-P0; Wed, 23 Feb 2022 19:05:53 +0000 Received: from 54-240-197-224.amazon.com ([54.240.197.224] helo=[10.95.122.138]) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nMwxV-0002mw-Gs; Wed, 23 Feb 2022 19:05:53 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID; bh=5IszUqZNjYgVAlproL7eMfi10ABrxZmEo7SvnGmAxwU=; b=LHDO1SOMnsU4InsAHC9j004FjL LkCIniZqmg8b9WFraeJLXKiSQlmHUC+i2uxswZGYB3MMjegvFWBjFiMU4oQ/Q9Z8e/4HVD1GuYPki phjVRNIPUHObK6L4Vz/qacos+MF8Wpzl1uiP+/yAbqfsZ2GayJf+iQ+OIeCcKzccx7Pk=; Message-ID: Date: Wed, 23 Feb 2022 19:05:51 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH] xen/mm: pg_offlined can be defined as bool in free_heap_pages() To: Andrew Cooper , xen-devel@lists.xenproject.org Cc: Julien Grall , Andrew Cooper , George Dunlap , Jan Beulich , Stefano Stabellini , Wei Liu References: <20220223184110.7941-1-julien@xen.org> <2978f831-5bed-d2d1-afc4-965a6c9770fb@srcf.net> From: Julien Grall In-Reply-To: <2978f831-5bed-d2d1-afc4-965a6c9770fb@srcf.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, On 23/02/2022 19:03, Andrew Cooper wrote: > On 23/02/2022 18:41, Julien Grall wrote: >> From: Julien Grall >> >> The local variable pg_offlined in free_heap_pages() can only take two >> values. So switch it to a bool. >> >> Signed-off-by: Julien Grall >> --- >> xen/common/page_alloc.c | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c >> index e971bf91e0be..72e6cac2365d 100644 >> --- a/xen/common/page_alloc.c >> +++ b/xen/common/page_alloc.c >> @@ -1437,8 +1437,9 @@ static void free_heap_pages( >> { >> unsigned long mask; >> mfn_t mfn = page_to_mfn(pg); >> - unsigned int i, node = phys_to_nid(mfn_to_maddr(mfn)), pg_offlined = 0; >> + unsigned int i, node = phys_to_nid(mfn_to_maddr(mfn)); >> unsigned int zone = page_to_zone(pg); >> + bool pg_offlined = true; > > = false ? Whoops. Yes. I will resend the patch. Cheers, -- Julien Grall