Re: [Xen-devel] [PATCH v7 2/3] mm: make pages allocated with MEMF_no_refcount safe to assign

2020-01-30 Thread Durrant, Paul
> -Original Message- > From: Jan Beulich > Sent: 30 January 2020 11:02 > To: Durrant, Paul > Cc: xen-devel@lists.xenproject.org; Andrew Cooper > ; George Dunlap ; > Ian Jackson ; Julien Grall ; > Konrad Rzeszutek Wilk ; Stefano Stabellini > ; Wei Liu ; Volodymyr Babchuk > ; Roger Pau

Re: [Xen-devel] [PATCH v7 2/3] mm: make pages allocated with MEMF_no_refcount safe to assign

2020-01-30 Thread Jan Beulich
(replying from seeing your reply on the list archives, i.e. threading lost/broken) On 30.01.2020 10:40, Paul Durrant wrote: > This is getting very very complicated now, which makes me think that my > original approach using a 'normal' page and setting an initial max_pages in > domain_create()

Re: [Xen-devel] [PATCH v7 2/3] mm: make pages allocated with MEMF_no_refcount safe to assign

2020-01-30 Thread Durrant, Paul
> -Original Message- > From: Jan Beulich > Sent: 30 January 2020 10:20 > To: Durrant, Paul > Cc: xen-devel@lists.xenproject.org; Andrew Cooper > ; George Dunlap ; > Ian Jackson ; Julien Grall ; > Konrad Rzeszutek Wilk ; Stefano Stabellini > ; Wei Liu ; Volodymyr Babchuk > ; Roger Pau

Re: [Xen-devel] [PATCH v7 2/3] mm: make pages allocated with MEMF_no_refcount safe to assign

2020-01-30 Thread Jan Beulich
On 29.01.2020 18:10, Paul Durrant wrote: > NOTE: steal_page() is also modified to decrement extra_pages in the case of > a PGC_extra page being stolen from a domain. I don't think stealing of such pages should be allowed. If anything, the replacement page then again should be an "extra"

[Xen-devel] [PATCH v7 2/3] mm: make pages allocated with MEMF_no_refcount safe to assign

2020-01-29 Thread Paul Durrant
Currently it is unsafe to assign a domheap page allocated with MEMF_no_refcount to a domain because the domain't 'tot_pages' will not be incremented, but will be decrement when the page is freed (since free_domheap_pages() has no way of telling that the increment was skipped). This patch