Re: [Xen-devel] [PATCH v4 5/7] mm: make MEMF_no_refcount pages safe to assign

2020-01-29 Thread Durrant, Paul
> -Original Message- > From: Jan Beulich > Sent: 29 January 2020 08:22 > 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 v4 5/7] mm: make MEMF_no_refcount pages safe to assign

2020-01-29 Thread Jan Beulich
On 28.01.2020 18:01, Durrant, Paul wrote: >> From: Jan Beulich >> Sent: 28 January 2020 15:23 >> >> On 24.01.2020 16:31, Paul Durrant wrote: >>> 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

Re: [Xen-devel] [PATCH v4 5/7] mm: make MEMF_no_refcount pages safe to assign

2020-01-28 Thread Durrant, Paul
> -Original Message- [snip] > > > @@ -2331,11 +2331,20 @@ struct page_info *alloc_domheap_pages( > > >memflags, d)) == NULL)) ) > > > return NULL; > > > > > > -if ( d && !(memflags & MEMF_no_owner) && > > > - assign_pages(d, pg,

Re: [Xen-devel] [PATCH v4 5/7] mm: make MEMF_no_refcount pages safe to assign

2020-01-28 Thread Durrant, Paul
> -Original Message- > From: Jan Beulich > Sent: 28 January 2020 15:23 > 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 v4 5/7] mm: make MEMF_no_refcount pages safe to assign

2020-01-28 Thread Jan Beulich
On 24.01.2020 16:31, Paul Durrant wrote: > 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

[Xen-devel] [PATCH v4 5/7] mm: make MEMF_no_refcount pages safe to assign

2020-01-24 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