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

RE: [PATCH 06/10] xen: replace order with nr_pfns in assign_pages for better compatibility


  • To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Wed, 19 May 2021 05:35:26 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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-SenderADCheck; bh=X+HouS1vdV1PlPvVgBL1LTnzyMBfsrJLb2gV+keXSvw=; b=L9lXcEWBEmnYyGgw+QpFVifdjy+06gIUNM1oXtA5YkBtARByZb1ujrdtYOwNM70ng7TtpCH6jTsxe+6rEEh0u5//m4WXf5HIgAz4lXRcZNSMyIza2BVBgg6tuGpBQ9QLQMDViM5oXsxh1dza2HP0vIAzCFij9xBPUXUdBwc0BRwhsEJhE3EE+HN5RsjHOTST/+LSBtl3/2IFaKkzitd2mbWpLdvbmnlRfvB7AvV5ciIqFw7S6TQMHgOLryT+9pAC4thP0BYSJKU3xzxGSA6TzcmxFzJiV8NxdGgh7wcunhsJkYH21tM86/ZCRylDiTY2qMXdTKbT7gZkZDKUJFbYKg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ef05ZaA89fKxGu1hLhSpqItVGXd9n51yo6rt3HGMOtKw/gV3vIogRS8HN3dAC1aSgfJkeCJFJt2jlsDpYmf5zJGQDMrqQnVZAyNUMq0OSKfOd62eh8Y6DD/VMszbKRzmpczFSJuRwbo+QeMyBzvNX5S7qAwHrfUwlm6WuoePeCIWzV+EOqqH9IRM1Zn56z40N4U4KmuBdHqUBL3XN9EaQjwmb2n6jUm32+14f/249e5a5CD1HplMH+VWWGMpG91AQk53eV4uFn9TQXxvsSslrL39SpTBnzxWTh1Y7MuQ4an5k6zFw/5xNabEPA4iJ3A7IJSYE+LKj3Ete3aAqeRz7Q==
  • Authentication-results-original: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, nd <nd@xxxxxxx>
  • Delivery-date: Wed, 19 May 2021 05:35:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXS6W5eIGNu7DPG0i7DMYwhf4hF6rpB5CAgAFAuBA=
  • Thread-topic: [PATCH 06/10] xen: replace order with nr_pfns in assign_pages for better compatibility

Hi Julien

> -----Original Message-----
> From: Julien Grall <julien@xxxxxxx>
> Sent: Tuesday, May 18, 2021 6:21 PM
> To: Penny Zheng <Penny.Zheng@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx;
> sstabellini@xxxxxxxxxx
> Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>; Wei Chen
> <Wei.Chen@xxxxxxx>; nd <nd@xxxxxxx>
> Subject: Re: [PATCH 06/10] xen: replace order with nr_pfns in assign_pages
> for better compatibility
> 
> Hi Penny,
> 
> On 18/05/2021 06:21, Penny Zheng wrote:
> > Function parameter order in assign_pages is always used as 1ul <<
> > order, referring to 2@order pages.
> >
> > Now, for better compatibility with new static memory, order shall be
> > replaced with nr_pfns pointing to page count with no constraint, like
> > 250MB.
> 
> We have similar requirements for LiveUpdate because are preserving the
> memory with a number of pages (rather than a power-of-two). With the
> current interface would be need to split the range in a power of 2 which is a
> bit of pain.
> 
> However, I think I would prefer if we introduce a new interface (maybe
> assign_pages_nr()) rather than change the meaning of the field. This is for
> two reasons:
>    1) We limit the risk to make mistake when backporting a patch touch
> assign_pages().
>    2) Adding (1UL << order) for pretty much all the caller is not nice.
> 

Ok. I will create a new interface assign_pages_nr(), and let assign_pages to 
call it with
2@order.

> Cheers,
> 
> --
> Julien Grall

Cheers

Penny Zheng

 


Rackspace

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