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

RE: [PATCH v6 5/7] xen: re-define assign_pages and introduce a new function assign_page


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Thu, 9 Sep 2021 09:34:04 +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; bh=pVLiyRJmeubHdsZ4iEmGaXE0d3O/Gu+hmo+4GLSGD0g=; b=HJzKBDuLPlWFLp+4EHTOq5Gurus4l4l6nrmDUXJN9Ny1yRZylj3WrZNiIvBjMrjysyzfHIhPNQsJ4jvJBaIITOJ1HDFfu1aAbgmmnXOEWjcjulF+Kzs9+PBzbUGAsfNM578CdIhiokGaq7hV43VmBV2O6JMcUaqGGewnOgS3ge3IbKxQkBYNnE7qS56wofNoGuWUAcspjt01F/d7UzbKpD3FyVQEG6X9Lt3h1CvUXD3zGx4k0KXrtf4zzq0xkOzWqYfjZQ89KGwxZf8ZgUMtTMXx5AW/4JpgzzrPJyiDX6alit9x5LMfn8/+DbVuSENS/X04ULMiiYgr08y3ffHy+w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nEWd5ZiraaixogvwoLR5qxYYJUVXsVz71PIiUgIhDcFBeSShgUDtDWS6nYo+dNoQP6vJTncbO4WpT4qBLEj3nDsOy13aB/+xhYEXrbROwQtsWJcpRnHbJfHdSKHr9X/7/cFUMLSHn8mBA9TNRNtVv19PdDzMqiT2yWL6LT9JxE0DVkbi3OSghnc0ORTS5PawOGtUJS+x4mkLhrAhzBJNGnEleX64/gG/vvR8UlI4n1R+/djstjUbcf1rVqDslBdkj1x/g9iM2hXLPpZTNVdJHoAyg0RPn9ct49v077zjYvHi1DfjK7HrVVkrzoUC1IHY4DPGOcKhiOKjPMifRtfJsw==
  • Authentication-results-original: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>
  • Delivery-date: Thu, 09 Sep 2021 09:34:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXpVn2rWpL2DewC0y7cp371PcYX6ubbG4Q
  • Thread-topic: [PATCH v6 5/7] xen: re-define assign_pages and introduce a new function assign_page

Hi Jan and Stefano

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Thursday, September 9, 2021 5:06 PM
> To: Penny Zheng <Penny.Zheng@xxxxxxx>
> Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>; Wei Chen
> <Wei.Chen@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx;
> sstabellini@xxxxxxxxxx; julien@xxxxxxx
> Subject: Re: [PATCH v6 5/7] xen: re-define assign_pages and introduce a new
> function assign_page
> 
> On 08.09.2021 11:52, Penny Zheng wrote:
> > In order to deal with the trouble of count-to-order conversion when
> > page number is not in a power-of-two, this commit re-define
> > assign_pages for nr pages and introduces a new helper assign_page for
> original page with a single order.
> >
> > Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx>
> 

Stefano, Since I need to re-commit this one, I'll add-in your NIT suggestion in 
commit 7("
xen/arm: introduce allocate_static_memory"), and push a new Serie asap. ;)

> I have to admit that I'm now very puzzled: Instead of restoring the long 
> agreed
> upon ordering of parameters (and then keeping my A-b), you've dropped the
> ack.
> 
> > --- a/xen/arch/x86/pv/dom0_build.c
> > +++ b/xen/arch/x86/pv/dom0_build.c
> > @@ -568,7 +568,7 @@ int __init dom0_construct_pv(struct domain *d,
> >          else
> >          {
> >              while ( count-- )
> > -                if ( assign_pages(d, mfn_to_page(_mfn(mfn++)), 0, 0) )
> > +                if ( assign_pages(d, mfn_to_page(_mfn(mfn++)), 1, 0)
> > + )
> 
> This change alone demonstrates the problem when it comes to backporting
> future changes: If the original patch contained a code addition similar to 
> what
> you change to, without the person doing the backporting paying close
> attention, the result will be an order-1 request when an order-0 one is 
> wanted.
> It was explained to you that in order to make people doing backports aware of
> this semantic change, the order of parameters of the function ought to be
> altered. That way the compiler will complain, and the person will know to look
> closely what adjustments are needed.
> 
> In this context I find it further puzzling ...
> 
> > --- a/xen/include/xen/mm.h
> > +++ b/xen/include/xen/mm.h
> > @@ -133,8 +133,14 @@ void heap_init_late(void);
> >
> >  int assign_pages(
> >      struct domain *d,
> > +    struct page_info *pg,
> > +    unsigned long nr,
> > +    unsigned int memflags);
> > +
> > +int assign_page(
> >      struct page_info *pg,
> >      unsigned int order,
> > +    struct domain *d,
> >      unsigned int memflags);
> 
> ... that you also neglected the request to harmonize the argument order of
> both functions. What we want (and what I thought has long been agreed
> upon) is e.g.
> 
> int assign_pages(
>     struct page_info *pg,
>     unsigned long nr,
>     struct domain *d,
>     unsigned int memflags);
> 
> int assign_page(
>     struct page_info *pg,
>     unsigned int order,
>     struct domain *d,
>     unsigned int memflags);
> 

Sorry, my fault, I've wrongly interpretate julien's harmonize request twice.
 
> Jan


 


Rackspace

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