[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen/mm: Remove always true ASSERT() in free_heap_pages()


  • To: Julien Grall <julien@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 24 Feb 2022 09:27:27 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YFAFeSNMQrwq3dvf2PS+dxBgCGLjZYvktWV37T+uqIo=; b=YGON3ZGYXEzuY7DQs5LaAsed95yk4YC/MhTLk3Vj2VI35AP5kuiXi43aXq2ho5Sw/TkNlhc72vrkTxVJrnNSCMLRGIMjAEJPKxACu6wv65LGjM5o/gR0ThNZ99IB8KelUrMiVH8V5zFsONFl9UXYj6w6DkAQe1POcQZ7jwj+THhHKYAF5hkYoXTZiYC1UkLH97i+xfIVolyvLqyvyArmKLVXtqHlX6ctej2RQoVUW+KnE3dB/KyXYFmeK7k8ToJ5Y+IbfkI1u9tks2tkw+h64gdOrI8P6m64ZeNiRpTSa9TXYWJdJz4dY+gXqid+y+Tj/RGrzfMutXEYomOXUOANXQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FL90oqCK1YPCR6eg8wnEqtT8io3+S5yosXCanlBpqVPaWxamNY2f4JH9e9N1USvC4wabw4edqG97Iu5qpmoao5OToE952QwI9tKZealQl1YRhTvq3VSczNUqt+I4E+mSQgA++2vNn5XfdzP0qxCLMyB/Ic0l4mzyM0IwnV/yxszVZEtUCd0BPraJJg2LadR4d744VtrBuk2NAF3cJXNTwdR4ojgZZ91Qn/DmpiXLcUstj04G1MAB9GuBma1LiJRDv27v0bd5f9hZJLryPNJ+6ydEo7N1NzaeRqhVcEllbAgTuaJ0LazdN+az0Hfv1W51sqloSTw6wbGpePoXlPAMgQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Julien Grall <jgrall@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 24 Feb 2022 08:27:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23.02.2022 19:38, Julien Grall wrote:
> From: Julien Grall <jgrall@xxxxxxxxxx>
> 
> free_heap_pages() has an ASSERT() checking that node is >= 0. However
> node is defined as an unsigned int. So it cannot be negative.
> 
> Therefore remove the check as it will always be true.
> 
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
> 
> ---
> 
> I have looked at the history. AFAICT, node has always be defined
> as unsigned int. So the ASSERT() may have never been useful (?).

Commit f0738d2d3f81 introduced "node" as a local variable of type
"int". Along with this commit f1c6ac275100 introduced ia64's
paddr_to_nid() (backing phys_to_nid()), which was able to return -1.
Hence at the time the assertion fulfilled a purpose. I should have
dropped it in bd3e1195d694.

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.