[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] page-alloc: fix initialization of cross-node regions
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 25 Jul 2022 15:10:42 +0200
- 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=2Y9bbWTZkIjkIehIg0UtM+rMqcF9EceSJLRI57FqFxE=; b=TATjkFkkXOJB2TgbHallS+C6lTCuqdTRum9jU0QhQklZIHZ3v2w5nfO3V+vV/HjDRpEbg7gb5tYHssqupeIkX29R5Ju8lUZntIslw5yNfWVenudXFMP/5iLpDphoeZFxV7xKmmT9oesfGWOll/bht+Oi2bHRoJbzuCORjv6mMdFYZznbUTISn5EYWJ1ZoIFiRbKmChwFWSVRlkJ5hNS6qgScGQc+FWCFEmLfDYMGDjIqsqJG0LL4+ffDTL3wHMaYTKUu86TvYCJnZQNF5jbOC8l1bdFjrBgND0EkVtaiYLeNBoa93lYvg2ikIlnclij47WODzvA3t221kIUh8hJOVg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g7hV+7GWpfMnXoUgxk1J3AG6bf0RGtNWCsOe4mDbP1AFiXPPAIfUsatCM3Ju9PCJ6kCxwI1j0ZPjD9qmItBbtfoHh3DNWmISNW2bn+CVh/3ikUaNP96QpJS1LK/hhz4zcgkWpZPkXVaXxC5S6i9ZeMTinA8DHJFadvZCYmirhrWhcaPkXu//xtF/f0z7pX2rN7cb/2HTN9Xyyr4lS0hXz/66q0Yu6Rsr53OXrfT7R2bDka6c4M8BaYEMp4hFHy4tl7JEslemlbXkmK2cLjONLmYV2Kp0cu5tc9w1Lg60Y6j6EQCDSw/pTrd33vs7WG0vIYqeYnSNiPAOYPK/HiCbfQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "Xia, Hongyan" <hongyxia@xxxxxxxxxx>
- Delivery-date: Mon, 25 Jul 2022 13:11:08 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Quite obviously to determine the split condition successive pages'
attributes need to be evaluated, not always those of the initial page.
Fixes: 72b02bc75b47 ("xen/heap: pass order to free_heap_pages() in heap init")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
Part of the problem was already introduced in 24a53060bd37 ("xen/heap:
Split init_heap_pages() in two"), but there it was still benign.
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1885,11 +1885,11 @@ static void init_heap_pages(
* range to cross zones.
*/
#ifdef CONFIG_SEPARATE_XENHEAP
- if ( zone != page_to_zone(pg) )
+ if ( zone != page_to_zone(pg + contig_pages) )
break;
#endif
- if ( nid != (phys_to_nid(page_to_maddr(pg))) )
+ if ( nid != (phys_to_nid(page_to_maddr(pg + contig_pages))) )
break;
}
|