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

Re: [PATCH] page-alloc: fix initialization of cross-node regions


  • To: Julien Grall <julien.grall.oss@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 25 Jul 2022 18:18:03 +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=Mz1YE18l9VGVY57WwyAGO7FD1IPzpn0GTqYKKlSJ2cU=; b=iH/7WazNf1U/tCdLxE/P408sBkL3oG8fVEC8268is9HUe1L4cBED/3Mr8DSLhf3fP9MBTE6JQZTGw+63pPRA6Y4i5FjPe0qEwRXYkzvXK14YTtBRDFBkl3NS24DwDRnEhz03cE8kGvJ0qPYYkiNHBVPNGNgTXtapR3nwQYqjDwlmz8f5YgvLe6CrL9wAdUihhszLpm5TbJPU15lwhsIEfQ1RFaZrnm1rjT7kWE0ajgx9cZ1mjNkJO72SerudwOTTpOgO3nJgwbgGHaU9MJKBVBDJQ48Owl2pfzjcnC5CQfIP9dz6ChPM39r0m4sUaiHKSLssKaD210ulphrF6ouQQQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IE0ZNx8fPFMG48avmplfv7RVmu18sLwQESSsTPVhKOKICICWkHQbpL4oyA1I0EQ2CYi6Xn7SPyzmihaIIkBqxAOzLOoR87nPAQQnZq+flvO5oV9n5OSu/Yeh8djh7kcZYo3VIewJskKOuU4/nXc/V6SP3GwcoFkeHqxIru8hBXG/F53lpob82dhjmpVBgZ/wthmpmAosQABxGdMgHl0vEPrUPZSTFRRwwuffYZNxQHijd9CmQDx4oLsOeIzxZPCqtSpP2QRv3zarp+4/veXlD/zhJzaWRqcamLMISLiiOTP4iT5vlnOzx5WR6WIL5yxbboqEjw2ptkVfik+J8BkDOQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "Xia, Hongyan" <hongyxia@xxxxxxxxxx>
  • Delivery-date: Mon, 25 Jul 2022 16:18:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 25.07.2022 18:05, Julien Grall wrote:
> (Sorry for the formatting)

No issues seen.

> On Mon, 25 Jul 2022, 14:10 Jan Beulich, <jbeulich@xxxxxxxx> wrote:
> 
>> 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.
>>
> 
> Is this because range will never cross numa node? How about the fake NUMA
> node?

No (afaict), because pages were still freed one by one (and hence node
boundaries still wouldn't end up in the middle of a buddy).

>> --- 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;
>>          }
>>
> 
> Hmmm I am not sure why I didn't spot this issue during my testing. It looks
> like this was introduced in v2, sorry for that.
> 
> Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx>

Thanks.

Jan



 


Rackspace

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